MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / persistToken

Function persistToken

packages/react/src/api/local-auth.tsx:39–46  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

37};
38
39const persistToken = (token: string): void => {
40 // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: localStorage can throw (private mode / disabled storage)
41 try {
42 globalThis.localStorage?.setItem(STORAGE_KEY, token);
43 } catch {
44 // best-effort; the token still applies for this session
45 }
46};
47
48const applyBearer = (token: string): void => {
49 const current = getExecutorServerConnection();

Callers 2

bootstrapLocalAuthTokenFunction · 0.85
setLocalAuthTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected