ma / auth-otp-api
Package to create auth apis with otp verfication
v1.0.1
2022-02-25 15:03 UTC
This package is auto-updated.
Last update: 2024-10-25 20:30:50 UTC
README
Package to build auth based api with otp verfication
Requirements
- PHP >= 7.4
- Laravel >= 8.5
- Laravel Sanctum for Laravel <= 8.5 and lower
Installation
Install location using composer require
:
composer require ma/auth-otp-api
Add the service provider in config/app.php
:
Ma\AuthOtpApi\AuthApiServiceProvider::class,
Publish the configuration file (this will create a auth-otp-api.php
file inside the config/
directory :
php artisan vendor:publish --provider="Ma\AuthOtpApi\AuthApiServiceProvider"
add api
auth guard in auth.php
file :
'guards' => [
'api' => [
'driver' => 'sanctum',
'provider' => 'users',
],
],