PHPackages                             jpnut/extended-laravel-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. jpnut/extended-laravel-auth

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

jpnut/extended-laravel-auth
===========================

Extended Authentication implmentation for Laravel

0.1.0(8y ago)214MITPHPPHP &gt;=7.0

Since Apr 4Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jpnut/extended-laravel-auth)[ Packagist](https://packagist.org/packages/jpnut/extended-laravel-auth)[ Docs](https://github.com/jpnut/extended-laravel-auth)[ RSS](/packages/jpnut-extended-laravel-auth/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (9)Versions (3)Used By (0)

Multiple "Remember Me" tokens per user
======================================

[](#multiple-remember-me-tokens-per-user)

This package extends the default Laravel Authentication scaffolding to allow the creation of multiple "Remember Me" tokens per user.

With Laravel's default Auth, only one "Remember Me" token can be associated with a user at a time. This presents an issue for users of an application across multiple devices. For example, consider a user who has logged in using the "Remember Me" funcionality on two devices (e.g. on desktop and on mobile). If this user were to log out on one device (e.g. mobile), then the "Remember Me" token will be regenerated, and the user will not be logged in automatically on the other device (desktop in this example). We solve this problem my allowing multiple "Remember Me" tokens to be stored per user.

This process also has the added advantage of enabling an application to invalidate specific "Remember Me" tokens. For example, if a user were to accidentally click "Remember Me" whilst on a public device, the default process only allows a user to invalidate the token across all devices. With this package, we can selectively revoke tokens.

Installation
------------

[](#installation)

You can install the package with composer:

```
composer require jpnut/extended-laravel-auth
```

You can publish the migration with:

```
php artisan vendor:publish --provider="JPNut\ExtendedAuth\AuthServiceProvider" --tag="migrations"
```

One should note that the removal of the "remember\_token" field in the users table is not currently handled by this package. Any existing tokens will not transferred automatically. After the migration has been published you can create the token table by running the migrations:

```
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --provider="JPNut\ExtendedAuth\AuthServiceProvider" --tag="config"
```

Usage
-----

[](#usage)

Since the default auth implementation of "Remember Me" tokens is baked into the `"Illuminate\Contracts\Auth\Authenticatable"` contract, this package overwrites this, and provides an alternative to the `"Illuminate\Foundation\Auth\User"` provided by Laravel.

You must ensure that your `User` model(s) implement `"JPNut\ExtendedAuth\Contracts\Authenticatable"`. The easiest way to accomplish this is to extend `"JPNut\ExtendedAuth\User"`:

```
use JPNut\ExtendedAuth\User as Authenticatable;

class User extends Authenticatable
{
    // ...
}
```

To enable the guard, you will need to modify `config/auth.php` as follows:

```
...
    'guards' => [
        'extended-web' => [
            'driver' => 'extended-session',
            'provider' => 'extended-users',
        ],
    ],
...
    'extended-users' => [
        'driver' => 'extended-eloquent',
        'model' => JPNut\ExtendedAuth\User::class,
    ],
...
```

You should also make sure that the guard is defined on the routes where you wish to make use of this guard. For most cases this involves changing the default guard to `extended-web`. Note that `extended-session` and `extended-eloquent` can be modified in the `config/extended-auth` file.

Certain other areas of the default Laravel framework also rely upon features which have been changed in this package:

- You should comment out `Illuminate\Auth\Passwords\PasswordResetServiceProvider::class` in `config/app.php`
- During testing, you should override `Illuminate\Foundation\Testing\TestCase` with `JPNut\ExtendedAuth\Testing\TestCase`
- For password resets, you should replace `Illuminate\Foundation\Auth\ResetsPasswords` with `JPNut\ExtendedAuth\ResetsPasswords`

Extending
---------

[](#extending)

You need to make sure:

- Any `User` model(s) implement `JPNut\ExtendedAuth\Contracts\Authenticatable`
- Your `Token` model implements `JPNut\ExtendedAuth\Contracts\Tokenable`

Testing
-------

[](#testing)

```
phpunit
```

License
-------

[](#license)

MIT

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2960d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b5ca364f3580e94690eb7e46eacf37fdbf67b036429f62660242a5b9a3bdaf34?d=identicon)[jpnut](/maintainers/jpnut)

---

Top Contributors

[![jpnut](https://avatars.githubusercontent.com/u/13661783?v=4)](https://github.com/jpnut "jpnut (21 commits)")

---

Tags

laravelAuthenticationremember-me

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jpnut-extended-laravel-auth/health.svg)

```
[![Health](https://phpackages.com/badges/jpnut-extended-laravel-auth/health.svg)](https://phpackages.com/packages/jpnut-extended-laravel-auth)
```

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[alajusticia/laravel-logins

Session management in Laravel apps, user notifications on new access, support for multiple separate remember tokens, IP geolocation, User-Agent parser

2011.0k](/packages/alajusticia-laravel-logins)

PHPackages © 2026

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