Closed tujlaky closed 1 year ago
After doing more debugging the error is happening here:
https://github.com/NativeScript/plugins/blob/main/packages/biometrics/index.ios.ts#L152
I have checked the real result code which is -25300 or errSecItemNotFound.
Have you set a secret? if you are not using this to encrypt a secret, and have not previously called with the secret parameter, do not pass the fetchSecret flag.
Thanks, originally I migrated from the old fingerprint-auth package and I wanted to disable the Passcode option. This way it worked somehow maybe it was a leftover from before.
I still have an issue if I try without the pinfallback: true. In that case the verifyBiometric call is just returning with true without checking the Face ID or Passcode.
So this works:
.verifyBiometric({
message: "Use your fingerprint",
pinFallback: true
})
But this will resolve without any check:
.verifyBiometric({
message: "Use your fingerprint",
pinFallback: false
})
So if I understand correctly currently not possible to have a Face ID auth without the option to fallback to Passcode.
Sorry, I have figured out.
.verifyBiometric({
message: "Use your fingerprint",
pinFallback: true,
fallbackMessage: 'Enter password',
ios: {
customFallback: true,
},
})
I would say the pinFallback true is misleading in this case.
One more step is needed for the real solution:
.verifyBiometric({
pinFallback: isIOS,
ios: {
customFallback: true, // This will only work if pinFallback is true on iOS
},
})
With this I can achieve what was previously possible with the old plugin: allow only to use biometric authentications.
On iOS 16.6 I have started to see the following error when I am trying to call verifyBiometric:
I am using the plugin in the following way:
I am using the latest version of the@nativescript/biometrics plugin (1.3.1)