I am trying to set the ‘role’ claim, for example: ‘role’ : ‘admin’ in the returned JWT. I’m adding it with a custom rule (is there another way?)
The problem is that, much to my surprise, the documentation clearly states that in spite of the specification CLEARLY ALLOWING it, Auth0 will REMOVE any claims without a namespace scoping.
So, toss the spec out the window and let’s go!!
(Do that once, get a reprimand, continue doing it, and I’ll kick you butt out to street. Follow the specs - teach that to all Jr. Programmers. Can’t do that, work somewhere else!)
OK, well, it is a standard namespace scoping, so I add:
And the stupid thing doesn’t recognize it as a standard role, so instead of returning ‘role’ in the JWT, it puts it in exactly like above, with the namespace. Ack! Phew! - Well, at least that is mostly expected.
So, HOW do I create ‘role’ in the JWT, or do I have to dump Auth0 completely? (modifying the standard OAuthService object in Angular to support the namespaced role isn’t really an option.)