Status: built (2026-10-05). Tests: apps/auth-broker/tests/session-limit.test.ts, claims-logout.test.ts, oidc.test.ts, manage.test.ts. A session is the family one sign-in's refresh tokens belong to: it starts when a person signs in to one of a project's applications and ends when one of the things below happens.
The access token it makes is short (60 s to a day, the project's choice); the session is what lets it be renewed.
How long
Setting (PATCH /v1/manage/projects/:pid, dashboard Settings) |
|
|---|---|
session_lifetime_days (1–400, default 90) |
the longest a session lives from sign-in, however much it is used |
session_idle_days (1–400, default 30; not above the lifetime) |
signed out after this long unused |
access_token_ttl_seconds (60–86400) |
how long one access token is good before it is renewed |
max_sessions (1–100, or null: no limit) |
how many sessions one person may hold at once — below |
Refresh tokens rotate: each use returns a new one and spends the old; presenting a spent one again after the short grace for racing tabs means it was copied, and the whole session ends — the thief's and the person's — so they sign in again.
How many: max_sessions
"Single session" is a limit of one; a streaming product says four. When a person signs in on one device more than the limit allows, the oldest session (the one used least recently) ends, and the new sign-in stands:
- its refresh tokens stop (the next refresh from that device answers
invalid_grant, and its person signs in again), its back-channel logout notice is queued (CLAIMS.md), and it is in the audit log assession.revokedbysystemwithreason: "session_limit"and the limit; - the
session.revokedwebhook fires withreason: "session_limit"(WEBHOOKS.md), and a Shared Signals receiver hearssession-revokedwithinitiating_entity: "policy"(SIGNALS.md); - it is per person and counts every application of the project together (the website, the iPhone app and the desktop app share the count); other people are never touched;
- sessions of third parties acting for the person (an app or agent authorized through OAuth) and of someone acting as the person (impersonation) are not the person's devices: they neither count nor are ended;
- turning a limit on does not end sessions at once: the surplus goes at the person's next sign-in, oldest first, down to the limit.
How they end
| Who or what | |
|---|---|
| the person | signs out (their own devices page, DELETE /v1/me/sessions/:id, ACCOUNT.md); or removes the product's access in Passkin ID |
| you | POST /v1/sessions/:id/revoke, a ban (ends every session), deleting the user |
| a refresh token reused | the whole session (above) |
| the limit | the oldest session, when one more device signs in |
| a takeover signal ends every session of the person (SIGNALS.md) | |
| the project | session_lifetime_days or session_idle_days runs out |
Every ending of a project's session queues the back-channel logout notice for its application and is a webhook event (session.revoked, user.banned…) and an audit entry.
Not built
Per-application limits (a limit for the website and another for the apps), a limit by IP or by country, "sign out the other devices" offered to the person at the moment the limit bites (the oldest simply goes), a per-organization limit, and "end every session of a project" in one call.