react-native-passcode-auth icon indicating copy to clipboard operation
react-native-passcode-auth copied to clipboard

opens TouchID, not passcode

Open davidskaarup opened this issue 9 years ago • 5 comments

When I call PasscodeAuth.authenticate I don't get the passcode screen, but instead the TouchID dialog and can validate with my fingerprint. I might be misunderstanding something, but I thought this should launch passcode directly and you should use react-native-touchid for touch validation.

If I select "Enter passcode" after a failed touch validation the passcode screen opens.

davidskaarup avatar Jan 17 '16 00:01 davidskaarup

@davidskaarup After some searching I found out that when TouchID is enabled (on the device) it is impossible to get only the passcode screen. (without getting the TouchID dialog first). The best solution would be to create a custom password screen for your app.

DannyvanderJagt avatar Mar 24 '16 10:03 DannyvanderJagt

@DannyvanderJagt Thanks for the answer. If I understand correctly that means that it is actually better to use this component for validation over react-native-touchid since it automatically launches passcode or touchid depending on what the device supports.

davidskaarup avatar Mar 25 '16 20:03 davidskaarup

@davidskaarup I looked at the source code and it looks like that this component is created as fallback for react-native-touch-id. When touch-id is not supported or activated this component can be used to provide the passcode screen. However I found the component: react-native-local-auth (a fork of react-native-touch-id) which combines touch-id and the password screen as fallback in one component. It also supports more features like touch-id only and the option to disallow enter password fallback.

DannyvanderJagt avatar Mar 26 '16 09:03 DannyvanderJagt

@davidskaarup Good catch. I think it would be nice to note that somewhere in the docs, as the required combination of try-touch-ID-first-and-only-then-fall-back-to-passcode is a little misleading. That said, this is a great component and it's really useful.

alexandergunnarson avatar Aug 06 '16 06:08 alexandergunnarson

@davidskaarup I looked at the source code and it looks like that this component is created as fallback for react-native-touch-id. When touch-id is not supported or activated this component can be used to provide the passcode screen. However I found the component: react-native-local-auth (a fork of react-native-touch-id) which combines touch-id and the password screen as fallback in one component. It also supports more features like touch-id only and the option to disallow enter password fallback.

@DannyvanderJagt Finally i seen your comment. You are legend bro i tried many packages react-native-biometrics,react-native-finger-print-scanner ,react-native-Touch ID , React-native-passcode-auth but not happy .This react-native-local-auth looks like phone pay lock behaviour.

Krish143git avatar May 19 '22 13:05 Krish143git