From 1288f403eb952f36e9a504375dd0e469eeea4637 Mon Sep 17 00:00:00 2001 From: Dasuni Geeganage Date: Tue, 5 Mar 2024 13:51:11 +0530 Subject: [PATCH 1/3] Fix My Account logout issue --- apps/myaccount/src/hooks/use-sign-in.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/myaccount/src/hooks/use-sign-in.ts b/apps/myaccount/src/hooks/use-sign-in.ts index 835f8f31a6a..123fb368e50 100644 --- a/apps/myaccount/src/hooks/use-sign-in.ts +++ b/apps/myaccount/src/hooks/use-sign-in.ts @@ -349,13 +349,8 @@ const useSignIn = (): UseSignInInterface => { window["AppUtils"].getConfig().superTenantProxy ); } - - sessionStorage.setItem(LOGOUT_URL, logoutUrl); - } else { - logoutUrl = window["AppUtils"].getConfig().idpConfigs?.logoutEndpointURL; - logoutRedirectUrl = - window["AppUtils"].getConfig().clientOrigin + window["AppUtils"].getConfig().routes.login; } + sessionStorage.setItem(LOGOUT_URL, logoutUrl); getDecodedIDToken() .then(() => { From e226fb015df7530769c15e56d600fac98fdc8dde Mon Sep 17 00:00:00 2001 From: Dasuni Geeganage Date: Tue, 5 Mar 2024 13:55:52 +0530 Subject: [PATCH 2/3] Add changeset --- .changeset/cold-rivers-do.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/cold-rivers-do.md diff --git a/.changeset/cold-rivers-do.md b/.changeset/cold-rivers-do.md new file mode 100644 index 00000000000..129af421502 --- /dev/null +++ b/.changeset/cold-rivers-do.md @@ -0,0 +1,5 @@ +--- +"@wso2is/myaccount": patch +--- + +Fix my account logout issue From 4c6e95bbb996d1593781420e8a8dbb10d0fcc13f Mon Sep 17 00:00:00 2001 From: Dasuni Geeganage Date: Tue, 5 Mar 2024 14:44:04 +0530 Subject: [PATCH 3/3] Improve formatting --- apps/myaccount/src/hooks/use-sign-in.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/myaccount/src/hooks/use-sign-in.ts b/apps/myaccount/src/hooks/use-sign-in.ts index 123fb368e50..6a86e3a034f 100644 --- a/apps/myaccount/src/hooks/use-sign-in.ts +++ b/apps/myaccount/src/hooks/use-sign-in.ts @@ -350,6 +350,7 @@ const useSignIn = (): UseSignInInterface => { ); } } + sessionStorage.setItem(LOGOUT_URL, logoutUrl); getDecodedIDToken()