Reset attempts and save last authentication on local passcode confirmation

This commit is contained in:
Diego Mello 2020-04-27 09:34:56 -03:00
parent ced514f712
commit 478ff9f181
1 changed files with 5 additions and 4 deletions

View File

@ -71,10 +71,7 @@ export const localAuthenticate = async(server) => {
} catch (e) {
// Do nothing
}
if (authResult?.success) {
await resetAttempts();
await saveLastLocalAuthenticationSession(server, serverRecord);
} else {
if (!authResult?.success) {
await localPasscode();
}
} else {
@ -83,6 +80,10 @@ export const localAuthenticate = async(server) => {
} else {
await localPasscode();
}
//
await resetAttempts();
await saveLastLocalAuthenticationSession(server, serverRecord);
}
}
};