Add attributes to the token


I created my login and the authentication i get is from the auth0.
I work with Nodejs 16.
So, my backend gets the email and password, checks the user’s existence, and sends a token.
But, i need to add some attributes to this token like permission that exists only in my DB.
I don’t understand if i can do this.
I found an option to add some action, but how can i send the permission if the permission exists in my DB?

Thank you :smile:

Hey @eden.amram !

You could always add this data as user/app metadata and add as a custom claim in tokens by way of an Action.

It’s also possible to hit your own API from within an Action and carry out necessary logic to add the permissions that way.

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