Skip to content

Commit

Permalink
nvm
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiyangzheng committed Dec 4, 2024
1 parent 6b8014b commit c14df2f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions apps/web/src/context/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,7 @@ export const AuthProvider = ({ children }: any) => {
DefaultService.appControllerLogout().then(() => setUser(undefined));
// Don't redirect if we are already on the signin page since it will cause a loop
if (router.pathname !== '/signin') {
// there can be a case where we push to another page before the logout is complete
while (router.pathname !== '/signin') {
router.push('/signin');
}
router.replace('/signin');
}
};

Expand Down

0 comments on commit c14df2f

Please sign in to comment.