keycloak/keycloak-js

Allow passsing Forwarded Query Parameters in login call

Open

#20 opened on Nov 8, 2022

 (5 comments) (4 reactions) (1 assignee)JavaScript (46 forks)auto 404
good first issuehelp wanted

Repository metrics

Stars
 (90 stars)
PR merge metrics
 (PR metrics pending)

Description

Description

In the configuration of an Identity Provider there is a option called "Forwarded Query Parameters" which allows non-standard OIDC/Oauth params to be forwarded to an external IDP. Currently the JS client provides the idpHint parameter to tell a project to skip the login page and redirect to an external IDP. The JS client however does not provide a way to pass the "Forwarded Query Parameters" to the project before redirecting.

This enhancement would be to add a new option to the JS client login request, that would pass the "Forwarded Query Parameters" to the project on the call to login.

Discussion

https://github.com/keycloak/keycloak/discussions/13094

Motivation

This feature should be added as it appears to be a gap in the JS client. The Keycloak server seems to support this functionality but the JS client provides no way to use it. The "Forwarded Query Parameters" may be necessary for a Keycloak project to redirect to an external IDP.

Without the ability to forward parameters, applications that would normally use the Keycloak client may need to fork the Keycloak client or use hacks to ensure parameters are forwarded. This may lead to problems upgrading in future.

Details

No response

Contributor guide