LocalAuthentication android setup

Please provide the following:

  1. SDK Version: 36
  2. Platforms(Android/iOS/web/all): Android

We are trying to implement fingerprint auth for android with LocalAuthentication. Does it only work with fingerprint? What if my android phone has only passcode set what should i do then in this case?

Per the documentation, you can call LocalAuthentication.hasHardwareAsync() to determine if at least one of the hardware options (facial or fingerprint) is available. When this resolves to false you can not use this API to authenticate the user.

What if my android phone has only passcode set what should i do then in this case?

Authenticate normally / fallback to a custom passcode. You can NOT use the phone/built-in passcode to authenticate.

LocalAuthentication is only meant to be additive. At any moment, the OS may revoke or disable it, for example via a system setting. You should always check isEnrolledAsync in order to see if the current user has enrolled fingerprints or facial data to begin with.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.