Package for implementing Slack-style "magic auth" links in Laravel
Install the package via composer
$ composer require montopolis/laravel-magic-auth
Add the service provider
In config/app.php inside the providers array...
* Application Service Providers...
* Third-party Service Providers...
Publish (and update) configuration
$ php artisan vendor:publish
$ vi config/montopolis_magic_auth.php
Create a token
Use this endpoint to trigger creation of an OTP for the user. The user will be notified via the preselected channel (see montopolis_magic_auth.php) with either the password, a magic auth link or both (also see config).
Verify a token
After the OTP has been received and forwarded by the user, you can attempt authentication using this endpoint: