PHPackages                             digit-soft/laravel-token-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. digit-soft/laravel-token-auth

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

digit-soft/laravel-token-auth
=============================

Laravel token auth cached.

2.3.4(2mo ago)33.8kMITPHPPHP ^8.1

Since Jul 30Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/digit-soft/laravel-token-auth)[ Packagist](https://packagist.org/packages/digit-soft/laravel-token-auth)[ RSS](/packages/digit-soft-laravel-token-auth/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (2)Versions (21)Used By (0)

Token auth for Laravel 7+
=========================

[](#token-auth-for-laravel-7)

*Component uses Redis to store token information*

### Install

[](#install)

```
composer require "digit-soft/laravel-token-auth:~1.0"

```

### Publish config

[](#publish-config)

```
php artisan vendor:publish --provider="DigitSoft\LaravelTokenAuth\AuthServiceProvider" --tag=config

```

### Configure guard

[](#configure-guard)

Change driver to `token-cached` in ***config/auth.php***

```
    'guards' => [
        ...
        'api' => [
            'driver' => 'token-cached',
            'provider' => 'users',
        ],
        ...
    ],
```

### Ships with multiple middleware

[](#ships-with-multiple-middleware)

- `DigitSoft\LaravelTokenAuth\Middleware\DefaultAuthGuard` - set default auth guard to given value
- `DigitSoft\LaravelTokenAuth\Middleware\DefaultSessionDriver` - set default session driver to given value
- `DigitSoft\LaravelTokenAuth\Middleware\AddGeneratedTokenToResponse` - adds token generated during request to response header Some middleware useful for PHP-PM driven applications.

### Sessions

[](#sessions)

There is possibility to save session data to token, if you will use package session handler `DigitSoft\LaravelTokenAuth\Session\TokenSessionHandler`, driver name is `token-cached`. You can also set it with `DefaultSessionDriver` middleware. Often rewritable data such as **previous page**, **flashes** and **\_token** are not stored.

### Events

[](#events)

There is `DigitSoft\LaravelTokenAuth\Events\AccessTokenCreated`, which fired every time token is created by `TokenCached` facade. So you can write or check information in `AccessToken` with own event listener.

### Customization

[](#customization)

- You can use your own `AccessToken` implementation by extending original class and set its name in config.
- You can set your own header name for `AddGeneratedTokenToResponse` middleware in config.

*You can find more options and description in config file.*

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance83

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 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

Every ~147 days

Recently: every ~285 days

Total

20

Last Release

86d ago

Major Versions

1.3.2 → 2.0.12020-10-21

PHP version history (5 changes)1.1.0PHP &gt;=7.1

v2.x-devPHP &gt;=7.3

2.0.6PHP &gt;=8.0

2.2.0PHP ^8.0

2.3.3PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11768817?v=4)[Volodymyr Kovalenko](/maintainers/digitv)[@digitv](https://github.com/digitv)

---

Top Contributors

[![digitv](https://avatars.githubusercontent.com/u/11768817?v=4)](https://github.com/digitv "digitv (137 commits)")

---

Tags

tokensauthStateless Authlaravel token auth

### Embed Badge

![Health badge](/badges/digit-soft-laravel-token-auth/health.svg)

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

###  Alternatives

[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k18.6M64](/packages/lab404-laravel-impersonate)[codegreencreative/laravel-samlidp

Make your PHP Laravel application an Identification Provider using SAML 2.0. This package allows you to implement your own Identification Provider (idP) using the SAML 2.0 standard to be used with supporting SAML 2.0 Service Providers (SP).

265842.7k1](/packages/codegreencreative-laravel-samlidp)[lakm/nopass

Provides passwordless authentication for your laravel projects.

2215.9k3](/packages/lakm-nopass)

PHPackages © 2026

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