add background auth and login

This commit is contained in:
riqo 2021-02-08 09:50:35 -06:00
commit c9f8ea6337
3 changed files with 46 additions and 67 deletions

View file

@ -1,22 +0,0 @@
const authUser = (event: any, arg: any) => {
let reply;
reply = {
id: "2",
email: "hernandeze@xavier.edu",
firstName: "Enrique",
lastName: "Hernandez",
access_token: "test-token"
}
if (arg === ['undefined']) {
reply = new Error('AUTH-FAILED');
}
event.reply('auth-user-reply', reply)
}
ipcMain.on('auth-user', authUser);
const authLogin = (event: any, arg: any) => {
console.log(arg)
event.reply('auth-login-reply', true)
}