Tokens — Session

Tokens

The session token tracks a login or signup in progress. It's issued to the Login UI (or your own UI) by the factors endpoint of the Authentication API, and holds the account, the score of the session and the factors passed. The UI uses it as bearer token to pass more factors and, once the score is sufficient, to obtain a consent token. See Tokens — General for how it fits in the lifecycle.

Obtaining & Using

Every successful factor returns a new session token, together with the session score and expiry:

{    "result": "SUCCESS",    "feedback": {        "cause": "",        "enrollment_id": "{enrollment_id}"    },    "account_id": "{account_id}",    "session_token": "{session_token}",    "session_score": 3,    "session_exp": 1767312000}

Our Login UI shows the time left of the session:

A signup session

  1. 115 minutes by default to complete the signup

A login session after the first factor

Pass it as bearer token in the next requests to the factors and controls endpoints:

POST /factors HTTP/1.1Host: {tenant_id}.api.quasr.ioAuthorization: Bearer {session_token}Content-Type: application/json [    {        "id": "{enrollment_id}",        "input": "{input}"    }]
  • Always continue with the newest session token: the previous one is revoked as soon as a new one is issued.
  • A new session token keeps the expiry of the first one; passing more factors doesn't extend the session.
  • A signup starts with a signup session from POST /controls?client_id={client_id}, which is converted into a login session (with the login lifetime) once the signup is complete. See Login & Signup.

Claims

Claim Description
subThe ID of the account.
scopeThe mode of the session: https://api.quasr.io/scopes/login or https://api.quasr.io/scopes/signup.
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: session.
https://api.quasr.io/claims/scrThe score of the session, i.e. the sum of the scores of the factors passed.
https://api.quasr.io/claims/fctThe IDs of the factors passed. A factor can only be used once per session.
https://api.quasr.io/claims/intWhether the account is internal.
https://api.quasr.io/claims/useHow often the token can be used: 0 (unlimited).
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 session token:

{    "scope": "https://api.quasr.io/scopes/login",    "sub": "{account_id}",    "jti": "{token_id}",    "aud": "https://api.quasr.io",    "iss": "https://{tenant_id}.api.quasr.io",    "iat": 1767225600,    "nbf": 1767225600,    "exp": 1767312000,    "https://api.quasr.io/claims/typ": "session",    "https://api.quasr.io/claims/scr": 3,    "https://api.quasr.io/claims/fct": [        "{email_factor_id}",        "{password_factor_id}"    ],    "https://api.quasr.io/claims/int": false,    "https://api.quasr.io/claims/use": 0,    "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

Session tokens are configured per tenant (see Tenants — Configuration), separately for internal and external users and for login and signup sessions (config.tokens.{internal|external}.{login|signup}):

  • Expiration (exp) - Login sessions last 1 day for external and 1 hour for internal users by default (at most 1 year); signup sessions 15 minutes (at most 1 hour).
  • Encryption (enc) - Whether the token is encrypted, so its content can only be read by Quasr. Enabled by default.
  • IP Binding (ipb) - Whether the token can only be used from the IP address it was issued to. Enabled by default for internal users, disabled for external users.

Session tokens can be used any number of times (use is fixed at 0).

Login sessions

  1. 11 day by default for external users (internal users: 1 hour), at most 1 year; signup sessions 15 minutes, at most 1 hour
  2. 2Off by default for external users, on for internal users; the same for signup sessions

Signup sessions

  1. 1Fixed: unlimited, as every step of the signup (or login) uses the session token
  2. 2On by default: only Quasr can read the token; the same for login sessions

Security

  • A session token used from another IP address than it was bound to is rejected and permanently revoked.
  • Login sessions are tracked and can be revoked; locking a user revokes all of its sessions. See Revocation.
2026.11.22 | © Copyright 2026 Quasr BV