Skip to Content
Serverless Web Applications with React and Firebase
book

Serverless Web Applications with React and Firebase

by Mayur Tanna, Harmeet Singh
April 2018
Intermediate to advanced content levelIntermediate to advanced
284 pages
6h 43m
English
Packt Publishing
Content preview from Serverless Web Applications with React and Firebase

Custom claims for admin access and security rules

As we saw earlier, Firebase Admin SDK supports defining custom attributes with the token. These custom attributes give the ability to define different levels of access, including role-based control to the app, which is enforced in an application's security rules.

We need to define the user roles in the following common cases:

  • Giving a user the admin role for accessing the resources
  • Assigning different groups to the user
  • Giving a user multi-level access such as Paid, Regular user, Managers, Support Team, and such

We can also define the rules based on the database where we need give limited access, such as we have database node helpdesk/tickets/all, where all the data tickets' data can be ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Web Applications with Firebase

Building Web Applications with Firebase

Gareth Brown
React Native in Action

React Native in Action

nader dabit, Nickie Buckner

Publisher Resources

ISBN: 9781788477413Supplemental Content