mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-27 01:11:13 -06:00
SDA-4052 SDA should load URL if browser login enabled and there is no SSO
This commit is contained in:
parent
274f0772a2
commit
c5e171e116
@ -692,11 +692,20 @@ const loadPodUrl = (proxyLogin = false) => {
|
|||||||
logger.info('main-api-handler:', 'check auth response', authResponse);
|
logger.info('main-api-handler:', 'check auth response', authResponse);
|
||||||
if (authResponse.authenticationType === 'sso') {
|
if (authResponse.authenticationType === 'sso') {
|
||||||
logger.info(
|
logger.info(
|
||||||
'main-api-handler:',
|
'main-api-handler: browser login is enabled - logging in',
|
||||||
'browser login is enabled - logging in',
|
|
||||||
loginUrl,
|
loginUrl,
|
||||||
);
|
);
|
||||||
await shell.openExternal(loginUrl);
|
await shell.openExternal(loginUrl);
|
||||||
|
} else {
|
||||||
|
logger.info(
|
||||||
|
'main-api-handler: no SSO - loading main window with',
|
||||||
|
formattedPodUrl,
|
||||||
|
);
|
||||||
|
const mainWebContents = windowHandler.getMainWebContents();
|
||||||
|
if (mainWebContents && !mainWebContents.isDestroyed()) {
|
||||||
|
windowHandler.setMainWindowOrigin(formattedPodUrl);
|
||||||
|
mainWebContents.loadURL(formattedPodUrl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(async (error) => {
|
.catch(async (error) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user