-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catch exception during biometrics process and fallback to PIN dialog in this case. #1610
Conversation
…delete keys explicitly
@@ -50,7 +49,13 @@ final class LoginService { | |||
await secureStorage.write(key: pinStorageKey, value: pin); | |||
} | |||
|
|||
Future<void> clearPin() => secureStorage.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was dangerous, it clears the entire secure storage associated with the application. This was harmless now, as we don't store anything else currently, but later we intend to store the account seeds there too.
Future<bool> localAuthenticate(String localizedReason, [bool stickyAuth = false]) { | ||
try { | ||
return localAuthentication.authenticate( | ||
localizedReason: localizedReason, | ||
options: AuthenticationOptions(useErrorDialogs: false, stickyAuth: stickyAuth), | ||
); | ||
} catch (e, s) { | ||
Log.e('$e', 'LoginStore', s); | ||
return Future.value(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might have been the reason that on some phones the authentication didn't work any more. We swallowed the exception, and returned false for authentication failed.
No description provided.