Open thlassche opened 6 years ago
You can use contextual binding
$this->app
->when(\Tymon\JWTAuth\Providers\Storage\Illuminate::class)
->needs(\Illuminate\Contracts\Cache\Repository::class)
->give(function () {
return cache()->store('jwt');
});
@miki131 Great, thanks. That will do the job for now for me.
Make cache instance / blacklist storage configurable
Because the token blacklist is stored in the default laravel cache instance, the blacklist is cleared every time the cache is cleared. Would be better to make the cache instance configurable, just like Laravel did it for the session and cache instances: https://github.com/laravel/laravel/commit/c3b99e971cd9d8213ada259b9f624a8f70ddd57b#diff-ef16cabd572189f548df70d3f0042c33
Your environment
Steps to reproduce
php artisan cache:clear
Expected behaviour
The invalidated token should never work again
Actual behaviour
The invalidated token started working again