This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {session: {webRequest}} = mainWindow.webContents; | |
const filter = { | |
urls: [ | |
'http://localhost/keycloak-redirect*' | |
] | |
}; | |
webRequest.onBeforeRequest(filter, async ({url}) => { | |
const params = url.slice(url.indexOf('#')); | |
mainWindow.loadURL('file://' + path.join(__dirname, 'index.html') + params); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Keycloak config | |
var keycloak = new Keycloak({ | |
url: 'https://keycloak-server/auth', | |
realm: 'myrealm', | |
clientId: 'myapp' | |
}); | |
// Keycloak initConfig | |
keycloak.init({ | |
checkLoginIframe: false, |