naoufal / react-native-touch-id

React Native authentication with the native Touch ID popup.

Home Page:https://www.npmjs.com/package/react-native-touch-id

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Android Fingerprint Gets NOT_AVAILABLE When Trying To Authenticate

JeffreyLeeDave opened this issue · comments

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

  1. Register fingerprint on device with right thumb
  2. Open app and was able to authenticate. I call isSupported and then authenticate. So both seems to work all right here.
  3. Delete fingerprint on device
  4. 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.
  5. Repeat step 1
  6. 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.