Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keycloak.logoutUrl do not include the redirectUrl unless the idTokenHint is also passed #461

Open
francois-roget opened this issue Dec 23, 2022 · 0 comments · May be fixed by #460
Open

Comments

@francois-roget
Copy link

Describe the bug

When using the Keycloak-connect npm package, there is a function to generate the logout url: keycloak.logoutUrl.
According to the typescript types, it accepts 2 parameters:

  • redirectUrl: string (mandatory)
  • idTokenHint?: string (not-mandatory)

Calling this method with only the mandatory parameter does not gives the expected output.

Version

20.0.2

Expected behavior

When only the mandatory parameter redirectUrl is passed to the function, the generated logout url should contain it.

Actual behavior

The redirectUrl parameter does not get added to the generated logout url unless the optional idTokenHint is passed as well. In this case, both are added to the generated url.

How to Reproduce?

Get a configured setup of keycloak-connect and call the method keycloak.logoutUrl with only 1 parameter. In that case, the parameter value does not get found in the generated logout url

Anything else?

I'll create a PR to fix this

francois-roget added a commit to francois-roget/keycloak-nodejs-connect that referenced this issue Dec 23, 2022
@francois-roget francois-roget linked a pull request Dec 23, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant