liveBook · Manning

Refresh token

As explained in ASP.NET Core in Action, 3e

A refresh token is a credential that allows a client to obtain a new access token after the current access token expires without requiring the user to authenticate again.

A refresh token lets a client obtain a new access token after the current one expires, without asking the user to authenticate again. section 25.2

A typical refresh-token flow works like this:

  • The client uses a short-lived access token to call an API. section 25.2
  • When the access token expires, the client sends the refresh token to the identity provider. section 25.2
  • The identity provider returns a new access token, avoiding another user login. section 25.2

A five-minute access token

If an access token expires after five minutes, repeatedly asking the user to log in would create a poor experience. A refresh token allows the client to obtain another access token instead. section 25.2

Protect refresh tokens carefully: anyone who obtains one effectively has the power to impersonate the user by obtaining valid access tokens. section 25.2

How ASP.NET Core in Action, 3e covers it

How deep it goes
Defines the exchange and security risk, but does not descend into implementation code.
Examples
Uses a five-minute access-token lifetime to illustrate renewal without another user login.
What it assumes
Builds on access tokens, bearer authentication, OAuth, OpenID Connect, and identity providers.
What you can do after
Apply it via OAuth or OpenID Connect to renew access without repeatedly authenticating the user.
How it connects
Connects OAuth 2.0, OpenID Connect, access tokens, bearer authentication, and identity providers.

Also explained in

Compare how 3 books explain refresh token →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ASP.NET Core in Action, 3e. The section links point to the parts of the book it draws on.