Saamer
Saamer

Reputation: 5109

React native Android - Authenticate using lock screen credentials like PIN, pattern, or password for non Biometric devices

I am working on a React Native Expo app to implement authentication. For Android, implementing Biometric authentication is not bad, but since a lot of devices still don't support biometrics, we have to implement secure sign in for them as well.

So, one of the requirements is to authenticate into the app using lock screen credentials like PIN, pattern, or password for devices that don't support Biometrics.

This is how its done in Native android in Java/Kotlin, but I haven't been able to find out how to do it natively using React Native.

Anyone have clues or suggestions, I would greatly appreciate it!

Upvotes: 1

Views: 2326

Answers (1)

Saamer
Saamer

Reputation: 5109

After weeks, I realized that if I updated to the latest version of the Expo SDK (38) and expo-local-authentication (9.2.0), the behavior was much more different than before when I had the issue.

Now for Android users, the library automatically gives the option to Use Pin or to Use Pattern depending on what you have set as backup to unlock your phone.

So, you don't need any 3rd party implementation of this anymore.

Upvotes: 0

Related Questions