mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-29 05:17:43 +00:00
Do not cancel keygen biometric prompt on failure (#1357)
Biometric authentication may very well fail a few times due to e.g. using the wrong finger, but that should not cancel the key generation flow. The BiometricAuthenticator UI gracefully handles the error case for us with an informative message. Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
db4683e0d6
commit
44d27333a7
@ -109,7 +109,10 @@ class SshKeyGenActivity : AppCompatActivity() {
|
||||
BiometricAuthenticator.authenticate(
|
||||
this@SshKeyGenActivity,
|
||||
R.string.biometric_prompt_title_ssh_keygen
|
||||
) { cont.resume(it) }
|
||||
) {
|
||||
// Do not cancel on failed attempts as these are handled by the authenticator UI.
|
||||
if (it !is BiometricAuthenticator.Result.Failure) cont.resume(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (result !is BiometricAuthenticator.Result.Success)
|
||||
|
Loading…
x
Reference in New Issue
Block a user