Skip to content

Commit 1642bb9

Browse files
fixing params for SSo
1 parent c860176 commit 1642bb9

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/application/ApplicationThunks.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,9 @@ export const loadApplicationConfigThunk = () => async (dispatch: any, getState:
534534
}
535535

536536
if (standalone) {
537-
if (config.standaloneDashboardURL !== undefined && config.standaloneDashboardURL.length > 0) {
537+
if (urlParams.get('id')) {
538+
dispatch(setDashboardToLoadAfterConnecting(urlParams.get('id')));
539+
} else if (config.standaloneDashboardURL !== undefined && config.standaloneDashboardURL.length > 0) {
538540
dispatch(setDashboardToLoadAfterConnecting(config.standaloneDashboardURL));
539541
} else {
540542
dispatch(setDashboardToLoadAfterConnecting(`name:${config.standaloneDashboardName}`));
@@ -543,6 +545,7 @@ export const loadApplicationConfigThunk = () => async (dispatch: any, getState:
543545
}
544546
sessionStorage.removeItem('SSO_PARAMS_BEFORE_REDIRECT');
545547
});
548+
546549
dispatch(setWaitForSSO(false));
547550
if (!success) {
548551
alert('Unable to connect using SSO. See the browser console for more details.');
@@ -556,12 +559,12 @@ export const loadApplicationConfigThunk = () => async (dispatch: any, getState:
556559
return;
557560
}
558561
} else if (state.application.ssoEnabled && !state.application.waitForSSO && urlParams) {
559-
let paramsToStore = {};
560-
urlParams.forEach((value, key) => {
561-
paramsToStore[key] = value;
562-
});
563-
sessionStorage.setItem('SSO_PARAMS_BEFORE_REDIRECT', JSON.stringify(paramsToStore));
564-
}
562+
let paramsToStore = {};
563+
urlParams.forEach((value, key) => {
564+
paramsToStore[key] = value;
565+
});
566+
sessionStorage.setItem('SSO_PARAMS_BEFORE_REDIRECT', JSON.stringify(paramsToStore));
567+
}
565568

566569
if (standalone) {
567570
dispatch(initializeApplicationAsStandaloneThunk(config, paramsToSetAfterConnecting));

0 commit comments

Comments
 (0)