In this article, you’re going to learn how to set user roles using Auth Custom Claims and store user data to the Cloud Firestore when a new Firebase user account is created.

In addition, I will be showing you how to guard routes based on user role when signing in.

Finally, I will show you how to get all the user accounts when the signed-in user has admin privileges and I will show you how to change user roles using callable Cloud…

Alex Kasongo

Hi, my name is Alex. I’m a front-end engineer, passionate for the web, responsive design, & typography.

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