简体   繁体   English

如何让服务器知道根据指纹 flutter 发送哪些数据?

[英]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).我想将应用程序的登录名从用户名和密码替换为 flutter 中的指纹,所以当用户成功指纹时,他将在应用程序中看到他的信息(此信息从服务器发送)。 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.我使用local_auth进行指纹身份验证,但我不知道告诉服务器此指纹与此用户相关联。

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.每次用户运行应用程序时,如果经过身份验证,则只需要指纹,然后通过发送保存在共享首选项中的 userId 从服务器获取数据以获取数据。

is there is any way better this way?这种方式有什么更好的方法吗?

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然后,您可以通过指纹或您想要的任何其他方法保护应用程序的使用来保护他们在您的应用程序中的隐私

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM