Rotate a short-lived access token mid-flow; replaying a rotated refresh token revokes the session
Log in, rotate a short-lived access token before it dies, and watch reuse-detection revoke the whole session when an already-rotated refresh token is replayed
Login issues a short-lived access token (TTL ~45s) plus a refreshtoken. Rotating swaps both for a fresh pair โ the old refresh becomes invalid. Replaying that already-rotated refresh trips the server's reuse-detection control and revokes the session entirely.
The status is computed server-side. Assert on #session-state[data-state], never on client-only text.
Login โ rotate โ (mis)replay, while a checkout wizard stays alive across the refresh
Session state: idle
access: โ
refresh: โ
previous refresh: โ
Checkout wizard (survives a mid-flow refresh):
Step 1 / 4: Cart
Automation hints
#wizard-next across a #sr-refresh and assert #wizard-step[data-step] still advances#sr-refresh, then confirm #session-state[data-state=active]#sr-replay POSTs the already-rotated refresh โ the server returns 401 and flips #session-state to data-state=revoked with #sr-error= "reuse detected โ session revoked"#sr-tokens: after a refresh the access/refreshvalues change and the old one moves to "previous refresh"#session-state[data-state]attribute โ never trust the client-rendered label alone