Home > other >  How does FireBase detect the existence of an user
How does FireBase detect the existence of an user

Time:11-09

Let say that we have a million users registered in an app that uses Firebase Authe, so when a user log in, how this process works? Because is needed to use his Unique Id, so, how does Google check if that Id exists? Because it cannot realize an intelligent search by index, so it just checks one by one?

CodePudding user response:

How does Google check if that ID exists?

It doesn't. If you need to check if a particular ID already exists, you have to check that. There is no need to check by default if an ID exists since Firebase Auth IDs are unique.

Edit:

I couldn't understand Alex, let says that a user has an id of "123456", so when a User logs in to have access to his info, does not Google auth have to check if this user Id is in the database?

Firebase authentication is not related to any database. If you saved in the authentication process user data into a database as Cloud Firestore or the Realtime Database, and if you want later on to check if a particular ID already exists, you have to write code for that.

  • Related