fix: show login page before needsSetup guard for unauthenticated users #166
@@ -249,14 +249,14 @@ export function App() {
|
|||||||
return <Navigate to="/login" replace />;
|
return <Navigate to="/login" replace />;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Production: need setup check
|
// Show login BEFORE checking needsSetup (needsSetup is never set for unauthenticated users)
|
||||||
if (needsSetup === null) return null;
|
|
||||||
|
|
||||||
// Production mode: if no session, redirect to Authentik sign-in
|
|
||||||
if (!authDisabled && !session) {
|
if (!authDisabled && !session) {
|
||||||
return <LoginPage />;
|
return <LoginPage />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Production: need setup check
|
||||||
|
if (needsSetup === null) return null;
|
||||||
|
|
||||||
// Redirect to setup wizard if needed
|
// Redirect to setup wizard if needed
|
||||||
if (needsSetup) {
|
if (needsSetup) {
|
||||||
return <Navigate to="/setup" replace />;
|
return <Navigate to="/setup" replace />;
|
||||||
|
|||||||
Reference in New Issue
Block a user