Passwordless login for Laravel. Allows users to login via a magic link.
pownall/laravel-magic-login is a Laravel package for passwordless login for laravel. allows users to login via a magic link..
It currently has 2 GitHub stars and 3 downloads on Packagist (latest version 0.2).
Install it with composer require pownall/laravel-magic-login.
Discover more Laravel packages by pownall
or browse all Laravel packages to compare alternatives.
Last updated
Allows you to create a temporary signed route that logs a user in. There is no config file, you define everything when generating the url.
I see the general usage being
User requests login -> You generate link and send in email -> User clicks link and is signed in.
You can install the package via composer:
composer require pownall/magic-login
redirectToUrl(string $url) - Default is /.expiresAt(CarbonInterface $pointInTime) - Default is 1 hour after generating link.Simple usage is:
MagicLogin::forUser($user)->generate();
If you want to alter the redirect url:
MagicLogin::forUser($user)
->redirectToUrl('/somewhere-else')
->generate();
or
MagicLogin::forUser($user)
->redirectToUrl(route('admin.dashboard'))
->generate();
If you want to make the link expire earlier or later pass a CarbonInterface to the expireAt method.
MagicLogin::forUser($user)
->expireAt(Carbon::now()->addMinutes(30))
->generate();
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.