Skip to content

Commit

Permalink
fix: add returnTo parameter to Auth0 logout function
Browse files Browse the repository at this point in the history
  • Loading branch information
amalv committed Jan 9, 2024
1 parent 0027cd8 commit b0dbd27
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const useLogout = () => {
return useCallback(
(event: React.MouseEvent<HTMLLIElement>) => {
event.preventDefault();
logout();
logout({ logoutParams: { returnTo: window.location.origin } });
localStorage.removeItem("auth0.token");
},
[logout]
Expand Down

1 comment on commit b0dbd27

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.