Repaso
Español
Backend & APIsAdvancedAPI-08

Main drawback of stateless JWT access tokens?

Options

  1. They are too large to send
  2. They are hard to revoke before expiry (Correct option)
  3. They require a database lookup on every request
  4. They only work with OAuth

Answer

They are hard to revoke before expiry

Why

The server validates a JWT just by checking its signature and expiry, without looking anything up. That is fast, but it also means the server cannot easily 'cancel' a token: it stays valid until it expires.

Common solutions: short-lived access tokens (5-15 minutes) plus refresh tokens that CAN be revoked, or a denylist of revoked token IDs.

Remember

JWTs are hard to revoke → keep them short-lived.

Key terms

Practice this question in Repaso