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:
parent
5fdc70b98c
commit
6f8720f61f
1 changed files with 1 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue