Refresh Access Token
Exchanges a valid refresh token for a new access token and a new refresh token.
This endpoint implements refresh token rotation for enhanced security:
- The provided refresh token is immediately revoked upon successful use
- A new refresh token is issued along with the new access token
- Old refresh tokens cannot be reused, reducing the risk of token replay attacks
Usage Flow:
- Client calls a login endpoint and receives
access_tokenandrefresh_token - When
access_tokenexpires (typically 15 minutes), client calls this endpoint withrefresh_token - Client receives a new
access_tokenand a newrefresh_token - Client discards the old
refresh_tokenand uses the new one for future refreshes
Security Notes:
- Refresh tokens should be stored securely (e.g., HTTP-only cookies or secure storage)
- Never expose refresh tokens in URLs, logs, or client-side JavaScript
- If a refresh token is compromised, revoke it immediately via the logout endpoint
Body
Request payload for refreshing an access token.
The refresh token previously issued by a login endpoint.
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Response
Token refreshed successfully
Authentication response returned by login endpoints.
Short-lived PASETO bearer token used for authenticated API calls.
"v4.local.eyJzdWIiOiJ1c2VyLWlkIiwicm9sZSI6InVzZXIifQ..."
Long-lived refresh token used to obtain new access tokens. Store securely and never expose in URLs or logs.
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Token type, typically 'bearer'.
"bearer"
Access token lifetime in seconds.
900