diff --git a/web/lib/provider/session.js b/web/lib/provider/session.js index 2bbe4b94339..762daa78598 100644 --- a/web/lib/provider/session.js +++ b/web/lib/provider/session.js @@ -48,7 +48,7 @@ const AuthProvider = ({ children }) => { dispatch(setStoreVersion('')) dispatch(setAuthToken('')) - router.push('/login') + router.push('/ui/login') } useEffect(() => { @@ -64,7 +64,7 @@ const AuthProvider = ({ children }) => { dispatch(setAuthToken(token)) dispatch(initialVersion()) } else { - router.replace('/login') + router.push('/ui/login') } } } diff --git a/web/lib/utils/axios/checkStatus.ts b/web/lib/utils/axios/checkStatus.ts index dc656353c91..9073345feb9 100644 --- a/web/lib/utils/axios/checkStatus.ts +++ b/web/lib/utils/axios/checkStatus.ts @@ -44,7 +44,7 @@ export function checkStatus(status: number, msg: string, errorMessageMode: Error localStorage.removeItem('accessToken') localStorage.removeItem('version') - Router().replace('/login') + Router().push('/ui/login') break case 403: