PHPackages                             kamoca/laravel-jwt-database-blacklist - 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. [Database &amp; ORM](/categories/database)
4. /
5. kamoca/laravel-jwt-database-blacklist

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

kamoca/laravel-jwt-database-blacklist
=====================================

JWT blacklist storage in database for tymon/jwt-auth

v1.0.0(10mo ago)022MITPHPPHP ^8.0

Since Sep 2Pushed 10mo agoCompare

[ Source](https://github.com/KauanCalheiro/laravel-jwt-database-blacklist)[ Packagist](https://packagist.org/packages/kamoca/laravel-jwt-database-blacklist)[ Docs](https://github.com/KauanCalheiro/laravel-jwt-database-blacklist)[ RSS](/packages/kamoca-laravel-jwt-database-blacklist/feed)WikiDiscussions main Synced today

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

Laravel JWT Database Blacklist
==============================

[](#laravel-jwt-database-blacklist)

[![Latest Version](https://camo.githubusercontent.com/5b38b4ca8f6daeba6f52c68ec235a32e5759c9c7beb0e90b14e448b9c7241730/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f4b6175616e43616c686569726f2f6c61726176656c2d6a77742d64617461626173652d626c61636b6c697374)](https://github.com/KauanCalheiro/laravel-jwt-database-blacklist/releases)[![PHP Version](https://camo.githubusercontent.com/6da9704adc310b64eea60cc463a5e5c8dd738da86ba6c3e2af0cfd4600621755/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e302d626c75652e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)[![Downloads](https://camo.githubusercontent.com/58758665b8987d5d387a105722dd5d8999ba303c1a1cc17b313f91fb794560b0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b616d6f63612f6c61726176656c2d6a77742d64617461626173652d626c61636b6c697374)](https://packagist.org/packages/kamoca/laravel-jwt-database-blacklist)

A Laravel package to store JWT blacklisted tokens in the database instead of cache.

Built to work with [tymondesigns/jwt-auth](https://github.com/tymondesigns/jwt-auth).

✨ Features
----------

[](#-features)

- 🛡️ Blacklist JWT tokens in a dedicated database table
- ⚡ Works with `tymon/jwt-auth`
- 🗄️ No cache needed
- ✅ Ready for production use

🚀 Installation
--------------

[](#-installation)

```
composer require kamoca/laravel-jwt-database-blacklist
```

⚙️ Setup
--------

[](#️-setup)

1. **Publish migration**

```
php artisan vendor:publish --tag=jwt-blacklist-migrations
php artisan migrate
```

This will create the `jwt_blacklists` table in your database.

2. **Configure JWT**

    2.1. **Set storage**

    In `config/jwt.php`, set the `storage` option:

    ```
    'storage' => Kamoca\JwtDatabaseBlacklist\Providers\Storage\Illuminate::class,
    ```

    2.2. **Ensure blacklist is enabled**

    In `config/jwt.php`, set the `blacklist_enabled` option:

    ```
    'blacklist_enabled' => env('JWT_BLACKLIST_ENABLED', true),
    ```

    Then in your `.env` file:

    ```
    JWT_BLACKLIST_ENABLED=true
    ```

Now, when you invalidate a token, it will be stored in the database and blocked from reuse.

🔧 Usage
-------

[](#-usage)

Example logout controller:

```
use Tymon\JWTAuth\Facades\JWTAuth;
use Auth;

public function logout()
{
    // These will store {"valid_until":...} in the `jwt_blacklists` table
    Auth::logout();
    auth()->logout();

    // These will store 'forever' in the `jwt_blacklists` table
    JWTAuth::invalidate(JWTAuth::getToken(), true);
}
```

Any request using the same token after invalidation will fail.

📝 License
---------

[](#-license)

Este projeto está licenciado sob a **Licença MIT** - veja o arquivo [LICENSE](LICENSE) para detalhes.

👨‍💻 Author
----------

[](#‍-author)

**Kauan Morinel Calheiro**

- 📧 Email:
- 🐙 GitHub: [@KauanCalheiro](https://github.com/KauanCalheiro)

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance54

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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

304d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/110562396?v=4)[Kauan Calheiro](/maintainers/KauanCalheiro)[@KauanCalheiro](https://github.com/KauanCalheiro)

---

Top Contributors

[![KauanCalheiro](https://avatars.githubusercontent.com/u/110562396?v=4)](https://github.com/KauanCalheiro "KauanCalheiro (2 commits)")

---

Tags

jwtlaraveldatabaseblacklist

### Embed Badge

![Health badge](/badges/kamoca-laravel-jwt-database-blacklist/health.svg)

```
[![Health](https://phpackages.com/badges/kamoca-laravel-jwt-database-blacklist/health.svg)](https://phpackages.com/packages/kamoca-laravel-jwt-database-blacklist)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)[api-platform/laravel

API Platform support for Laravel

58171.5k14](/packages/api-platform-laravel)[aimeos/laravel-nestedset

Nested Set Model for Laravel

3714.4k6](/packages/aimeos-laravel-nestedset)

PHPackages © 2026

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