From 672938936bc0a93e47ebcbf85e54bac2188660d9 Mon Sep 17 00:00:00 2001 From: Flea Flicker Date: Sun, 29 Mar 2026 19:37:55 +0000 Subject: [PATCH] fix: show login page before needsSetup guard for unauthenticated users Unauthenticated users saw a blank screen because the needsSetup null-guard fired before the LoginPage render check. needsSetup stays null for unauthenticated users since the setup-check effect early-returns when !session. Now the login check runs first so users see the login page. Co-Authored-By: Paperclip --- apps/web/src/App.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index 0a5afa1..a8f7b2a 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -249,14 +249,14 @@ export function App() { return ; } - // 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 ; } + // Production: need setup check + if (needsSetup === null) return null; + // Redirect to setup wizard if needed if (needsSetup) { return ; -- 2.52.0