SelfLender / react-native-biometrics

React Native module for iOS and Android biometrics
MIT License
661 stars 225 forks source link

createSignature doesn't open prompt #31

Closed JeffreyLeeDave closed 4 years ago

JeffreyLeeDave commented 5 years ago

So I am doing this in the code:

const result = await Biometrics.createSignature('Confirm Fingerprint', '');

I log the result and I get a signature coming back. However according to the docs when I call that function, I should get a prompt for fingerprint. And I don't get that. I don't see any errors either. It just automatically and successfully gives me the signature. Oddly enough, if I use the simplePrompt function and createKeys function, the prompt shows up.

I am testing this on the an iOS simulator. I also tried to copy the exact same code the example has in the docs and I still can't get this prompt to show up. What am I doing wrong?

JeffreyLeeDave commented 5 years ago

closing this issue as it is mentioned in the ReadMe:

NOTE: No biometric prompt is displayed in iOS simulators when attempting to retrieve keys for signature generation, it only occurs on actual devices.

JeffreyLeeDave commented 5 years ago

So I just checked this on the Pixel 3XL, when I call the function to authenticate with the set fingerprint here are the steps that happen:

  1. a fingerprint prompt comes up
  2. immediate right after it comes up, it automatically triggers the authentication and fails
  3. fingerprint prompt pops up, but I can't do anything with it
NappyPirate commented 5 years ago

I have not been able to re-create this issue on a Pixel 3XL emulator or on a physical Pixel 3XL. Is this still an issue? do you have anymore details?

JeffreyLeeDave commented 5 years ago

I am sorry, that's all I've got. Unfortunately I am not using this library anymore for a different reason. I think the only other detail I can give is that I have multiple fingerprints. But besides that I have nothing.

NappyPirate commented 4 years ago

Closing this issue since the Android implementation has been refactored to use the new BiometricPrompt API in version 2.0.0 and should hopefully resolve errors like these. We can re-open this issue if the problem persists.