Skip to content

Commit 49845f5

Browse files
authored
Merge pull request #927 from vinu-deriv/fix-account-redirection
fix: account redirection from oidc
2 parents eeaf198 + 54b12c1 commit 49845f5

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
@@ -161,8 +161,12 @@ export const requestSingleSignOn = async () => {
161161

162162
if (shouldRequestSignOn) {
163163
const currentLanguage = Language.get();
164+
const urlParams = new URLSearchParams(window.location.search);
165+
const account = sessionStorage.getItem('account') ||
166+
urlParams.get('account') ||
167+
localStorage.getItem('account');
164168
await requestOidcAuthentication({
165-
redirectCallbackUri: `${window.location.origin}/${currentLanguage}/callback`,
169+
redirectCallbackUri: `${window.location.origin}/${currentLanguage}/callback?account=${account}`,
166170
});
167171
}
168172
};

0 commit comments

Comments
 (0)