我有一个非常早期的电子应用程序,我们正在使用的概念证明。我在我的文件中使用mainWindow.loadURL('https://example.com');
打开窗口,我们的内部应用程序。
我面临的问题是,这个网站使用SSO进行身份验证。
在Chrome / IE浏览器中,SSO在使用Windows身份验证时自动发生。
是否有可能告诉正在创建的电子浏览器窗口也使用此身份验证?
mainWindow = new BrowserWindow({
width: winState.width,
height: winState.height,
minWidth: 992,
minHeight: 500,
x: winState.x,
y: winState.y
});
// Set our menu
setMenu();
// Load main window that uses SSO
// When using Chrome or IE, windows authentication passes this without needing to prompt for the credentials.
mainWindow.loadURL('https://example.com');
字符串
1条答案
按热度按时间daolsyd01#
您可以使用
session.allowNTLMCredentialsForDomains('example.com')
这将允许BrowserWindow发送给定域的NTLM凭据。它还支持使用 * 的通配符,请在此处了解更多信息:https://electronjs.org/docs/api/session#sesallowntlmcredentialsfordomainsdomains字符串