-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Description
Many OIDC servers expect additional URL parameters in requests.
keycloak-js
currently has no way of specifying these :(
Ideally it would be possible to specify additional URL parameters at init:
const kc = new Keycloak({...})
kc.init({
...
forwardParameters: {
appContextId: 'tdsc',
userName: 'blabla1'
}
})
And then when keycloak-js
redirects a user to the OIDC server for auth, it would add the forwardParameters
to the request, for example here:
GET https://some.oidc.server.com/oauth2/auth
?client_id=...
&redirect_uri=...
&state=...
&response_mode=...
&response_type=code
&scope=openid%20offline%20email
&nonce=...
&code_challenge=...
&code_challenge_method=S256
&appContextId=tdsc
&userName=blabla1
Notice the forwardParameters
in the last two lines above ^^
Discussion
No response
Motivation
We are using keycloak-js
client with a proprietary OIDC server, which expects an extra url param appContextId
.
So for example, when keycloak-js
redirects a user to the OIDC server for auth, we need it to add the param in the request:
GET https://login.lexisnexis.com/oauth2/auth
?client_id=...
&redirect_uri=...
&state=...
&response_mode=...
&response_type=code
&scope=openid%20offline%20email
&nonce=...
&code_challenge=...
&code_challenge_method=S256
&appContextId=tdsc
i.e. notice the last line above has the url param appContextId
But currently keycloak-js client has no way of adding this. This is a blocker for us :(
Details
No response