nginxinc/nginx-openid-connect

Use of optionals parameters for specifics IDP

sebacla opened this issue · 3 comments

I use keycloak with this script and I want to pass and use specific keycloak parameter kc_idp_hint. This parameter is given client side according keycloak documentation (i.e : https://www.keycloak.org/docs/latest/server_admin/#default_identity_provider!) to automatically select IDP to use.

Is there a way to pass optional parameters (kc_idp_hint and kc_idp_hint value) to authZargs in opened_connect.js line 247 ?

I would prefer not to modify or fork the script in order to be able to apply future updates.

The simplest way is to overload the $oidc_scopes variable
https://github.com/nginxinc/nginx-openid-connect/blob/main/openid_connect_configuration.conf#L32

default "openid+profile+email+offline_access&kc_idp_hint=facebook";

thx @lcrilly it works ! Sure it's the simplest way :) I think many people may have this need. To be generic, another variable empty or not could do the trick ;)

We'll consider this, thanks.