[英]How do I check if a user is already exist in firebase Authentication using flutter?
I'm trying to make Firebase phone auth.我正在尝试对 Firebase 进行电话验证。 I have a situation when a user enters a phone number, then I user verify phone number then sent code and add this user to Authentication users in Firebase console and he has unique UID.
我有一种情况,用户输入电话号码,然后我用户验证电话号码,然后发送代码并将此用户添加到 Firebase 控制台中的身份验证用户,他具有唯一的 UID。 BUT when I removed the app and install it again, then I press again the same phone number and I get again a SMS although this user already exists in the Authentication table in the Firebase console.
但是,当我删除该应用程序并再次安装它时,我再次按下相同的电话号码并再次收到一条短信,尽管该用户已经存在于 Firebase 控制台的身份验证表中。
BUT when I removed the app and install it again, then I press again the same phone number and I get again a SMS although this user already exists in the Authentication table in the Firebase console.
但是,当我删除该应用程序并再次安装它时,我再次按下相同的电话号码并再次收到一条短信,尽管该用户已经存在于 Firebase 控制台的身份验证表中。
That's the expected behavior since your user already has an account.这是预期的行为,因为您的用户已经有一个帐户。 If you want to check if a user already exists, then you have to save that information either in Firestore or in the Realtime Database , and then simply perform a query to check if a particular phone number already exists.
如果您想检查用户是否已存在,则必须将该信息保存在Firestore或实时数据库中,然后只需执行查询以检查特定电话号码是否已存在。 Unfortunately, you cannot check that in the Firebase console.
遗憾的是,您无法在 Firebase 控制台中进行检查。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.