SelfLender / react-native-biometrics

React Native module for iOS and Android biometrics
MIT License
653 stars 222 forks source link

How to customise Biometrics - Giving options to user to either select Face ID or Touch ID? #213

Open xi2585-vardaanbhalla opened 1 year ago

xi2585-vardaanbhalla commented 1 year ago

Hi, I want to provide a custom authentication to the user, i.e., giving him options to select how he wants to log into my app - Face ID or Touch ID. How should I do it? Also, in Android only "Biometrics" is available. Is there a way to know if the android supports both Touch and Face? If yes, how can I customise authentication on Android?

jayfunk commented 1 year ago

Is this something that you want only for Android? I dont think that iOS devices have both TouchID and FaceID. I am not sure if this is possible, even on Android. We only specify the type of authenticators that the library allows and then the OS would determine what is available and enabled on the device. https://developer.android.com/reference/androidx/biometric/BiometricPrompt.PromptInfo.Builder#setAllowedAuthenticators(int)

griffinshuth commented 1 year ago

so back on 2.1.4 they were giving us options on which one we wanted to use either FaceId or TouchId and i just updated to 3.0.1 and it is only giving me the TouchId option for android now?

HaimAbeles commented 1 year ago

@griffinshuth @jayfunk @xi2585-vardaanbhalla Do you have any update? I also installed the library (3.0.1) and it does not offer me facial recognition please help me!

pratishthap commented 1 year ago

Having same issue. Face recognition not working on version 3.0.1

HaimAbeles commented 1 year ago

@pratishthap I looked into the matter, and it turns out that Android themselves have not allowed facial recognition to be used in recent years (because according to them, it is not secure enough because if you put a picture of the owner of the device in front of the camera, it unlocks the device), In iOS it allows to use both fingerprint and facial recognition.