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

[Android]: TouchID not supported when testing on a device with fingerprint #221

Open e55o opened 5 years ago

e55o commented 5 years ago

i am using:

    "react": "16.8.0",
    "react-native": "^0.59.3",

TouchID.isSupported() is always failing. I tried it on Samsung S8 and Huawei P10, both have fingerprint capabilities

lincolnbf commented 5 years ago

They have fingerprints inserted in the cellphone database?

e55o commented 5 years ago

sure they have

lincolnbf commented 5 years ago

In my case, android devices returns 'true' if they have support. iOS returns 'TouchID' or 'FaceID'. I did an workaround to make it work properly checking this things. I don't know if it's the case of you.

univalchemist commented 5 years ago

Any solution?

lincolnbf commented 5 years ago

@ligwang my answer above shows the solution... android returns true or false, ios returns TouchID or FaceID as literal strings... you just have to work with this returns.

ghost commented 4 years ago

In TouchID.isSupported(). I have got the touch id error always. image

ghost commented 4 years ago

image

ghost commented 4 years ago

Could you give me the solution?

Hamza-Khurshid commented 4 years ago

@ligwang my answer above shows the solution... android returns true or false, ios returns TouchID or FaceID as literal strings... you just have to work with this returns.

As I do some work when TouchID is supported and other work when FaceID is supported. How am I supposed to differentiate between two of them if isSupported() always returns true rather than literal strings.

lincolnbf commented 4 years ago

@ligwang my answer above shows the solution... android returns true or false, ios returns TouchID or FaceID as literal strings... you just have to work with this returns.

As I do some work when TouchID is supported and other work when FaceID is supported. How am I supposed to differentiate between two of them if isSupported() always returns true rather than literal strings.

I don't know if the lib have a method to separate FaceID from TouchID. If you figure out to do this somehow, please comment the solution. Anyway, i don't know if there is another lib that can do a better implementation of fingerprint support...

samaneh-kamalian commented 4 years ago

Hi.I use react-native 0.60 my mobile is Samsung Galaxy S5. when I use isSupported of react-native-touch-id it returns NOT_PRESENT. I search and found this stackoverflow question https://stackoverflow.com/questions/37935959/android-m-fingerprintmanager-ishardwaredetected-returns-false-on-a-samsung-gal. could you please solve this problem?