fix: logout redirection on auto-login off (#7171)

🐛 (authGuard/index.tsx): fix logic in shouldRedirect variable to correctly handle conditions for redirection based on authentication and auto login status
This commit is contained in:
Cristhian Zanforlin Lousa 2025-03-19 22:41:32 -03:00 committed by GitHub
commit 6f8720f61f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;