fix: show login page before needsSetup guard for unauthenticated users #166

Merged
groombook-engineer[bot] merged 2 commits from fix/login-page-before-needssetup into main 2026-03-29 20:58:02 +00:00
+4 -4
View File
@@ -249,14 +249,14 @@ export function App() {
return <Navigate to="/login" replace />;
}
// Production: need setup check
if (needsSetup === null) return null;
// Production mode: if no session, redirect to Authentik sign-in
// Show login BEFORE checking needsSetup (needsSetup is never set for unauthenticated users)
if (!authDisabled && !session) {
return <LoginPage />;
}
// Production: need setup check
if (needsSetup === null) return null;
// Redirect to setup wizard if needed
if (needsSetup) {
return <Navigate to="/setup" replace />;