SelfLender / react-native-biometrics

React Native module for iOS and Android biometrics
MIT License
664 stars 228 forks source link

[Resolved] Passcode for IOS and Pin for Android And Custom SubTitle & Description for Android #257

Open rohitiglas opened 1 year ago

rohitiglas commented 1 year ago

Hi Guy's ,

I was facing the issue of Passcode was not working for IOS after the wrong attempt.After upgrade the library PIN is working for Android but for IOS passcode is still not working.

I am using the createSignature() function when login with FaceID/Fingerprint and createSignature() is not supporting the Passcode prompt after the wrong attempt.

So I have made some native changes for IOS and created a patch. Hope It will help you and You can save your time.

Note: In the below patch, Custom SubTitle and Description for Android is also added .

You can use it like

const rnBiometrics = new ReactNativeBiometrics()

rnBiometrics.createSignature({ promptMessage: 'Sign in', subTitle:'Your SubTitle',
description:'Add Description'.
payload: payload }) .then((resultObject) => { const { success, signature } = resultObject

if (success) {
  console.log(signature)
  verifySignatureWithServer(signature, payload)
}

})

yXw0Y

iphone-x-requires-passcode-to-enable-face-id-1200x1200

yarn patch-package

react-native-biometrics+3.0.1.patch

Happy Coding 😊

mshakirkhan commented 9 months ago

Hi, I think this issue still exists, I am facing the same issue. I am using version 3.0.1.