Skip to content

Instantly share code, notes, and snippets.

@nutti
Created September 22, 2016 13:25
Show Gist options
  • Save nutti/8cdff0c0485c1df324639f453c3c5a80 to your computer and use it in GitHub Desktop.
Save nutti/8cdff0c0485c1df324639f453c3c5a80 to your computer and use it in GitHub Desktop.
[Electron] BrowserWindow の proxy ユーザ認証方法 ref: http://qiita.com/nutti/items/4614004fd28920ecd27c
var electron = require('electron');
var app = electron.app;
var BrowserWindow = electron.BrowserWindow;
// ログイン認証が発生した時に呼び出される処理
app.on('login', function(event, webContents, request, authInfo, callback) {
event.preventDefault();
// コールバック関数にユーザ名とパスワードを指定して呼び出す
callback(username, password);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment