react-native-touch-id icon indicating copy to clipboard operation
react-native-touch-id copied to clipboard

Not Detecting TouchID not enrolled

Open skyshine999 opened this issue 5 years ago • 4 comments

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

skyshine999 avatar Jul 03 '19 06:07 skyshine999

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

bryantee avatar Jul 10 '19 01:07 bryantee

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.

JeffreyLeeDave avatar Jul 11 '19 19:07 JeffreyLeeDave

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

JeffreyLeeDave avatar Jul 11 '19 20:07 JeffreyLeeDave

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.

JeffreyLeeDave avatar Jul 11 '19 21:07 JeffreyLeeDave