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

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

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

JWT blacklist storage in database for tymon/jwt-auth

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

Since Sep 2Pushed 8mo 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 1mo ago

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

30

—

LowBetter than 64% of packages

Maintenance60

Regular maintenance activity

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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

252d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/226e556cb1a3817f492bd311c51e054a18ae062d52e052a8667ca069f6c680c2?d=identicon)[KauanCalheiro](/maintainers/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.1k7.2M71](/packages/mongodb-laravel-mongodb)[spiritix/lada-cache

A Redis based, automated and scalable database caching layer for Laravel

591444.8k2](/packages/spiritix-lada-cache)[pdphilip/elasticsearch

An Elasticsearch implementation of Laravel's Eloquent ORM

145360.2k4](/packages/pdphilip-elasticsearch)[toponepercent/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

3154.7k](/packages/toponepercent-baum)[dragon-code/laravel-data-dumper

Adding data from certain tables when executing the `php artisan schema:dump` console command

3418.6k](/packages/dragon-code-laravel-data-dumper)[ntanduy/cloudflare-d1-database

Easy configuration and setup for D1 Database connections in Laravel.

215.4k](/packages/ntanduy-cloudflare-d1-database)

PHPackages © 2026

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