JWT Custom claim not added to accessToken with either authentication rule or action

I am trying to add custom claim to connect to Hasura. I have been stuck on properly configuring the jwt to include the hasura role and unable to add anything to it. I am using jwt.io to test and have tried the exact recommended config with both the action and rules approach.

I ran into a similar issue at one point. The issue in my case was I did not add a namespace to my custom claim. Auth0 requires that custom claims have a namespace to avoid collisions with their claims or OIDC/OAuth defined standard claims.

So instead of claim_name, you would have to do https://yourapplication.com/claim_name.

1 Like

UPDATE:
The requirement to namespace claims has just been removed. It is still recommended, but not enforced.
See the following documentation.

1 Like

Thanks for sharing that with the rest of community!