Broad bug hunt: auth flow, WS edge cases, and build hygiene.

Scope API auth to /api/v1, fix dashboard WebSocket 401s, session login in Calibrate, safe agent naming, reconnect races, and remove corrupt ollama/main.go.
This commit is contained in:
drjones
2026-05-28 19:53:53 -07:00
parent 3316a75f7a
commit 9e26c4babb
16 changed files with 332 additions and 30 deletions

View File

@@ -0,0 +1,24 @@
const AUTH_KEY = 'aetherforge_auth';
export function getStoredAuth(): string | null {
try {
return sessionStorage.getItem(AUTH_KEY);
} catch {
return null;
}
}
export function setStoredAuth(username: string, password: string) {
const token = btoa(`${username}:${password}`);
sessionStorage.setItem(AUTH_KEY, token);
}
export function clearStoredAuth() {
sessionStorage.removeItem(AUTH_KEY);
}
export function authHeaders(): Record<string, string> {
const token = getStoredAuth();
if (!token) return {};
return { Authorization: `Basic ${token}` };
}