I wanted Roles populated in the JWT for my Application so I wrote a custom Action and used it in a Login Flow. It works fine. A question I have is about the Javascript. I used the code from this example in the docs, however I want to exclude the namespace so the function will look like this:
For some reason this doesn’t work without the namespace being appended to roles (as in the docs example). These setters are setting values in a simple map (I assume) so why doesn’t my code without the namespace work?
I assume you are referring to access tokens vs. ID tokens - The roles are automatically included in an access token when utilizing RBAC as the access token is used in authorization against an API whereas the ID token is used for authentication purposes.