Skip to content

Critical Error: setGenericPassword fails on all new keys after resetting FaceID with BIOMETRY_CURRENT_SET_OR_DEVICE_PASSCODE #752

@jacksondoherty

Description

@jacksondoherty

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:

  1. Set key with ACCESS_CONTROL.BIOMETRY_CURRENT_SET_OR_DEVICE_PASSCODE
  2. Quit app
  3. Remove Face ID from device
  4. Open app
  5. 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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions