Need help mit auth0-angular and permissions/roles

I use angular for a SPA. The login works very simple with the auth0-angular package.
But now I want to use permission or/and roles. For example, I want to display menu items depending on the roles. Does this work with the angular auth0-angular packet?
How can I implement this?

Hi @Latz,

Welcome to the Auth0 Community!

I understand you have questions about Permissions and Roles. I have also received your response in this related Community Topic: https://community.auth0.com/t/auth0-authorisation-for-a-regular-web-application/69607

Yes, the recommended approach in the above community topic works with your Angular Single Page Application.

Note that the Permissions and Roles are associated with the user and not the application. Because of this, the user profile stores these Roles and Permissions in storage. Therefore, being able to implement authorization into your application regardless of the type.

As mentioned in the related Community Topic, you have two options, namely with the Authorization Core or Authorization Extension.

When using the Authorization Extension, here are examples of how you can utilize Rules for authorization: https://auth0.com/docs/authorization/authorization-policies/sample-use-cases-rules-with-authorization

Please let me know if you have any questions. I’d be happy to clarify.

1 Like

Hi @rueben.tiow
thank you for the reply.
Is there an example somewhere for angular??
It is difficult to implement without an example.

Hi @Latz,

You can check out Auth0’s API Quickstarts with Authorization here: https://auth0.com/docs/quickstart/backend

The same quickstart is accessible on your Dashboard>APIs>YOUR_API>Quick Start.

The quickstarts should provide a good start in building out Permissions and Roles for your users.

Please let me know if there’s anything else I can do to help.

Thank you.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.