react-native-biometrics - 检查ios中是否添加了另一个faceid

问题描述 投票:0回答:1

假设我在手机上设置了 FaceId。然后我在应用程序中注册了生物识别。一切正常。但是现在,当我添加另一个 FaceId,并且当我尝试再次登录时,它应该能够检测到已添加新的 FaceId,并且应该给我一个错误或其他信息。如何通过

react-native-biometrics
库来实现这一点。在android中,可以检测是否添加了新指纹,但在删除指纹时则无法检测到。但在ios中无法检测faceid是否被重置或添加了新的。

例如。代码

const checkKeyExist = yield rnBiometrics.biometricKeysExist()
if (checkKeyExist.keysExist) {
  const epochTimeSeconds = Math.round(new Date().getTime() / 1000).toString()

  try {
    const createSignature = yield rnBiometrics.createSignature({
      promptMessage: 'Sign in',
      payload: epochTimeSeconds
    })
  } catch (err) {
    // Should catch that error here
  }
}

任何帮助将不胜感激

react-native
1个回答
0
投票

https://github.com/mergograiqevci/react-native-biometrics-changed

我认为这应该对你有帮助......通过这个库你可以检测生物识别的任何变化以反应本机

© www.soinside.com 2019 - 2024. All rights reserved.