Skip to content

Commit

Permalink
Try calling windowlocation inside timeout and after await (#139855)
Browse files Browse the repository at this point in the history
Co-authored-by: Garrett Rabian <[email protected]>
  • Loading branch information
ntsummers1 and gmrabian authored Dec 11, 2024
1 parent a36eb97 commit d4a3af6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions services/ui-src/src/hooks/authHooks/userProvider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ export const UserProvider = ({ children }) => {
setUser(null);
localStorage.removeItem("mdctcarts_session_exp");
await signOut();
window.location.href = "/admin";
} catch (error) {
console.log("error signing out: ", error); // eslint-disable-line no-console
}
});
window.location.href = config.POST_SIGNOUT_REDIRECT;
}, []);

const checkAuthState = useCallback(async () => {
Expand Down

0 comments on commit d4a3af6

Please sign in to comment.