Skip to content

Commit 54b12c1

Browse files
committed
fix: account redirection from oidc
1 parent 616c466 commit 54b12c1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/javascript/_common/auth.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,12 @@ export const requestSingleSignOn = async () => {
144144
// and if feature flag for OIDC Phase 2 is enabled - isAuthEnabled
145145
if (isLoggedInCookie && !isCallbackPage && !isEndpointPage && !isClientAccountsPopulated && isAuthEnabled) {
146146
const currentLanguage = Language.get();
147+
const urlParams = new URLSearchParams(window.location.search);
148+
const account = sessionStorage.getItem('account') ||
149+
urlParams.get('account') ||
150+
localStorage.getItem('account');
147151
await requestOidcAuthentication({
148-
redirectCallbackUri: `${window.location.origin}/${currentLanguage}/callback`,
152+
redirectCallbackUri: `${window.location.origin}/${currentLanguage}/callback?account=${account}`,
149153
});
150154
}
151155
};

0 commit comments

Comments
 (0)