PHPackages                             dam1r89/passwordless-auth - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. dam1r89/passwordless-auth

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

dam1r89/passwordless-auth
=========================

Authenticate users without password, only with email

1.6.0(5y ago)81.1k5[1 PRs](https://github.com/dam1r89/laravel-passwordless-login/pulls)PHP

Since Jun 22Pushed 3y ago2 watchersCompare

[ Source](https://github.com/dam1r89/laravel-passwordless-login)[ Packagist](https://packagist.org/packages/dam1r89/passwordless-auth)[ RSS](/packages/dam1r89-passwordless-auth/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)Dependencies (2)Versions (12)Used By (0)

Laravel Passwordless Auth
-------------------------

[](#laravel-passwordless-auth)

**Features**

- Routes are predefined (default is `/passwordless/login`)
- Sign-in and/or sign-up mode
- Sends sign-in email
- Send mail throttling

To get started, install package with composer:

```
composer require dam1r89/passwordless-auth

```

Register the `dam1r89\PasswordlessAuth\PasswordlessAuthServiceProvider` provider in `config/app.php` configuration file.

```
dam1r89\PasswordlessAuth\PasswordlessAuthServiceProvider::class,

```

Publish configuration.

```
php artisan vendor:publish --tag=passwordless

```

Configuration file:

```
/*
 * Route prefix for sign-in/sign-up form.
 */
'route_prefix' => 'passwordless',

/*
 * This is a model to which LoginToken is saving reference to.
 * Almost always this will be User class.
 */
'provider' => \App\User::class,

/*
 * Number of seconds user must wait before receiving new sign-up link.
 */
'throttle' => 60 * 10,

/*
 * Should user be automatically signed-up if email is not already used
 */
'sign_up' => true,

/*
 * Default redirect to
 * Redirect url after user is signed in and intended url is not set
 */
'redirect_to' => 'home',

/*
 * If user should be "remembered" after sign-in.
 */
'remember' => true,

```

User must implement `dam1r89\PasswordlessAuth\Contracts\UsersProvider` contract or if user is instance of eloquent model just use `UsersRepository` trait.

```
use dam1r89\PasswordlessAuth\UsersRepository;
use dam1r89\PasswordlessAuth\Contracts\UsersProvider;

class User extends SparkUser implements UsersProvider
{
    use UsersRepository;

```

... and run migration

```
php artisan migrate

```

Using passwordless as a default sign-in method
----------------------------------------------

[](#using-passwordless-as-a-default-sign-in-method)

### For Laravel &lt; 5.5

[](#for-laravel--55)

In `/app/Exceptions/Handler.php` change `return redirect()->guest(route('login'));` to:

```
return redirect()->guest(route('passwordless.login'));

```

### For Larvel 5.5+

[](#for-larvel-55)

Since Laravel 5.5 the `unauthenticated()` function in `/app/Exceptions/Handler.php` has moved to `vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php`.

You can still use this method but you have to override it. In your `app/Exceptions/Handler.php` file include:

```
use Request;
use Illuminate\Auth\AuthenticationException;
use Response;
```

and add the `unauthenticated` function:

```
    /**
     * Convert an authentication exception into an unauthenticated response.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Illuminate\Auth\AuthenticationException  $exception
     * @return \Illuminate\Http\Response
     */
    protected function unauthenticated($request, AuthenticationException $exception)
    {
        if ($request->expectsJson()) {
            return response()->json(['error' => 'Unauthenticated.'], 401);
        }
        return redirect()->guest(route('passwordless.login'));
    }
```

Visual
------

[](#visual)

Publish views and email template.

```
php artisan vendor:publish --tag=passwordless-views

```

Views are located under `resources/views/vendor/passwordless` folder.

To replace current login link with passwordless use this route name:

```
Login

```

Passwordless Links
------------------

[](#passwordless-links)

Sometimes you want to send a link via email that will automatically sign-in user. You can do that with `PasswordlessLink` class. Exemple for notifications.

```
use dam1r89\PasswordlessAuth\PasswordlessLink;

$link = PasswordlessLink::for($notifiable)->url('/route/to/resource');

```

**Note:** It is dangerous to forward emails with unused sign-in links because link gives direct access to account.

### Similar package

[](#similar-package)

[Laravel Passwordless Auth](https://github.com/Whyounes/laravel-passwordless-auth)

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 74.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~128 days

Recently: every ~288 days

Total

10

Last Release

2139d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3540487?v=4)[Damir Miladinov](/maintainers/dam1r89)[@dam1r89](https://github.com/dam1r89)

---

Top Contributors

[![dam1r89](https://avatars.githubusercontent.com/u/3540487?v=4)](https://github.com/dam1r89 "dam1r89 (20 commits)")[![hotsaucejake](https://avatars.githubusercontent.com/u/6332533?v=4)](https://github.com/hotsaucejake "hotsaucejake (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![SimonVanherweghe](https://avatars.githubusercontent.com/u/655147?v=4)](https://github.com/SimonVanherweghe "SimonVanherweghe (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dam1r89-passwordless-auth/health.svg)

```
[![Health](https://phpackages.com/badges/dam1r89-passwordless-auth/health.svg)](https://phpackages.com/packages/dam1r89-passwordless-auth)
```

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.2M17](/packages/kartik-v-yii2-password)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
