Session Code Authority
SESSION_CODE access flow: an 8-character, unambiguous-alphabet code with its own TTL, exchanged directly for a browser session -- no on-device Approve/Deny round trip. Possession of the code within its TTL is the authorization decision; mutating routes still separately require the relevant EditingCapabilities flag on the host.
Single-use, by design. The code is consumed by the first exchange attempt that matches it -- including one rejected for session capacity. That closes the window during which a code visible in a screen share, a shoulder surf, or browser history could be replayed by a second party after the intended browser already claimed it. A host that wants more than one browser connected issues a fresh code per browser; concurrent sessions are still bounded by SessionPolicy.maxAuthenticatedSessions either way, so single-use costs nothing there.
Only one code is ever live: issuing a new one immediately invalidates the previous one, consumed or not. There is no automatic regeneration and no fallback -- no-fallback expiry -- the host must call issueCode again explicitly.
Sessions minted by exchange are created through SessionAuthority.createSession, so they live in the exact same session store as every other session: refresh, logout, CSRF, and session-count limits behave identically regardless of how the session was minted.
Constructors
Functions
Drops the live code without affecting sessions already minted from it.
The live, unexpired code's display info. A successful exchange consumes the old code and immediately mints a fresh one, so what this returns is always exchangeable -- the device surface never advertises a dead URL. Null once the code has expired or none was ever issued.
Issues a new code, immediately invalidating any previous one (one live code at a time).
Remaining TTL in ms for the live, unexpired code; null once it has expired or none was issued.