SelfLender / react-native-biometrics

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

Error generating public private keys in react-native-biometric #283

Open sumitgorwadiyaNord opened 7 months ago

sumitgorwadiyaNord commented 7 months ago
const bio2 = async () => {
    const rnBiometrics = new ReactNativeBiometrics();

    const {available} = await rnBiometrics.isSensorAvailable();

    console.log('available', available);

    if (available) {
      const {keysExist} = await rnBiometrics.biometricKeysExist();
      if (keysExist) {
        await rnBiometrics.deleteKeys();
      }
      const {success} = await rnBiometrics.simplePrompt({
        promptMessage: 'Confirm Face/FingerPrintId.',
      });
      console.log('success', success);
      if (success) {
        const {publicKey} = await rnBiometrics.createKeys();
        console.log('publicKey', publicKey);
      }
    }
  };

I above code i am face issue while rnBiometrics.createKeys(); this command is run.