fix event for login
This commit is contained in:
parent
a958f53edc
commit
ccc5e67948
5 changed files with 12 additions and 13 deletions
|
|
@ -35,12 +35,13 @@ const authSession = async (_event, payload: string | UserCreds | null): Promise<
|
|||
|
||||
console.log('authenticating...');
|
||||
|
||||
backgroundMitt.on('auth-res', (res: string) => {
|
||||
backgroundMitt.once('auth-res', (res: string) => {
|
||||
|
||||
if (res === 'locked') {
|
||||
reject(res);
|
||||
} else {
|
||||
auth = true;
|
||||
console.log(res);
|
||||
resolve(res);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue