SDA-4052 SDA should load URL if browser login enabled and there is no SSO

This commit is contained in:
sbenmoussati 2023-04-07 12:08:37 +02:00 committed by Salah Benmoussati
parent 274f0772a2
commit c5e171e116

View File

@ -692,11 +692,20 @@ const loadPodUrl = (proxyLogin = false) => {
logger.info('main-api-handler:', 'check auth response', authResponse);
if (authResponse.authenticationType === 'sso') {
logger.info(
'main-api-handler:',
'browser login is enabled - logging in',
'main-api-handler: browser login is enabled - logging in',
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) => {