wingsline / passwordlessauth
Passwordless Authentication for Laravel
Requires
- doctrine/dbal: ^2.10
- illuminate/support: ~7
- laravel/ui: ^2.0
Requires (Dev)
- mockery/mockery: ^1.4
- orchestra/testbench: ~5.3
- phpunit/phpunit: ^8.5
- sempro/phpunit-pretty-print: ^1.2
This package is auto-updated.
Last update: 2024-12-30 02:18:04 UTC
README
This package will enable passwordless authentication using temporary signed routes. Take a look at contributing.md to see a to do list.
Installation
Create a new Laravel application with:
laravel new myapp --auth
Via Composer
$ composer require wingsline/passwordlessauth
Remove the Auth::routes();
from the routes/web.php
and replace it with:
use Wingsline\PasswordlessAuth\Facades\PasswordlessAuth; PasswordlessAuth::routes();
Replace the following route names in the original views with the passwordless.
prefix:
- login -> passwordless.login
- register -> passwordless.register
- logout -> passwordless.logout
- verification.resend -> passwordless.verification.resend
Replace the auth
middleware in app/Http/Kernel.php
:
protected $routeMiddleware = [ 'auth' => \Wingsline\PasswordlessAuth\Middleware\Authenticate::class, ]
Add the following method to the User
model and make sure the model
implements the Illuminate\Contracts\Auth\MustVerifyEmail
interface:
use Wingsline\PasswordlessAuth\Notifications\VerifyEmail; /** * Send the email verification notification. * * @return void */ public function sendEmailVerificationNotification() { $this->notify(new VerifyEmail); }
Change log
Please see the changelog for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email wingsline@gmail.com instead of using the issue tracker.
Credits
License
MIT. Please see the license file for more information.