hos3ein / novel-auth
Laravel authentication with password or otp or both and highly configurable
v1.0.0
2022-12-21 12:54 UTC
Requires
- php: ^7.4|^8.0
- laravel/fortify: ^1.7
- tymon/jwt-auth: ^1.0
Requires (Dev)
- mockery/mockery: ^1.0
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.3
This package is auto-updated.
Last update: 2024-03-19 08:14:14 UTC
README
- Laravel authentication with Password or OTP or both and highly configurable
Sample
Install
composer require hos3ein/novel-auth
php artisan vendor:publish --provider="Hos3ein\NovelAuth\NovelAuthServiceProvider"
php artisan migrate
The Novel Auth Service Provider
The vendor:publish
command discussed above will also publish the App\Providers\NovelAuthServiceProvider
class. You
should ensure this class is registered within the providers
array of your application's config/app.php
configuration
file.
'providers' => [ // ... App\Providers\NovelAuthServiceProvider::class ]
Add HasOtpCodes
and NovelAuthAuthenticatable
to your eloquent model
class User extends Authenticatable { use HasOtpCodes, NovelAuthAuthenticatable; ... }
Final step
Implement methods in App\Actions\NovelAuth\OtpManager.php
in order to do how to send SMS or make a Call and others.
License
The Novel-Auth is open-sourced software licensed under the MIT license.