Reputation: 85
I am using firebase auth for a project. Since we don't want to be in charge of handling passwords, and eventually want to add social login we're going to use FireBase.
We have an .NET WEB API set up right now with its own database. In this database some tables have reference to user's. Example: Order table would need a customer id.
Since we're only using Firebase Auth we're thinking about storing some user data in our database. Specifically: FirstName | LastName | Role.
Would it be okay to store the Firebase UID in our tables as well, or is the a different parameter we should be using?
Upvotes: 1
Views: 1297
Reputation: 7556
Yes, what you want is a unique identifier for each user and sounds like Firebase's auth UID is unique across the same project. Based on Firebase's document:
getUid()
Returns a string used to uniquely identify your user in your Firebase project's user database.
Also check this answer:
Is Firebase UID unique across multiple apps?
Upvotes: 2
Reputation: 317868
Yes, it's very common to store Firebase Auth UIDs in a database to store per-user information.
Upvotes: 1