Session and throttling API
The server enforces both limits from its own clock. Changing the browser cannot extend a session.
| Endpoint | Behaviour |
|---|---|
POST /api/session/keep-alive | Resets the idle clock. Returns idleSecondsRemaining and absoluteSecondsRemaining. Never extends the 8-hour limit. |
GET /api/me | Adds idleSecondsRemaining and absoluteSecondsRemaining. Does not reset the idle clock. |
POST /api/auth/sign-out | Ends the session on the server. |
Limits
- Idle: 30 minutes since the last user-initiated request or Stay signed in.
- Absolute: 8 hours from sign-in.
- An ended session is never accepted again.
Expired sessions
An API call on an ended session returns 401 with { "error": "session_expired", "reason": "idle_timeout" | "absolute_timeout" | "signed_out" }. A page request redirects to /sign-in?error=session_expired&reason=…&returnPath=…. Clients that launch content, such as players, must handle the 401.
Background calls
Only user-initiated requests reset the idle clock. Background calls such as GET /api/me polling and player heartbeats must not. Mark such an endpoint with the NonActivityRequest metadata.
Throttling
After 5 failed sign-ins within 15 minutes for one key, the callback returns 429 with a Retry-After header (seconds) and sends the browser to /sign-in?error=throttled&retryAfter=<seconds>. The key is the Entra object id, or the IP address when the callback has no usable identity.
Return path
returnPath is kept only when it is a relative path on this site. Anything else is ignored.