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

Error : LAErrorAuthenticationFailed Authentication could not start because Touch ID has no enrolled fingers. #290

Closed MohamedAhmed122 closed 2 years ago

MohamedAhmed122 commented 3 years ago

@naoufal I followed the docs to implement the Touch ID but I have this error now

here is my code

 const clickHandler = () => {
TouchID.isSupported()
  .then(() => {
    console.log('yes'); // it console yes
    authenticate();
  })
  .catch(error => {
    Alert.alert('TouchID not supported');
  });
};

const authenticate = () => {
return TouchID.authenticate()
  .then(success => {
    Alert.alert('Authenticated Successfully');
  })
  .catch(error => {
    console.log(error); // it console Authentication could not start because Touch ID has no enrolled fingers.]
    Alert.alert(error.message);
  });

basically TouchID.isSupported() is Working but the TouchID.authenticate() 's not working

any clue what's the issue? or maybe solution