Vue.js + Keycloak 18.0.0 with logout problem

Hey guys, im having a problem to setup the logout using Vue.js 2 and keycloak-js on version 18.0.0.

Reading 2022/04 release Keycloak 18.0.0 released - Keycloak i understood that when logging out I must pass the following parameters in the method call:
the id_token_hint (ID Token used for login) and post_logout_redirect_uri (where I want to redirect the route).

So, I’m doing it this way:

But I get this message on the screen and analyzing the request I realize that the redirect did not try to go to the logout route that I defined and the parameter id_token_hint is set to “undefined”. Am I doing it correctly in code and the problem must be somewhere else or is the problem the way I’m passing the parameters?

image

I’m using vanilla TS without adapter on react, so might not be of much help, but according to the source code (keycloak/keycloak.js at main · keycloak/keycloak · GitHub) the options-object passed to logout should contain a “redirectUri” property, not “post_logout_redirect_uri”.

Also according to the createLogoutUri-function (keycloak/keycloak.js at 28fc5b4574ed5c8cc000ae11d5595d91af7f6a70 · keycloak/keycloak · GitHub) the idtoken should not be passed in. Instead it is taken from the Keycloak-object that you call logout on. So either you don’t have an idtoken (did you pass the scope “openid” when you logged in?) or maybe you messed up the objects somehow?