What is the best way to handle auth with roles for my personal project?

I’m new to using Auth0 beyond just the basic start guide and needing advice on the best approach to take to get what I want to achieve.

What I am wanting to achieve is having my users register using my own styled register form and automatically be assigned a ‘subscriber’ role that gives them access to other pages of my app. Only people I sent this register link to, will be able to register.

Then I want an admin role to assign to myself to manage my app and access management only pages. I may in future upgrade the ‘subscriber’ role to make that user also a manager.

Everyone else will not be able to log in or register, they just view content as a regular user.

I’ve had trouble going through the docs to find the best way to use roles in the way that I want and understanding what I need to include to do so.

I’m building a fullstack react, express app. It’s also a hobby project to practice new tech on my own, so I’m really not looking to pay for services unless it reaches the point of generating income too.

Any help would be appreciated!

Hey there @emily_dev welcome to the community!

It sounds like you might be interested in Role Based Access Control (RBAC) - Typically, roles are added to tokens and used that way.

Hopefully this at least gives you an idea of what’s possible - Let us know if you have any follow up questions!

1 Like

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