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
1 changed files with 4 additions and 1 deletions
|
@ -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…
Reference in a new issue