Firebase Auth doesn’t have a built-in roles concept. But you can implement your own roles via custom claims, and check for them using the Admin SDK. Take a look at my article on the subject. To verify that a user has a certain role, simply verify the ID token, and inspect the result to see if it contains the required custom claims.

You’re also welcome to tune into my I/O talk next week, where I’ll be diving deep into this use case.

Written by

Software engineer at Google. Enjoys working at the intersection of cloud, mobile and programming languages. Fan of all things tech and open source.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store