From 4d5d7b74b8655943c3cdb3cf13a681f8c481865f Mon Sep 17 00:00:00 2001 From: Ryderjj89 Date: Sat, 13 Sep 2025 17:08:49 -0400 Subject: [PATCH] Fix authentication status handling to properly handle 401 responses --- frontend/src/App.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index d0654b4a..989f67fc 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -112,9 +112,13 @@ function App() { } else if (response.status === 501) { // Authentication not configured setAuthAvailable(false); - } else { + } else if (response.status === 401) { // Authentication configured but user not logged in setAuthAvailable(true); + setUser(null); + } else { + // Other error + setAuthAvailable(false); } } catch (error) { console.log('Auth check failed:', error);