Status: Accepted (2026-11-27, revised). Security model: 0023. Cookie names and the PAT prefix updated by 0028 (2026-11-30).
linora_session cookie (HttpOnly, Secure, SameSite=Lax, hashed at rest, 30-day sliding) + CSRF protections for the web app.Authorization: Bearer linora_pat_... on REST.POST /v1/realtime/token, claims in shared/src/auth-token.ts), sent in Sec-WebSocket-Protocol and verified in memory at the upgrade (no DB per socket). Tokens are reused across reconnects while valid and refreshed at 80% of their life. Reconnects use full-jitter exponential backoff (1 s -> 30 s); drains spread going_away over 60 s.{fileId, userId, clientId, exp 24 h} returned in welcome, so reconnects keep their node-id space without DB or server memory.projectId/fileId/pageId -> project). Ids in paths never grant access by themselves.NOTIFY linora_auth; realtime closes or downgrades affected sockets within a second; a denylist covers the remaining token lifetime.Cookie auth on the WebSocket (would need a DB/session lookup per socket), JWT browser sessions (hard revocation), OAuth/SSO (later).