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

Function readStoredToken

packages/react/src/api/local-auth.tsx:30–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 typeof globalThis.window?.executor?.getServerConnection === "function";
29
30const readStoredToken = (): string | null => {
31 // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: localStorage can throw (private mode / disabled storage)
32 try {
33 return globalThis.localStorage?.getItem(STORAGE_KEY) ?? null;
34 } catch {
35 return null;
36 }
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)

Callers 1

bootstrapLocalAuthTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected