Configuring the Authorization Extension
Before the extension can enforce your authorization logic, you'll need to configure how it will behave during the login transaction. Your configuration settings will be captured in a rule that's executed during runtime.
Configure the Extension
Open up the Authorization Extension, and click Configuration on the drop-down menu in the top right of the Authorization Dashboard.
This brings you to the Rule Configuration section of the Configuration page.
All of the changes you make in the sections under Token Contents, such as those related to groups, roles, and permissions, will be reflected in the rule you export at the completion of this step.
You can store authorization data like groups, roles, or permissions in the outgoing token issued by Auth0. Your application can then consume this information by inspecting the token and take appropriate actions based on the user's current authorization context.
To add groups, roles, and/or permissions information to the outgoing token, simply enable the slider next to the option you want included.
Storing too much data in the token may cause performance issues or even prevent the issuance of the token. Be sure to store only what you need. If you need a large amount of user data readily available, consider using persistence instead of adding the data to the token.
You might have users that receive groups, roles, or permissions from the identity provider (IdP) you're using, such as Active Directory. If you want to merge these items (to preserve them) with the ones defined in the Authorization Extension, make sure you enable the appropriate Passthrough options. Simply enable the slider next to the appropriate merges you want enabled.
If your authorization context is large (for example, the user might belong to many groups or have been granted many permissions), you might find it useful to store some of the authorization content in the users' profiles. This allows you to store less information in the token, which means you're less likely to see performance-related issues or even problems with token issuance. Persistence is the process by which you store groups, roles, and permissions information in the users' profiles.
Save Changes to Your Rule
Once you've configured your rule, click Publish Rule. This creates a rule for your tenant that executes after each user login.
View Your Rule
If you'd like to see the rule you've created, you can do so using the Dashboard.
You can open it up to see the exact rules configuration.