Android Question Biometric login: Is automatic user selection possible?

MrKim

Well-Known Member
Licensed User
Longtime User
I have noticed there are now biometric libraries available.
In our situation maybe 5 to 10 users at the most. Tablets mounted so as the user approaches it will see them.
My question then is it possible for the tablet to pick the user from the face or does the user have to select his login before he is validated?
Also I am considering this for login to our APP. Not the device itself. I am assuming that is possible?
Thanks for any info.
 

TILogistic

Expert
Licensed User
Longtime User
yes.
On Android, the biometric API does not register users within your app. Fingerprint or face registration is handled by the operating system in the device settings.
Your application can only invoke authentication and receive a success or failure result.

Therefore, if you want to have registered users within your application, you must do so with your own internal account logic.
Biometrics only serves as an additional validation method.

Typical user registration flow in an app with biometrics:

1. Initial registration in the app:

The user creates an account with data such as email, username, and password.

You save this information in your database (local or remote).

2. Traditional login:

The user logs in with their email/password.

Once validated, you offer them the option to activate biometrics for future access.

3. Associate biometrics:

You use BiometricPrompt to authenticate the user with their fingerprint/face.

If authentication is successful, you store a secure token (e.g., in SharedPreferences encrypted with EncryptedSharedPreferences or in the Android Keystore).

This token indicates that the user can use biometric authentication instead of typing their password.

4. Future Access:

When the user opens the app, you invoke BiometricPrompt.

If biometric authentication is successful, you retrieve the token and automatically authenticate the user.

 
Upvote 0
Top