What is a refresh token?

What is a refresh token?

A Refresh token is a string that represents an authorization that was granted to a client to use a particular set of web services on behalf of a user to access data for a particular institution. Unlike Access Tokens, Refresh Tokens are only used with the Authorization Server and are never sent to a web service.

Is a refresh token a JWT?

Access token used in token-based authentication to gain access to resources by using them as bearer tokens. Refresh token is a long-lived special kind of token used to obtain a renewed access token. ID token carries identity information encoded in the token itself, which must be a JWT.

What is refresh token in Identity Server 4?

Since access tokens have finite lifetimes, refresh tokens allow requesting new access tokens without user interaction. Refresh tokens are supported for the following flows: authorization code, hybrid and resource owner password credential flow.

What is refresh token in Web API?

A refresh token is a long lived token that allows requesting new access tokens without having to present the user credentials again. This means that the access token itself could be short lived and whenever the refresh token is used to request a new access token, the contents of that access token can be updated.

What can a refresh token be used for?

A third-party system can generate the refresh token and provide it to the client making API calls. A refresh token never expires and is used to generate access tokens used to make API calls.

When to delete Microsoft identity platform refresh tokens?

The Microsoft identity platform doesn’t revoke refresh tokens when used to fetch new access tokens. Securely delete the old refresh token after acquiring a new one. Refresh tokens need to be stored safely like access tokens or application credentials.

When do JWT tokens and refresh tokens expire?

On successful authentication the API returns a short lived JWT access token that expires after 15 minutes, and a refresh token that expires after 7 days in an HTTP Only cookie. The JWT is used for accessing secure routes on the API and the refresh token is used for generating new JWT access tokens when (or just before) they expire.

What happens when an access token expires?

Once the access token expires, the server will send a token expired response. Once the app receives the token expired response, it sends the expired access token and the refresh token to obtain a new access token and refresh token.