
Description
react-native-local-auth lets a React Native app ask the user to authenticate with Touch ID, falling back to the device passcode when Touch ID is unavailable or not set up. Most of its code comes from react-native-touch-id, and the passcode fallback was moved into this separate package because it did not belong in that one. The library provides a hasTouchID() check that returns a promise, so an app can see whether Touch ID is supported before it asks. The authenticate call returns an error code when authentication fails, and the README lists those codes, including LAErrorAuthenticationFailed, LAErrorUserCancel and LAErrorUserFallback, with what each one means. The install section explains how to link the library on Android, covering the MainActivity change, the settings.gradle lines and the build.gradle dependency. It is meant for React Native developers who want a local unlock step in their app.…
Highlights
- Touch ID with passcode fallback
- hasTouchID() support check
- Documented error codes for failed attempts
- Android linking steps in the README
Ratings & Reviews
No ratings yet
Be the first to rate react-native-local-auth.
People also visit
react-native-local-auth FAQ
What does react-native-local-auth do?
It asks the user to unlock with Touch ID and falls back to the device passcode when Touch ID is not available or not enrolled.
How do I check whether Touch ID is available?
Call hasTouchID(), which returns a promise. The usage section of the README documents it.
What errors can authentication return?
The README lists codes such as LAErrorAuthenticationFailed, LAErrorUserCancel and LAErrorUserFallback, each with a short explanation of why authentication did not succeed.
How do I install it on Android?
Follow the linking steps in the README: add the package to MainActivity, add the lines to android/settings.gradle, and add the dependency to android/app/build.gradle.
Where does the code come from?
Most of it comes from react-native-touch-id. The authors split the passcode fallback out into this package, as the README explains.
What are the best react-native-local-auth alternatives?
Popular alternatives to react-native-local-auth include react-native-touch-id, react-native-fingerprint-scanner and react-native-passcode-status. See all react-native-local-auth alternatives

















