Home > Software design >  can i make a firebese model that has a user and the data of that user with authentication in that sa
can i make a firebese model that has a user and the data of that user with authentication in that sa

Time:02-20

I am trying to make a db model on fire base but I didn't understand the user authentication quite yet in mongo db you can make a document that has all the user data like email for example and passwords in addition to that user data, but in firebase the user authentication is a separate data base , can i make users document that include users data and authentication with in the fire cloud db ? or at least can I connect AUTH and db together ?

CodePudding user response:

Firebase Authentication handles everything from hashing passwords to storing credentials and you don't have to store anything in a database. It also generates a unique UID for each user that can be used to identify user specific data in a database.

For example, if you have a collection "posts" then you can store the author's UID along with post data.

Also check: Firestore data modeling with more than one collection for each user

  • Related