refresh token
A longer-lived credential a client uses to get a new short-lived access token without asking the user to log in again.
A stolen refresh token can keep minting new access tokens.
In more detail
It lets access tokens stay short-lived. It is sent only to the authorization server, never to APIs, and it must be stored carefully and revoked when misuse is suspected.
Related terms
- access token — A generated string that proves who you are to a service, used instead of a password and revocable on its own.
- OAuth 2.0 — A framework for delegated authorization: a user lets an application call an API on their behalf without giving it their password.
- token expiry — The time after which a token must no longer be accepted, carried in a JSON Web Token as the exp claim.
- token revocation — Cancelling a token before it expires so it is refused from then on.
- replay attack — An attack where a captured valid message, such as a token or code, is sent again to repeat its effect.
- JSON Web Token — A compact signed token made of three base64url parts separated by dots: a header, a payload of claims and a signature.
Taught in
- Basic Auth, Tokens And Sessions — Modern API Architecture: REST, GraphQL & gRPC
- JWT Verification: Asymmetric Keys & Refresh Rotation — Production Full-Stack Engineering