Skip to content
Sung Bae edited this page Jul 15, 2019 · 8 revisions

For group-based access-level control, you need to install Authorization Extension. Go to Extensions page to install it.

Configure Authorization Extension. There are 3 steps of authorization. First, define permissions.

And create roles associated with the permission that we defined.

Then create groups that assume such roles.

Link a group with a relevant role.

Groups can be nested, and inherit the permission. This is a unique feature in Auth0 (not found in Amazon Cognito)

When a new user is created, add the user to a group, then all the roles and permissions are automatically assigned to the user.

As we have created the groups, roles and permissions, we now wish to make sure the user gets a JWT that contains scopes like "access:devel", "access:ea", "access:admin". This can be done by creating a "Rule" (See [SPA + API: Auth0 Configuration In this article] (https://auth0.com/docs/architecture-scenarios/spa-api/part-2) for more info)

By default, user info is hosted by Auth0's own DB. The details of user info is just enough for authentication purposes, not enough for implementing any advanced business logic. You can create your own DB (such as MySQL, MariaDB etc) with a User table that stays in sync with Auth0 User table and contains extra information of users. To do this, you need to create a "Hook".

Clone this wiki locally