Start a fresh OAuth2 session every launch (#258)

This commit is contained in:
Gregory Schier 2017-05-25 12:19:39 -07:00 committed by GitHub
parent 0c2b02c7fc
commit 20c7ecdd61

View File

@ -1,6 +1,9 @@
import electron from 'electron';
import uuid from 'uuid';
import querystring from 'querystring';
const AUTH_WINDOW_SESSION_ID = uuid.v4();
export function responseToObject (body, keys) {
let data = null;
try {
@ -32,7 +35,7 @@ export function authorizeUserInWindow (url, urlRegex = /.*/) {
const child = new electron.remote.BrowserWindow({
webPreferences: {
nodeIntegration: false,
partition: `persist:oauth2`
partition: `oauth2_${AUTH_WINDOW_SESSION_ID}`
},
show: false
});