Hi, thanks for the great article! I am interested in implementing role-based authentication with Firebase. Could you give some hints about how to extend the code you have provided to get a system able to manage administrators and normal users? Is this related to David's question below?
Web developer focused on Vuejs, The Quasar Framework, and Google's Firebase services. I am a contributor @quasarframework, with a focus on Firebase services.
Then will do an await call on the client to route the user based on perms set on the user's auth record coming back from Firebase auth.
This is a start but by no means a thorough approach as user roles can be extensive in an application. For an in-depth setup explanation of setCustomUserClaims try googling: 'role based auth with firebase admin tutorial'.
Hope that gave you enough to point you in the right direction.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi, thanks for the great article! I am interested in implementing role-based authentication with Firebase. Could you give some hints about how to extend the code you have provided to get a system able to manage administrators and normal users? Is this related to David's question below?
Hey @gicelte you need to implement the
setCustomUserClaims
on the server side of things via Firebase Admin.On my service side of things in my applications I just add a simple prop in the method call.
Then will do an await call on the client to route the user based on perms set on the user's auth record coming back from Firebase auth.
This is a start but by no means a thorough approach as user roles can be extensive in an application. For an in-depth setup explanation of
setCustomUserClaims
try googling: 'role based auth with firebase admin tutorial'.Hope that gave you enough to point you in the right direction.