tymondesigns / jwt-auth

🔐 JSON Web Token Authentication for Laravel & Lumen
https://jwt-auth.com
MIT License
11.29k stars 1.54k forks source link

How to block user, or set his token invalid? #1791

Open Leopandro opened 5 years ago

Leopandro commented 5 years ago

I want to block user from admin panel, what should i do to disable user?

Your environment

Q A
Bug? no
New Feature? no
Framework Laravel
Framework version 5.x.y
Package version 1.x.y
PHP version 7.2
sharuman commented 5 years ago

Hi there, have you tried using the invalidate()?

DanielSoCra commented 5 years ago

use a middleware function that resolves the jwt for users email/username and check it with a blacklist, then invalidate the token

rsmmukesh commented 3 years ago

invalidate not working