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
Laravel News Partners

Laravel Jobs

Senior Full-Time Laravel Developer (REMOTE)
Vue School
Senior Laravel Developer
Remote, USA & Canada Only
Backend Software Engineer
Remote, USA Only
Full Stack Laravel Developer (Full-time/Contract)
Remote or Columbus, OH
Backend PHP Developer


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