Description
The following settings should allow for biometrics or device passcode:
const BASE_SECURE_WITH_AUTH_RNK_ACCESS_OPTIONS: BaseKeychainAccessOptions = {
accessControl: ACCESS_CONTROL.BIOMETRY_CURRENT_SET_OR_DEVICE_PASSCODE,
accessible: ACCESSIBLE.WHEN_UNLOCKED_THIS_DEVICE_ONLY,
authenticationType: AUTHENTICATION_TYPE.DEVICE_PASSCODE_OR_BIOMETRICS,
securityLevel: SECURITY_LEVEL.SECURE_HARDWARE,
};
This is generally the case. But when I set a key with FaceID, erase Face ID from my phone, and try to set that same key (or a new key), I receive the following error:
Error: The user name or passphrase you entered is not correct.
The only way to set the key again is to change accessControl to ACCESS_CONTROL.DEVICE_PASSCODE
Steps to reproduce
On iPhone 13:
- Set key with
ACCESS_CONTROL.BIOMETRY_CURRENT_SET_OR_DEVICE_PASSCODE
- Quit app
- Remove Face ID from device
- Open app
- Attempt to set same key (or a new key) with same settings
Snack or a link to a repository
https://github.com/TipLink/react-native-keychain-sandbox
React Native Keychain version
10.0.0
React Native version
0.76.9
Platforms
iOS
Workflow
Expo managed workflow
Architecture
Fabric (New Architecture)