Refresh Token Rotation
Security & Identity

Refresh Token Rotation

Subtitle: Short-lived access, single-use refresh, revoke the family on reuse

Panel 2 - Why rotate at all:

Refresh tokens are long-lived and high value Public apps cannot hide a client secret A bearer token works for whoever holds it Rotation shrinks the stolen-token window Single use makes theft observable

Panel 3 - Rules that make it work:

Access token in minutes, refresh in days Every refresh token is single use Chain tokens into one family ID Reuse of a spent token revokes the family Store token hashes, never raw values

Panel 4 - Common mistakes:

One long-lived refresh token, never rotated Rotating but not revoking on reuse No family ID, so only one token dies Parallel tabs cause false revokes, add a grace window Refresh token in localStorage instead of httpOnly cookie