Application & API Security

OAuth 2.0 Refresh Token Flow

Flow where a client silently obtains a new access token by presenting its refresh token to the authorization server, instead of prompting the user to sign in again.

Access tokens are short-lived by design. When one expires, the client doesn't need to send the user through another login: if it holds a refresh token, it can exchange it at the authorization server's token endpoint for a new access token. The user is not involved at any point.

Authorization servers may rotate the refresh token on every use, returning a new one and invalidating the old one. Clients should always store the latest refresh token they receive. Confidential clients must also authenticate when calling the token endpoint.

Resource ServerAuthorization ServerClient AppResource ServerAuthorization ServerClient AppGET /api/resource1401 Unauthorized - invalid_token2POST /oauth/token3Validate refresh token4New access_token (+ refresh_token)5GET /api/resource6Validate access token7200 OK - Resource payload8