LaravelPackages.net
Acme Inc.
Toggle sidebar
hos3ein/novel-auth

Laravel authentication with password or otp or both and highly configurable

91
1
v1.0.0
About hos3ein/novel-auth

hos3ein/novel-auth is a Laravel package for laravel authentication with password or otp or both and highly configurable. It currently has 1 GitHub stars and 91 downloads on Packagist (latest version v1.0.0). Install it with composer require hos3ein/novel-auth. Discover more Laravel packages by hos3ein or browse all Laravel packages to compare alternatives.

Last updated

Novel Auth

Latest Stable Version Packagist Download Latest Unstable Version Packagist Stars Packagist PHP Version Support License

  • 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.

Comments