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

Not Detecting TouchID not enrolled

skyshine999 opened this issue · comments

Using this plugin i can check supporting and authentication but whether user enrolled touchid or not . How can we check it

I second this. Would love if we could expose whether device is enrolled before I prompt user for authentication.

I honestly thought that isSupported was suppose to do that. I think there is a bug in this package. it's suppose to return a LAErrorTouchIDNotEnrolled error when this happens. I know for android it returns false when it's not enrolled.

Hey if you are still encountering this issue, look here:
#171

Basically you just need to pass in {passcodeFallback: false}. Technically it is in the documentation. It's the comment in the example provided here:
https://github.com/naoufal/react-native-touch-id#issupported

I don't know why that field is coupled with this error logic, but this is probably what caused a lot of people confusion

I will say though, one thing I hate about doing that is that I get a typescript error. This package is really weird the type for IsSupportedConfig does not have have passcodeFallback as a property.