0

I am developing a React-Native Android app which requires biometrics authentication. Right now I am using 'react-native-keychain' library for that purpose. I integrated Fingerprint and everything works fine. But despite that I have saved Face unlock in my devices, I am not getting Face authentication as a supported type, only fingerprint. If I turn off Fingerprint from my device then I am getting nothing. I am wondering if there is anyway implementing Face authentication in Android. And if it is possible which devices support it ? I searched a lot, but didn't get clear answer. This is screenshot from 'react-native-keychain' docs.'react-native-keychain docs'

1 Answers1

0

I am using react-native-touch-id for my production app and it's something you can try. You can clearly check if faceid is supported for a device and decide accordingly.

const optionalConfigObject = {
      unifiedErrors: false // use unified error messages (default false)
      passcodeFallback: false // if true is passed, itwill allow isSupported to return an error if the device is not enrolled in touch id/face id etc. Otherwise, it will just tell you what method is supported, even if the user is not enrolled.  (default false)
    }
     
    TouchID.isSupported(optionalConfigObject)
      .then(biometryType => {
        // Success code
        if (biometryType === 'FaceID') {
            console.log('FaceID is supported.');
        } else {
            console.log('TouchID is supported.');
        }
      })
      .catch(error => {
        // Failure code
        console.log(error);
      });
  • Thanks for the answer. So with this library I can prompt Face unlock for Android devices ? (if has supports). I just want to know it is possible or not add Face authentication for Android devices. – Nazim Musa Aug 24 '22 at 15:21
  • @NazimMusa faceid is working for iOS but for android, it's only touchID with this library. We have also tried [react-native-biometrics](https://github.com/SelfLender/react-native-biometrics) which also says faceID for iOS only. Sorry I couldn't help. – Bhishak Sanyal Aug 25 '22 at 06:44
  • Not a problem! Thanks for the answer again. – Nazim Musa Aug 25 '22 at 16:12