add background auth and login
This commit is contained in:
parent
29f6b759f8
commit
c9f8ea6337
3 changed files with 46 additions and 67 deletions
|
|
@ -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)
|
||||
}
|
||||
Loading…
Reference in a new issue