简体   繁体   中英

How do I check if a user is already exist in firebase Authentication using flutter?

I'm trying to make Firebase phone auth. 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. 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.

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.

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. Unfortunately, you cannot check that in the Firebase console.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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