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 476 forks source link

[ANDROID] Errors Catch And response Touch Failed #144

Open Toshihiro2010 opened 6 years ago

Toshihiro2010 commented 6 years ago

Hello , I have Problem Libary react-native-touch-id for Android.


TouchID.authenticate('to demo this react-native component', optionalConfigObject) .then(success => { Alert.alert('Alert','Authenticated Successfully'); }) .catch(error => { Alert.alert('Alert','Authentication Failed'); });

problem is touch Faield And click Cancel Error same same, I want separate Error Please

Thank you.

ronilitman commented 6 years ago

error.details will evaluate "cancelled" when you click on cancel, if the fingerprint is is failed the string will be "failed"