Transmit Security is serving up unbeatable protection – and custom pickleball paddles at RSA 2025. Book a meeting to grab yours and take your security game to the next level!
Glossary
A refresh token is a credential an application uses to request a new access token from an authorization server without asking the user to sign in each time.
Access tokens are often deliberately short-lived. Without a way to renew access, a customer could face another sign-in prompt while still using an application. Refresh tokens let the authorization server assess whether access should continue without repeating the full login flow on every renewal.
They are optional in OAuth 2.0, and their lifetime depends on policy. A refresh token may remain valid longer than the access token it replaces, which makes protecting it particularly important.
The request cannot expand access beyond the authorization already granted. If the refresh token has expired or been revoked, the application needs to obtain authorization again.
Refresh-token rotation replaces the refresh token after each successful use and invalidates the previous value. The server retains the relationship between tokens so it can detect an attempt to reuse an old one.
Suppose malware copies a customer’s refresh token. If the legitimate application uses it first, the attacker’s later attempt to reuse it can expose the compromise. The server can revoke the active refresh token associated with that sequence, forcing a fresh authorization. Rotation detects reuse; it does not prevent every first use of a stolen token.
For public clients, which cannot keep a client secret confidential, current OAuth security guidance requires rotation or sender-constrained refresh tokens. Sender constraint ties use to proof of possession of a key. The choice needs to fit the application architecture.
Short access-token lifetimes help only if a stolen refresh token cannot keep renewing access indefinitely. Refresh-token expiration and revocation policy therefore belong in the same design as session handling.
Closing a browser tab is not evidence that tokens have been invalidated. Applications need an explicit response to sign-out and account compromise. Revoking a refresh token prevents further renewal, but already-issued access tokens may remain usable until expiry unless the system also invalidates them and the APIs enforce that change.
Storage matters too. The application must protect refresh tokens according to where it runs, and avoid exposing them in diagnostic logs. A single storage recommendation cannot cover a server application and a mobile app equally well.
How does a refresh token differ from an access token?
A refresh token requests renewed access from the authorization server. An access token is presented to the protected API to request an authorized operation.
Do refresh tokens expire?
They can. Expiration and inactivity limits depend on the authorization server’s policy, and a token can also be revoked before its scheduled expiry.
Does signing out automatically revoke every token?
No. Application logout and token revocation are separate actions. Their relationship must be implemented, including how already-issued access tokens are handled.
Related: OAuth 2.0 · Token-Based Authorization (JWT) · Session Hijacking · Account Takeover (ATO) · Credential Management · Identity Lifecycle