At this moment the library does not offer support for setting the client_id in the logout URL and the post_logout_redirect_uri query param is set only if idTokenHint function param is set.
Discussion
No response
Motivation
The library should match the Keycloak Server capabilities.
Details
The logout function should look like this
Keycloak.prototype.logoutUrl = function (redirectUrl, idTokenHint) {
const url = new URL(this.config.realmUrl + '/protocol/openid-connect/logout')
url.searchParams.set('client_id', this.config.clientId)
if (redirectUrl) {
url.searchParams.set('post_logout_redirect_uri', redirectUrl)
}
if (idTokenHint) {
url.searchParams.set('id_token_hint', idTokenHint)
}
return url.toString()
}
Description
In Keycloak 19 was added support for
client_id
as described in the OIDC RP-Initiated specification. More details could be found here https://github.com/keycloak/keycloak/issues/12002#issuecomment-1128896662At this moment the library does not offer support for setting the
client_id
in the logout URL and thepost_logout_redirect_uri
query param is set only ifidTokenHint
function param is set.Discussion
No response
Motivation
The library should match the Keycloak Server capabilities.
Details
The logout function should look like this
A part of the above implementation is already done https://github.com/keycloak/keycloak-nodejs-connect/issues/420.