Tokens — Refresh

Tokens

The refresh token lets the application obtain new access tokens without the user having to log in again, as defined by OAuth 2.0. It's issued by the token endpoint of the Authentication API and can only be used once: every refresh returns a new refresh token. See Tokens — General for how it fits in the lifecycle.

Obtaining & Using

A refresh token is only issued if the application has the Refresh Token grant type (refresh_token), and:

  • for the authorization code grant: if the scope contains offline_access;
  • for the client credentials grant: always;
  • for the JWT Bearer grant (embedded login): never.

When the access token is about to expire, the application sends the refresh token to the token endpoint, with its client authentication:

POST /oauth2/token HTTP/1.1Host: {tenant_id}.api.quasr.ioContent-Type: application/x-www-form-urlencoded grant_type=refresh_token&refresh_token={refresh_token}&client_id={client_id}

The response contains a new access token and a new refresh token, but no identity token:

{    "token_type": "Bearer",    "access_token": "{access_token}",    "expires_in": 86400,    "expires_at": 1767312000,    "refresh_token": "{new_refresh_token}"}
  • The new refresh token keeps the expiry of the original one: refreshing doesn't extend how long the application can retain access.
  • The scopes can't be changed when refreshing. Claims from attributes and the access token extension are evaluated again for the new access token.
  • A refresh token that was already used is rejected with INVALID_PARAMETER (body.refresh_token).

Claims

Claim Description
subThe ID of the account.
client_idThe ID of the application the token is issued to.
scopeThe granted scopes, carried over to new access tokens.
issThe issuer, i.e. your tenant: https://{tenant_id}.api.quasr.io.
audThe audience: https://api.quasr.io.
iat / nbf / expWhen the token was issued, is valid from and expires.
jtiThe unique ID of the token.
https://api.quasr.io/claims/typThe token type: oauth2:refresh.
https://api.quasr.io/claims/clmThe granted claims.
https://api.quasr.io/claims/atrThe IDs of the attributes to include in the identity token.
https://api.quasr.io/claims/ataThe IDs of the attributes to include in the access token.
https://api.quasr.io/claims/maxThe latest moment the token (and tokens obtained with it) can expire, from the consent.
https://api.quasr.io/claims/useHow often the token can be used: 1 (once).
https://api.quasr.io/claims/ipbWhether the token is bound to the IP address in ipa.
https://api.quasr.io/claims/ipaThe IP address the token was issued to.
https://api.quasr.io/claims/tenThe ID of the tenant.

An example refresh token (decrypted):

{    "client_id": "{client_id}",    "scope": "openid offline_access",    "sub": "{account_id}",    "jti": "{token_id}",    "aud": "https://api.quasr.io",    "iss": "https://{tenant_id}.api.quasr.io",    "iat": 1767225600,    "nbf": 1767225600,    "exp": 1767830400,    "https://api.quasr.io/claims/typ": "oauth2:refresh",    "https://api.quasr.io/claims/clm": [        "email"    ],    "https://api.quasr.io/claims/atr": [        "{email_attribute_id}"    ],    "https://api.quasr.io/claims/ata": [],    "https://api.quasr.io/claims/max": 2082801600,    "https://api.quasr.io/claims/use": 1,    "https://api.quasr.io/claims/ipb": false,    "https://api.quasr.io/claims/ipa": "203.0.113.42",    "https://api.quasr.io/claims/ten": "{tenant_id}"}

Configuration

Refresh tokens are configured per application (see Applications — Configuration):

  • Expiration (config.tokens.refresh.exp) - How long the application can obtain new tokens. 1 week by default, at most 1 year.
  • Encryption (config.tokens.refresh.enc) - Whether the token is encrypted, so its content can only be read by Quasr. Enabled by default.
  • IP Binding (config.tokens.refresh.ipb) - Whether the token can only be used from the IP address it was issued to. Disabled by default.
  1. 11 week by default, at most 1 year
  2. 2Once: every refresh returns a new refresh token, and uses up the old one

Refresh tokens can only be used once (use is fixed at 1).

Security

  • As a refresh token can only be used once, make sure your application doesn't refresh in parallel (e.g. from multiple tabs): only the first request succeeds.
  • Refresh tokens are tracked and can be revoked with POST oauth2/revoke, in the Admin UI or Account UI, and are revoked when the user is locked. See Revocation.
2026.11.22 | © Copyright 2026 Quasr BV