(token: string)
| 99 | * place onto stale "failed to load" data). |
| 100 | */ |
| 101 | export 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 |
no test coverage detected