authentication - Getting a unique id after biometrics authentication in flutter
问题描述
In flutter, the local_auth plugin provides a way to authenticate users using biometrics. But it only returns a Future<bool>
response:
var localAuth = LocalAuthentication();
bool didAuthenticate =
await localAuth.authenticateWithBiometrics(
localizedReason: 'Please authenticate to show account balance');
I wonder if there is any way to retrieve some unique ID to know which user has logged into the system.
EDIT: In android, after authentication it returns a BiometricPrompt.AuthenticationResult
object which contain a MAC id. I am looking for something like that in flutter.
解决方案
我不知道您如何通过生物识别实现独特性。但这里的插件是基于设备的唯一 id 提供程序。
https://pub.dartlang.org/packages/unique_id
看一看
非常轻量级的插件,获取唯一id的单行代码
推荐阅读
- c# - 新项目中的 ASP.NET Core MSB4018
- python - 通过 Tensorflow model.compile() 使用具有两个以上参数的自定义损失函数
- python - 在python中导入随机数
- javascript - .NET Core 将变量从 C# 传递给 Javascript
- php - 反序列化对象时出现意外令牌:使用 Click and Drop API 时 - Royal Mail
- javascript - 如何在当前版本清理 textureCache A-frame?
- excel - 使用 Excel VBA 将 HTML 表格添加到 Word 文档中的书签
- python - 如何在函数内动态编码集合名称?
- fix-protocol - QuickFIX/J - 路由消息
- elasticsearch - 如何阅读索引并存储在 Elasticsearch 中的“Wikibooks”摘要并将其作为 jupyter notebook 上的快速文本库的输入?