# I'm not finding the "Valid post logout URIs" field

**URL:** <https://forum.keycloak.org/t/im-not-finding-the-valid-post-logout-uris-field/17980>\
**Category:** Configuring the server\
**Tags:** admin-console\
**Created:** [October 18, 2022, 7:24pm UTC](https://forum.keycloak.org/t/im-not-finding-the-valid-post-logout-uris-field/17980 "2022-10-18T19:24:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jvhk](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/jvhk/32/6770_2.png) [@jvhk](https://forum.keycloak.org/u/jvhk)\
**Post date:** [October 18, 2022, 7:24pm UTC](https://forum.keycloak.org/t/im-not-finding-the-valid-post-logout-uris-field/17980/1 "2022-10-18T19:24:28Z")

</div>

I’m using Keycloak 18.0.0 and I found an update on logout ([https://www.keycloak.org/2022/04/keycloak-1800-released#\_openid\_connect\_logout](https://www.keycloak.org/2022/04/keycloak-1800-released#_openid_connect_logout)) where it is necessary to register a post logout redirect URI in the Valid post logout URIs field within the Keycloak interface. But this field is not appearing for me in the client settings.

What could be causing this?

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/c/cf916d8714337c2ccc0c27f7b7ff09c134a46eae.png)

---

<div class="post-metadata">

**Author:** ![xgp](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/xgp/32/2589_2.png) [@xgp](https://forum.keycloak.org/u/xgp)\
**Post date:** [October 18, 2022, 8:32pm UTC](https://forum.keycloak.org/t/im-not-finding-the-valid-post-logout-uris-field/17980/2 "2022-10-18T20:32:00Z")

</div>

AFAIK it’s only available in the “new” admin console UI. For that, you have to go into **Realm settings** → **Themes** and switch the Admin theme to `keycloak.v2`.

---

<div class="post-metadata">

**Author:** ![jvhk](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/jvhk/32/6770_2.png) [@jvhk](https://forum.keycloak.org/u/jvhk)\
**Post date:** [October 18, 2022, 8:45pm UTC](https://forum.keycloak.org/t/im-not-finding-the-valid-post-logout-uris-field/17980/3 "2022-10-18T20:45:29Z")

</div>

It doesn’t seem to be available for version 18.0.0.

I did a local install and realized that in version 19.0.3 this theme is already by default. However, in the project I’m working on, we use version 18.0.0 and we’re having problems using logout with Redirect URIs, precisely because of the logout update of the release.

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/4/4ed5486ab5a507b6a45caba9bae1c78f114c980b.png)

---

<div class="post-metadata">

**Author:** ![xgp](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/xgp/32/2589_2.png) [@xgp](https://forum.keycloak.org/u/xgp)\
**Post date:** [October 19, 2022, 6:26am UTC](https://forum.keycloak.org/t/im-not-finding-the-valid-post-logout-uris-field/17980/4 "2022-10-19T06:26:12Z")

</div>

Good point. I don’t know of another way to do it other than to upgrade to 19.

---

<div class="post-metadata">

**Author:** ![mbonn](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/mbonn/32/5755_2.png) [@mbonn](https://forum.keycloak.org/u/mbonn)\
**Post date:** [October 19, 2022, 7:28am UTC](https://forum.keycloak.org/t/im-not-finding-the-valid-post-logout-uris-field/17980/5 "2022-10-19T07:28:31Z")

</div>

Keycloak 18 takes the configured valid login redirect URIs as valid post logout redirects. If that is ok for you, there’s no need to upgrade to the (buggy) 19 version with that (more buggy) new admin console…

---

<div class="post-metadata">

**Author:** ![jvhk](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/jvhk/32/6770_2.png) [@jvhk](https://forum.keycloak.org/u/jvhk)\
**Post date:** [October 19, 2022, 5:11pm UTC](https://forum.keycloak.org/t/im-not-finding-the-valid-post-logout-uris-field/17980/6 "2022-10-19T17:11:35Z")

</div>

@mbonn in this case should i continue using post\_logout\_redirect\_uri or should i use redirect\_uri as url pattern for $keycloak.logout() ?

---

<div class="post-metadata">

**Author:** ![jvhk](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/jvhk/32/6770_2.png) [@jvhk](https://forum.keycloak.org/u/jvhk)\
**Post date:** [October 19, 2022, 5:48pm UTC](https://forum.keycloak.org/t/im-not-finding-the-valid-post-logout-uris-field/17980/7 "2022-10-19T17:48:01Z")

</div>

i’ve tried using redirect URIs this way:

`this.$keycloak.logout({ redirectUri: "myRedirectUriHere", id_token_hint: myIdTokenHere });`

In this attempt I got an attempt to redirect to the correct route, but with a return message “Invalid redirect uri”.  
If i pass:

`this.$keycloak.logout({ post_logout_redirect_uri: "myRedirectUriHere", id_token_hint: myIdTokenHere });`

the logout is sucessfully, but route redirection doesn’t work.

---

<div class="post-metadata">

**Author:** ![weltonrodrigo](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/weltonrodrigo/32/3104_2.png) [@weltonrodrigo](https://forum.keycloak.org/u/weltonrodrigo)\
**Post date:** [October 19, 2022, 7:56pm UTC](https://forum.keycloak.org/t/im-not-finding-the-valid-post-logout-uris-field/17980/8 "2022-10-19T19:56:31Z")

</div>

I confirmed that 18 don’t have a “valid post logout url” for the clients in the admin console. Not sure why. The redirect URI field should work.

Looking at the code, I think the javascript adapter should be used as

```javascript
keycloak.logout({
    redirectUri: "myRedirectUriHere"
});

```

The ID Token should be handled automatically.

The adapter code has this snipped, which I belive shows that the redirectUri is used to build the post\_logout\_redirect\_uri and the it\_token\_hint is filled automatically:

```javascript
    kc.createLogoutUrl = function(options) {
        var url = kc.endpoints.logout()
            + '?client_id=' + encodeURIComponent(kc.clientId)
            + '&post_logout_redirect_uri=' + encodeURIComponent(adapter.redirectUri(options, false));

        if (kc.idToken) {
            url += '&id_token_hint=' + encodeURIComponent(kc.idToken);
        }

        return url;
    }

```
