oidc-client-js icon indicating copy to clipboard operation
oidc-client-js copied to clipboard

Update the createSignoutRequest method to accept an optional url argument

Open dustin-page opened this issue 5 years ago • 1 comments

Some Authentication Providers are not implementing the OpenID Provider Discovery Metadata consistently for the "end_user_session_endpoint".

For example, Ping Identity implements it as: "ping_end_user_session_endpoint"

I was wondering if it would be possible to update the oidc-client library to accept an optional argument for the url on the createSignoutRequest method. Similar to how the "post_logout_redirect_uri" can be optionally passed.

This would allow me to have a custom signoutRedirect while still using the rest of the .well-known endpoint metadata.

Then I could call it from my code like this:

this.UserManager.signoutRedirect({
url: PING_END_SESSION_ENDPOINT,
extraQueryParams: PING_SIGN_OUT_PARAMS
})

https://github.com/iliassk/oidc-client-js/blob/7855784857fbcd0277c17112b02515b76558f165/src/OidcClient.js#L126

dustin-page avatar Apr 28 '20 19:04 dustin-page

There's a PR that allows merging static configured discovery document values and the dynamic ones from the STS... that might help you once it's merged.

brockallen avatar Jul 21 '20 21:07 brockallen