Issue
I am using firebase in my angular project, I want to know few things regarding angular firebase login and authentication. Is it possible to store user name, user role in authentication?
Solution
Firebase Authentication does contain a few "profile fields" but Firebase documents that those fields are there for historical purposes and that it is recommended to use a database (e.g. Firestore or RTDB) for your app to store "profile data".
Though you can also store "user role" information in the database, this will put additional security constraints on the location in the database where you store such information. You do not want to let "any authenticated user" update their own role information. Rather than storing "user role" information in Firestore or RTDB (or some other database), a recommended approach is to use Custom Claims in Firebase Authentication.
Answered By - Greg Fenton
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.