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 =
|
const shouldRedirect =
|
||||||
!isAuthenticated &&
|
!isAuthenticated &&
|
||||||
autoLogin !== undefined &&
|
autoLogin !== undefined &&
|
||||||
!autoLogin &&
|
(!autoLogin || !isAutoLoginEnv);
|
||||||
!isAutoLoginEnv;
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const envRefreshTime = LANGFLOW_ACCESS_TOKEN_EXPIRE_SECONDS_ENV;
|
const envRefreshTime = LANGFLOW_ACCESS_TOKEN_EXPIRE_SECONDS_ENV;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue