I am developing a Hybrid application for which once the user enters the username and password initially after successful login the user is prompted with a dialog box asking whether to enable FaceID unlocking or not. If the User presses Yes next time the user will directly will be asked to scan the face instead of username and password. In iOS i am successful in doing this.
But how to implement the same in the Android using Cordova. Is there any specific plugin to enable it. If it is there please help me with the plugin or If not please specify the reason.
It is not possible to achieve the same capabilities of the Face Id to unlock an app on Android, so it wouldn't be possible even using Android native app.
Android uses the keymanager to achieve unlocking capabilities on apps, using primitive authentication methods. That allows you to use pin code or fingerprint authentication. At this time, face recognition is not available yet.
Apple and Face ID can allow this because Face ID is a primitive security method for the iPhone X, as the data used to unlock the device is kept in the Secure Enclave, in the same way that Touch ID data is.
My guess is that Android will follow Apple's steps and implement a solution like Face ID for authentication in one of Android's next versions (not on Android P), but until then, if you really must have face recognition to unlock your app, you can try using 3rd-party libraries, but none will fully achieve the Face Id native capabilitues
Sources:
I am using the plugin called cordova-plugin-keychain-touch-id and it works both for face and touch.
Be aware that some Android phone both have face and touch, and if both are enabled, it returns OK
in stead of touch
or face
.
Also with Android's OREO OS made it possible for older Android phone to login with face biometrics using something called "Trusted Face".
I am still having some issues with face login activation on the phones where both are enabled and with the trusted face, but maybe you (or someone else) have a solution for this :)
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With