Open skyshine999 opened 5 years ago
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: https://github.com/naoufal/react-native-touch-id/issues/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.
Using this plugin i can check supporting and authentication but whether user enrolled touchid or not . How can we check it