setAuthScope (lib/auth-scope.ts)

ironclaw · crates/product/ironclaw_webui/frontend/src/lib/auth-scope.ts · typescript · Apache-2.0
auth, tag:embed-classified

Manages per-session auth scope string for client-side caching.

// Source: https://github.com/nearai/ironclaw | License: Apache-2.0 | Copyright 2026 NEAR AI
// Provided via justclaw.it.com; keep this notice with the code.
/* Authenticated-user scope for namespacing per-session client state.
 *
 * The WebChat v2 SPA supports bearer-authenticated multi-user sessions in a
 * single browser tab. Client-side caches that hold user content — the
 * in-memory thread-history cache and the localStorage composer drafts — must
 * be keyed by the authenticated identity so one user's content can never
 * surface for another after a session change. This covers changes that do
 * NOT go through an explicit sign-out (token swap, re-auth, 401 expiry):
 * the scope tracks the resolved session, so a different identity reads under
 * a different key and simply misses the p

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key