Hi,
I try to implement the fingerprint identification on my app, but I don’t get Something : how to let the fingerprint scanner always on ?
Here is my code :
async componentDidMount(){
if (this.state.fingerprintSupport){
await this.scanFinger();
}
}
async scanFinger() {
this.setState({ waitingFingerprint: true });
let result = await Fingerprint.authenticateAsync('Waiting for TouchID');
if (result.success) {
ToastAndroid.show('Success !', ToastAndroid.SHORT);
this.setState({ waitingFingerprint: false });
this.props.navigation.navigate('App');
}else {
ToastAndroid.show('Echec de l\'authentification !', ToastAndroid.SHORT);
this.setState({fingerprintFailedMsg: 'Unknown', waitingFingerprint: false,});
// await this.scanFinger();
}
}
If it is a succes for the first time, then it works, but if the first scan is not a success, then I can’t start again, and I must input a password.
How can I fix it please ?