I am trying to use the authorization code flow to get a token with custom claims. My flow is pretty simple right now its…
React App > Keycloak Login > Returns code to React App > React app sends to my backend > my backend requests the token from keycloak.
So its the last bit I am having problems with
I would like to provide custom claims to Keycloak to include in the token that is returned. This way I am using 100% keycloak to managed tokens etc.
How can I do this ?
My alternative would be to create my own JWT and claims without involving keycloak - but this kind of the defeats the object - right ?
My FE app is react, My back app is nodejs.
So I think the only missing part i have is to be able to PUSH custom claims to keycloak when exchanging the CODE for a token, the token that would be returned would include my claims that I sent.
Can anyon help to validate my process and how I go about doing the above mentioned “providing custom claims to keycloak for including on the signed token”
Thanks in advance