naoufal / react-native-touch-id

React Native authentication with the native Touch ID popup.
https://www.npmjs.com/package/react-native-touch-id
1.47k stars 477 forks source link

passcodeFallback related issue #282

Open vaibhav813 opened 3 years ago

vaibhav813 commented 3 years ago

in touch id when user press wrong fingerprint then popup shows enter passcode but when click on enter passcode it is not dispatch me to to passcode screen it throws an error LAErrorUserFallback even i make true passcodeFallback.my options which is used as

const optionalConfigObject = { fallbackLabel: 'Enter Passcode', unifiedErrors: false, passcodeFallback: true,

  };

TouchID.authenticate( 'This is a secure area, please authenticate yourself.', optionalConfigObject, ) .then(success => { // do something... }) .catch(error => { let errorCode = error.code;

      if (errorCode == 'LAErrorUserCancel') {
       // do something...
      } else if (errorCode == 'LAErrorPasscodeNotSet') {
       // do something...
      } else if (errorCode == 'LAErrorUserFallback') {
       // do something...
      } else if (errorCode == 'RCTTouchIDUnknownError') {
      // do something...
      } else {
        alert(error.message);
      }

      console.log('Error is ', error);
    });
enocmontiel commented 3 years ago

@vaibhav813 any update with this? I'm having the same issue and now with face masks, this is critical.

bs-farhan-shaikh commented 2 years ago

He has developed passcode separately https://github.com/naoufal/react-native-passcode-auth