From 6f8720f61fa08681d6670ea037b803a5b8282b7f Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Wed, 19 Mar 2025 22:41:32 -0300 Subject: [PATCH] fix: logout redirection on auto-login off (#7171) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🐛 (authGuard/index.tsx): fix logic in shouldRedirect variable to correctly handle conditions for redirection based on authentication and auto login status --- src/frontend/src/components/authorization/authGuard/index.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/frontend/src/components/authorization/authGuard/index.tsx b/src/frontend/src/components/authorization/authGuard/index.tsx index 263281c84..aca0cf796 100644 --- a/src/frontend/src/components/authorization/authGuard/index.tsx +++ b/src/frontend/src/components/authorization/authGuard/index.tsx @@ -18,8 +18,7 @@ export const ProtectedRoute = ({ children }) => { const shouldRedirect = !isAuthenticated && autoLogin !== undefined && - !autoLogin && - !isAutoLoginEnv; + (!autoLogin || !isAutoLoginEnv); useEffect(() => { const envRefreshTime = LANGFLOW_ACCESS_TOKEN_EXPIRE_SECONDS_ENV;