Chapter 22, refresh rotation, reuse detection, and the train problem
Refresh rotation, reuse detection, and the train problem
Turning on a refresh token is not enough. A refresh token that never rotates and never expires is a finding in any modern security review, because a single leaked one becomes permanent account access with no detection signal. The fix is rotation: every time the client redeems a refresh token, the server issues a new refresh token and invalidates the old one. Now a leaked token is only useful until the legitimate client refreshes next, and you get a detection signal for free.
