Open ramuta opened 3 years ago
definitely not!
requestBioAuth()
rejects the promise if authentication fails, so try adding a .catch()
block and see if it's throwing some error.
I do have a try/catch block, exactly as it is in the README:
try {
await RNBiometrics.requestBioAuth("prompt-title", "prompt-message");
// stuff to do when authenticated
// ...
} catch (error) {
// stuff to do when auth failed
// ...
}
But no error shows up when the PIN is entered... 🤔
When I click the "Use Password" button, a new PIN screen shows up (it takes up the whole screen). I have a feeling that this in some way "breaks" the connection with my app and does not return anything back to it. It may be due to the specific Android flavour that I use...
I'll need to try this out on some more Android devices.
it will be helpful if you can post some details about the device, android version, etc for me to try and reproduce. It works alright on the android emulator + some devices that we have tested on.
The device is OnePlus 3 (A3003) with Android 9
I've tested the PIN login in the simulator and it works. So the problem is not in my app code, but in my phone, I guess...
I've tested the PIN login in the simulator and it works. So the problem is not in my app code, but in my phone, I guess...
I second this, it's also happening on a Galaxy S7. Physical device, of course. At this point I do think it's a bug/incompatibility with custom UIs since it seems to be working a-ok on plain android devices, such as simulators.
At this point I do think it's a bug/incompatibility with custom UIs
this is most likely the case.
I've released an alpha version (1.5.0-alpha.0
) with an alpha version of the biometrics jetpack library. Let me know if it works for you guys
found a bug report on google's issue tracker - https://issuetracker.google.com/issues/142409713
can you guys try toggling 'Don't keep activities' in developer settings and try the biometric prompt?
At this point I do think it's a bug/incompatibility with custom UIs
this is most likely the case.
I've released an alpha version (
1.5.0-alpha.0
) with an alpha version of the biometrics jetpack library. Let me know if it works for you guys
Great, thanks for that!. I'll test it and let you guys know shortly. I can confirm that this seems to happen with phones with custom UI's, I got my hands on a Nexus with pure android and it seems to be working just fine.
Quick update: I tested the alpha and had no luck, sadly. Still the same behaviour. Toggling the 'don't keep activities' option makes the app reset itself, basically, after entering the password.
this issue is most likely fixed with the new alpha. Its mentioned in the changelog here : https://developer.android.com/jetpack/androidx/releases/biometric#1.2.0-alpha04
I got one solution for getting Device Pin/Password in Android after 2 - 3 times wrong Fingerprint. Please follow above steps to achieve this.
When a fingerprint prompt shows up and user chooses to enter a PIN number instead of a fingerprint, nothing happens (even if the PIN is correct). The
requestBioAuth()
function does not return anything, not evenfalse
...Is this intended behaviour?