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

Function setLocalAuthToken

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

Source from the content-addressed store, hash-verified

99 * place onto stale "failed to load" data).
100 */
101export const setLocalAuthToken = (token: string): void => {
102 const trimmed = token.trim();
103 if (!trimmed) return;
104 persistToken(trimmed);
105 if (globalThis.window?.location) {
106 globalThis.window.location.reload();
107 return;
108 }
109 applyBearer(trimmed);
110 setAuthRequired(false);
111};
112
113// --- "auth required" signal -------------------------------------------------
114

Callers 1

LocalAuthGateFunction · 0.85

Calls 3

persistTokenFunction · 0.85
applyBearerFunction · 0.85
setAuthRequiredFunction · 0.85

Tested by

no test coverage detected