Laravel Passwordless Login

Laravel Passwordless Login

Laravel Passwordless login is a package by Ed Grosvenor that provides a simple, safe, magic login link generator for Laravel apps:

This package provides a temporary signed route that logs in a user. What it does not provide is a way of actually sending the link to the route to the user. This is because I don’t want to make any assumptions about how you communicate with your users.

Here’s a usage example from the project’s readme:

use App\User;
use Grosv\LaravelPasswordlessLogin\LoginUrl;

function sendLoginLink()
{
    $user = User::find(1);

    $generator = new LoginUrl($user);
    $url = $generator->generate();

    // OR Use a Facade
    $url = PasswordlessLogin::forUser($user)->generate();

    // Send $url in an email or text message to your user
    return $url;
}

This package has configuration options that enable you to configure which model is the user model, the login route, and the number of minutes until the link expires. Check out the readme for full configuration options.

You can learn more about this package, get full installation instructions, and view the source code on GitHub at grosv/laravel-passwordless-login.

Filed in: News / packages

Newsletter

Join 31,000+ others and never miss out on new tips, tutorials, and more.

Laravel News Partners

Laravel Jobs

Senior Laravel Developer
Remote
FPV Exchange
Senior Full-Stack Developer
Remote, USA Only
Givebutter
Senior PHP Developer
Cary, NC
INE
Backend PHP Developer
Hamburg
ABOUT YOU GmbH
Engineering Director
Vancouver or remote (EST/PST preferred)
Engine Digital