From b0dbd27e008c01eb735900abc1d7840b1467b88e Mon Sep 17 00:00:00 2001 From: amalv <1252707+amalv@users.noreply.github.com> Date: Tue, 9 Jan 2024 10:06:24 +0100 Subject: [PATCH] fix: add returnTo parameter to Auth0 logout function --- .../components/UserAuthentication/UserAuthentication.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/LibraryPage/components/UserAuthentication/UserAuthentication.tsx b/src/components/LibraryPage/components/UserAuthentication/UserAuthentication.tsx index 755c8c0..9f2f26f 100644 --- a/src/components/LibraryPage/components/UserAuthentication/UserAuthentication.tsx +++ b/src/components/LibraryPage/components/UserAuthentication/UserAuthentication.tsx @@ -69,7 +69,7 @@ const useLogout = () => { return useCallback( (event: React.MouseEvent) => { event.preventDefault(); - logout(); + logout({ logoutParams: { returnTo: window.location.origin } }); localStorage.removeItem("auth0.token"); }, [logout]