Ssl certificate problem


#1

Hello guys, i included a webapp using in my electron app
this app requires https connection but when it loads it fails showing an error that indicates there is a problem with the https connection
I’m using electron 1.4.3
does anyone have an idea how to fix this?


#2

Are you trying to access your office internal URLs, Kind of kerberos/sentry authentication,
When you hit the same URL in new browser is it asking for username/password ? if yes try to add below lines in you main.js.For me below code worked well [both the option], may help you.

option1:

const {app, BrowserWindow} = require('electron');
const {session} = require('electron')
let mainWindow;
app.on('window-all-closed', function() {
  app.quit();
});

app.on('ready', function() {
  mainWindow = new BrowserWindow({width: 1024, height: 768 });
  session.defaultSession.allowNTLMCredentialsForDomains('*')
   mainWindow.loadURL('file://' + __dirname + '/browser.html')
  mainWindow.openDevTools();
});

Option:2

app.on('login', function(event, webContents, request, authInfo, callback) {
  event.preventDefault();
  callback('username', 'password');
})

#3

I’m using webview which runs as a separate process than my app and doesn’t has the same permissions
all i needed to do is to pass disablewebsecurity to and my problem was solved!