Skip to content

Android: BIOMETRY_ANY fails with face recognition (CryptoFailedException: User not authenticated) #787

Description

@gvamvoukas

Description

Hi, I’ve updated react-native-keychain to the latest version and I’m facing an issue on Android related to biometric authentication.

In previous versions, we were using accessControl: ACCESS_CONTROL.BIOMETRY_ANY.

On Android, this triggered only fingerprint authentication and worked correctly.

After updating, ACCESS_CONTROL.BIOMETRY_ANY now allows both fingerprint and face recognition. When the user selects face recognition, the operation fails with the following error:

com.oblador.keychain.exceptions.CryptoFailedException: Wrapped error: User not authenticated

Fingerprint authentication works as expected.

We also tried using accessControl: ACCESS_CONTROL.BIOMETRY_ANY_OR_DEVICE_PASSCODE.

This works correctly with only fingerprint but enables device passcode fallback, which we do not want.

Steps to reproduce

Use react-native-keychain with accessControl set to ACCESS_CONTROL.BIOMETRY_ANY.
When prompted for authentication, select face recognition.
Observe the error indicating that the user is not authenticated.
If fingerprint is selected instead, the operation succeeds.

Snack or a link to a repository

no link

React Native Keychain version

10.0.0

React Native version

0.83.1

Platforms

Android

Workflow

React Native (without Expo)

Architecture

Fabric (New Architecture)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions