Why are some claims visible at the Auth0 user profile and not in the id_token jtw payload?

Solved it by adding the following rule to Auth0:


function addSidToIdToken(user, context, callback) {
  // This rule adds the authenticated user's session id (sid) to the id token.

  const namespace = 'https://example.com/';
  
  context.idToken[namespace + 'sid'] = user.sid;
  
  callback(null, user, context);
}
1 Like