JWT Token Revocation

Discussions focus on challenges and strategies for expiring, refreshing, and revoking stateless authentication tokens like JWTs, including trade-offs between security, server state, and short-lived tokens.

📉 Falling 0.5x Security
2,723
Comments
19
Years Active
5
Top Authors
#3461
Topic ID

Activity Over Time

2008
4
2009
5
2010
15
2011
34
2012
58
2013
74
2014
79
2015
95
2016
215
2017
141
2018
259
2019
204
2020
188
2021
258
2022
299
2023
271
2024
263
2025
251
2026
10

Keywords

AFAIK SG e.g tools.ietf HTTP HTML JWT R2 RedHat VIN token tokens jwt revoke refresh invalidate auth lived sessions expire

Sample Comments

lazide • Aug 3, 2021 • View on HN

Why not make them 2 use tokens?Not quite as secure, but way better than never expires?

nly • May 28, 2015 • View on HN

You can't revoke a token if you have no server-side state to purge. Relying on timeouts is a fairly crude way of going about it.

gregpardo • Mar 14, 2017 • View on HN

For number 2, you could expire them by encoding some identifier based off a hash or key tied to the user object. Change that object and have the server reject the token if that meta data no longer validates.

rcfox • Aug 13, 2022 • View on HN

Tokens can expire?! That can't be legal...

kccqzy • Aug 18, 2023 • View on HN

Why wouldn't the system require each refresh of the session token to require additional authentication? Then a stolen token can't easily be refreshed.

zhobbs • Nov 1, 2018 • View on HN

With this method isn't the downside that you have to invalidate all tokens, and not just the attacker's tokens?

spookthesunset • Dec 14, 2019 • View on HN

It’s a trade off dude. You trade off the ability to revoke a token instantly for fewer backend calls. For most parts of your site (99.9%) that trade off is fine. For the parts where it isn’t fine you... call the auth server every request.JWT doesn’t mean you give up anything....

Daviey • Oct 29, 2025 • View on HN

I'm curious, which situations are short-lived tokens not an option?

tracker1 • Feb 18, 2020 • View on HN

Don't blacklist, use shorter lived tokens and have the client refresh as needed. A 10-15m token is plenty long life and not so long as it's a huge risk window, more than even a shorter window,.

seandougall • Jul 24, 2019 • View on HN

That's fair, although it doesn't allow tokens to be revoked or to expire. For that you'd need to store at least some unique part of the payload you're signing, and then you have O(n) storage requirements again, right?