I'm looking for the best practices regarding alternative authentication from our mobile app using fingerprint/touchID/FaceId.
We have the following architecture :
- Database : PostgreSQL
- Backend : REST API in .net core 2.2
- Clients :
- Angular2 web client
- A mobile app in Xamarin Forms <--- This is where magic should happens
For the moment, our clients authenticate to the REST API using username/password and receive a JWT token. The token is then attached to each secured request to the API.
What I'm trying to achieve
It is not always convenient for users to type the password from the mobile keyboard, so I'm trying to implement an easier way to login using biometric authentication such as fingerprint, faceID, touchID...
In my opinion, the workflow would be the following :
- User login from the mobile app the first time using username / password combination
- If the device allow it, ask the user to use biometric
- Generate a token an send it to the API
- store the token in Secure Storage (Keystore / Keychain)
- Use this token to login instead of password
We always have the classic username/password fallback.
I read a lot of post here on stackoverflow, and searched on Google for a solution but none seems to explain a use case with the backend security implementation.
I have implemented the fingerprint scanner on my app mobile and get the success callback. I'm using this library in my Xamarin project to get the biometric authentication : https://github.com/smstuebe/xamarin-fingerprint
Could you please advise me on how to implement it ? Is storing a common token between backend and client the best way ? Is the keystore/Keychain secure ? Am I missing something ?
Many thanks,
Regards