How to use the react-native-keychain.BIOMETRY_TYPE function in react-native-keychain

To help you get started, we’ve selected a few react-native-keychain examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Emurgo / yoroi-mobile / src / helpers / deviceSettings.js View on Github external
export const isBiometricEncryptionHardwareSupported = async () => {
  if (Platform.OS === 'android') {
    return await KeyStoreBridge.isFingerprintEncryptionHardwareSupported()
  } else if (Platform.OS === 'ios') {
    const supportedBiometrics = await Keychain.getSupportedBiometryType()
    return (
      supportedBiometrics === Keychain.BIOMETRY_TYPE.TOUCH_ID ||
      supportedBiometrics === Keychain.BIOMETRY_TYPE.FACE_ID
    )
  }

  throw new Error('Unsupported platform')
}
github pillarwallet / pillarwallet / src / screens / BiometricsPrompt / BiometricsPrompt.js View on Github external
const getBiometryImage = (biometryType: string) => {
  switch (biometryType) {
    case Keychain.BIOMETRY_TYPE.TOUCH_ID:
    case Keychain.BIOMETRY_TYPE.FINGERPRINT:
      return touchIdImageSource;
    case Keychain.BIOMETRY_TYPE.FACE_ID:
      return faceIdImageSource;
    default:
      return '';
  }
};
github Emurgo / yoroi-mobile / src / helpers / deviceSettings.js View on Github external
export const isBiometricEncryptionHardwareSupported = async () => {
  if (Platform.OS === 'android') {
    return await KeyStoreBridge.isFingerprintEncryptionHardwareSupported()
  } else if (Platform.OS === 'ios') {
    const supportedBiometrics = await Keychain.getSupportedBiometryType()
    return (
      supportedBiometrics === Keychain.BIOMETRY_TYPE.TOUCH_ID ||
      supportedBiometrics === Keychain.BIOMETRY_TYPE.FACE_ID
    )
  }

  throw new Error('Unsupported platform')
}