Auth0 suddenly not allowing not namespaced custom claims in the token

Hey there @11TStudio welcome back!

Interesting - The only thing I’m aware of related to this was the migration that happened at the end of July.

I’m not seeing any reason in particular the non-namespaced claim would be ignored in your code - I’m curious, do you get a similar claim to come through if you are to create another basic action to test. Something like:

exports.onExecutePostLogin = async (event, api) => {
  if (event.authorization) {
     api.idToken.setCustomClaim(`userId`, event.user.user_id);
    api.accessToken.setCustomClaim(`userId`, event.user.user_id);
  }
}

In testing in my own environment, I’m not currently able to reproduce what you are seeing. I am able to add non-namespaced claims to both ID and access tokens.

Let us know!