naoufal / react-native-touch-id

React Native authentication with the native Touch ID popup.

Home Page:https://www.npmjs.com/package/react-native-touch-id

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[iOS] iPhone 5C is detected as "isSupported" but it doesn't have a TouchID

ljnjulien opened this issue · comments

  • Version React Native : 0.56.0
  • Version React-native-touch-id : 4.3.0
  • Device : iPhone 5C - 10.3.3

In our project, we're using the method "isSupported" to detect if the device (iOS or Android) supports the biometric functionality.

When we test on an iPhone 5C, isSupported returns "TouchID" although this device doesn't support the feature.

Is it an issue you're aware of ? Is there a workaround ?

The issue goes deeper than this. for Apple devices that do have touchID/faceID, it'll return as supported even though the user hasn't enrolled their fingerprint/enabled faceID or touchID so there's definitely a bug

@naoufal I've found that this bug was introduced in 4.2.0. 4.1.0 was the last version where this worked as intended

It's not ideal but I just did this to solve the issue:

if (biometryType === 'None') {
    throw {
        name: 'RCTTouchIDNotSupported',
        message: 'Device does not support Touch ID.',
    };
}

iphone 4s is returning "TouchID" from isSupported function even though it doesn't support TouchID