react-native-touch-id
react-native-touch-id copied to clipboard
Android Fingerprint Gets NOT_AVAILABLE When Trying To Authenticate
This happens in certain cases when a fingerprint has changed. I have reproduced this bug consistently with Moto E4 with Android v.7.1.1. Here are my steps
- Register fingerprint on device with right thumb
- Open app and was able to authenticate. I call
isSupported
and thenauthenticate
. So both seems to work all right here. - Delete fingerprint on device
- Open app to try to repeat step 2, but since
isSupported
doesn't succeed, I can't authenticate. Which is expected because no more fingerprint. - Repeat step 1
- Try step 2 again, gets error with code NOT_AVAILABLE
So here is the weird part. I know isSupported
succeeded. Otherwise, I wouldn't be able to get to my next screen that calls authenticated
. But when I do call authenticated
I get that error. Now if I delete the fingerprint I set in step 5 and set a different one with my left thumb instead, it works. This is a really weird bug.
I would like to add to this. I also experience the same issue when I don't have fingerprint enabled before I installed my app. After enabling it, I experience the same issue. Now if I delete and change the fingerprint again, it's all fine. It seems to me that with the Moto E4, authenticate screws up on the first fingerprint set after a state where it wasn't.
Oddly enough in addition to the steps provided by my first post, if I didn't do step 4 on my first post, then it work. So if I delete and update my fingerprint and then going back to app. It works.