flutterdartfingerprintlocalauthentication

How to make server know what data to send depending on fingerprint flutter?


I want to replace the login to the app from username and password to fingerprint in flutter, so the user when have successful fingerprint he will see his information in the application (this information send from server). How I can manage that I want some thing to make this fingerprint connected with this user to get correct data from server ?. I use local_auth for fingerprint authentication but I have no idea to tell server this fingerprint is associated for this user.

I read some thing like this to handle this:

  1. when application installed for first time ask the user to enter (username and password) then save them is shared preference. (this page will appear only once).
  2. after that show screen that ask the user to login using fingerprint if it exist or ask him to create one if not exist.
  3. each time the user run the application only fingerprint is required if authenticated then get data from server by sending userId saved in shared preference to get data.

is there is any way better this way ?


Solution

  • Fingerprint is a User biometric data located in a secure place in the User phone. You cannot access these binary data. To send user data to your server, you must prompt them to manually enter their info. You can then protect their privacy in your app by protecting the app usage by Fingerprint or any other method you want