refresh-token-rotation-must-be-atomic-same-transaction

JWT refresh token rotation must execute as a single DB transaction: revoke the old opaque refresh token and insert the new one atomically. If the old token is revoked before the new one commits, a server error leaves the user permanently logged out. The R-Same implementation stores SHA256-hashed refresh tokens in the sessions table and rotates within one SQLAlchemy transaction.