You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.catch(err=>console.log('ERROR on "choose_app_dir" event: ',err));
320
329
});
330
+
331
+
// for github oauth login in production, since cookies are not accessible through document.cookie on local filesystem, we need electron to grab the cookie that is set from oauth, this listens for an set cookie event from the renderer process then sends back the cookie
332
+
ipcMain.on('set_cookie',event=>{
333
+
session.defaultSession.cookies
334
+
.get({url: 'https://localhost:8081'})
335
+
.then(cookie=>{
336
+
console.log(cookie);
337
+
event.reply('give_cookie',cookie);
338
+
})
339
+
.catch(error=>{
340
+
console.log('Error giving cookies in set_cookie:',error);
341
+
});
342
+
});
343
+
344
+
// again for production, document.cookie is not accessible so we need this listener on main to delete the cookie on logout
0 commit comments