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.2(7mo ago)33.8kMITPHPPHP ^8.0

Since Jul 30Pushed 7mo 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 1mo ago

READMEChangelog (10)Dependencies (1)Versions (19)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

47

—

FairBetter than 94% of packages

Maintenance63

Regular maintenance activity

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity76

Established project with proven stability

 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 ~154 days

Recently: every ~289 days

Total

18

Last Release

224d ago

Major Versions

1.3.2 → 2.0.12020-10-21

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

v2.x-devPHP &gt;=7.3

2.0.6PHP &gt;=8.0

2.2.0PHP ^8.0

### 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 (136 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.3k16.4M48](/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).

263763.5k1](/packages/codegreencreative-laravel-samlidp)[rickycezar/laravel-jwt-impersonate

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

24117.6k](/packages/rickycezar-laravel-jwt-impersonate)[lakm/nopass

Provides passwordless authentication for your laravel projects.

2213.6k2](/packages/lakm-nopass)[hapidjus/laravel-impersonate-ui

UI for 404labfr/laravel-impersonate

371.5k](/packages/hapidjus-laravel-impersonate-ui)[yangjisen/laravel-cache-provider

105.8k1](/packages/yangjisen-laravel-cache-provider)

PHPackages © 2026

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