Next.js API Routes RBAC

How to handle Roles and Permissions using Next.js API Routes?
How to decode authToken or what is best practice to get user roles / permissions ?
jwt.io says it is A256GCM encryption, and I am not sure what is the key to decrypt it

Hi @valentin.vad.sh,

Welcome to the Auth0 Community!

You are seeing an opaque token because you are not passing an audience parameter. More on that here: Why is my access token not a JWT? (Opaque Token)

As for RBAC; you can add the user’s roles to the token. There is an example here: