DEV Community

Discussion on: Demystifying JWT: How to secure your next web app

Collapse
 
aiosifelis profile image
Andreas Iosifelis

Very good article, thanks! I would also like to add that it is impossible to invalidate a jwt token before it expires without using a database or changing the secret key.

Collapse
 
kmistele profile image
Kyle Mistele

Yep! A common way to deal with this problem is to use a redis database or similar to store tokens you've marked as invalid, or I've even seen modules for Python that will track revoked tokens in-memory (with a potentially significant performance overhead).