fix(dev): avoid auth redirect when backend/schema missing

This commit is contained in:
Zimeng Xiong
2026-02-06 09:50:27 -08:00
parent 7977a3eb09
commit b075a0cf9e
2 changed files with 7 additions and 2 deletions
+6 -2
View File
@@ -60,8 +60,12 @@ export const AuthProvider: React.FC<{ children: ReactNode }> = ({ children }) =>
return;
}
} catch {
// If status fails, assume auth is enabled (safer default).
setAuthEnabled(true);
// If status fails (backend down / schema mismatch), avoid locking the UI
// behind login. Backend still enforces auth when enabled.
setAuthEnabled(false);
setBootstrapRequired(false);
setUser(null);
return;
}
const storedUser = localStorage.getItem(USER_KEY);