Hey!
I’m trying to pass a custom claim back to my app through a rule but struggling to actually get it to be passed back to the app in the accessToken JWT.
The rule implements a redirect flow, which allows the user to select which tenant to sign in. When the app ‘continues’ it passes a new value back in the JWT, decodes that and adds it to the context.accessToken:
context.accessToken['https://app.timestamp.io/user_id'] = decoded.user_id;
I have added logs and know that this is being set correctly. context.accessToken looks like: { “Timestamp”}
GIven this, the JWT generated by Auth0 DOES NOT contain this extra claim. I just get something like:
{
"iss": "https://.../",
"sub": "...",
"aud": [
"https://api.timestamp.io",
"https://.../userinfo"
],
"iat": 1527265982,
"exp": 1527273182,
"azp": "...",
"scope": "openid timestamp:all"
}
I’m really not sure what else to try. I cannot see anything obvious as to why this would not work.
Appreciate any help!
Thanks, Adam