The identity token (ID token) tells the application who the user is, as defined by OpenID Connect. It's issued by the token endpoint of the Authentication API to the application itself (its audience is the client ID), with the account ID and the user's claims the application was granted. See Tokens — General for how it fits in the lifecycle.
An identity token is only issued if the scope contains openid, together with the access token of the authorization code, client credentials or JWT Bearer grant. It's not issued again when refreshing:
{ "token_type": "Bearer", "access_token": "{access_token}", "expires_in": 86400, "expires_at": 1767312000, "refresh_token": "{refresh_token}", "id_token": "{identity_token}"}If the application requests it from the authorization endpoint instead (e.g. response type code id_token), it's returned there and not again at the token endpoint.
The application validates the token and then uses its claims, e.g. to show the user's name or match the user in its own database by sub.
iss, aud equal to your client ID, exp and nonce if you sent one) before using its claims, and don't send it to APIs: use the access token for that. See Validation.| Claim | Description |
|---|---|
sub | The ID of the account. |
aud | The client ID of the application the token is issued to. |
nonce | The nonce of the authorization request, if any. Check it matches the one you sent. |
iss | The issuer, i.e. your tenant: https://{tenant_id}.api.quasr.io. |
iat / nbf / exp | When the token was issued, is valid from and expires. |
jti | The unique ID of the token. |
{attribute} | The user's claims from attributes (with {attribute}_verified for attributes that require validation) and from the identity token extension. |
https://api.quasr.io/claims/typ | The token type: oidc1:id. |
https://api.quasr.io/claims/max | The latest moment the token can expire, from the consent. |
https://api.quasr.io/claims/use | How often the token can be used: 1 (once). |
https://api.quasr.io/claims/ten | The ID of the tenant. |
An example identity token:
{ "sub": "{account_id}", "aud": "{client_id}", "nonce": "{nonce}", "email": "jane@example.com", "email_verified": true, "given_name": "Jane", "jti": "{token_id}", "iss": "https://{tenant_id}.api.quasr.io", "iat": 1767225600, "nbf": 1767225600, "exp": 1767225900, "https://api.quasr.io/claims/typ": "oidc1:id", "https://api.quasr.io/claims/max": 2082801600, "https://api.quasr.io/claims/use": 1, "https://api.quasr.io/claims/ten": "{tenant_id}"}Identity tokens are configured per application (see Applications — Configuration):
config.tokens.identity.exp) - How fast the application must consume the token. 5 minutes by default, at most 1 day.config.tokens.identity.ext) - An extension that adds custom claims.config.tokens.identity.jwk) - The URL of your application's key set, to encrypt the token so only your application can read it.The claims are released by the controls the user passes (Identity Attributes), see Attributes — Share.
sub claim, so use the identity token to receive claims. See OpenID Connect.