From the course: React: Cloud-Powered Apps with Firebase
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Setting Firebase custom claims
From the course: React: Cloud-Powered Apps with Firebase
Setting Firebase custom claims
- [Instructor] Our application will have one admin user. So let's create that manually through the Firebase console. I recommend that you create an email account for your particular admin user. My admin user will be thegrid.manager@gmail.com, and let's set a password here. Great, now that user is created. It is currently not possible to add custom claims from the Firebase console. So generally there are a few ways to do it. One way is to add custom claims when a specific user is created, we can use Firebase Cloud functions to add a trigger to watch for such users. Another way to do it is to do it through the command line, which is perfectly fine as well. We will be using the Firebase Admin SDK, which will let us interact with Firebase from privileged environments to perform actions like adding custom claims and read and write to our database with full admin privileges. You can perform similar actions as if you're in…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
Firebase ID tokens6m
-
(Locked)
Setting Firebase custom claims6m 22s
-
(Locked)
Admin interface: Users page8m 37s
-
(Locked)
Admin interface: Read user collection5m 41s
-
(Locked)
Admin interface: Render user collection2m 32s
-
(Locked)
Challenge: View user profile with admin31s
-
(Locked)
Solution: View user profile with admin1m 48s
-
-
-
-