What is a refresh token and how is it used?
Ask by ICSM Computer
Updated 08 Jun 2025
A refresh token is a special token used in OAuth 2.0 and OpenID Connect that allows a client application to obtain a new access token without requiring the user to log in again.
Why Refresh Tokens?
Structure
Typical Flow with Refresh Token
Security Best Practices
When Not to Use
For public clients (SPAs, JS in browser), refresh tokens can be risky unless you use PKCE and Refresh Token Rotation.
Example (C# using IdentityModel library)
Summary