# WP Discourse as SSO client doesn't log me out from Discourse when logging out from Wordpress

**URL:** https://meta.discourse.org/t/wp-discourse-as-sso-client-doesnt-log-me-out-from-discourse-when-logging-out-from-wordpress/88957
**Category:** WordPress
**Created:** [June 1, 2018, 11:48pm UTC](https://meta.discourse.org/t/wp-discourse-as-sso-client-doesnt-log-me-out-from-discourse-when-logging-out-from-wordpress/88957 "2018-06-01T23:48:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [June 1, 2018, 11:48pm UTC](https://meta.discourse.org/t/wp-discourse-as-sso-client-doesnt-log-me-out-from-discourse-when-logging-out-from-wordpress/88957/1 "2018-06-01T23:48:53Z")

</div>

Hi.

 ![image](https://global.discourse-cdn.com/meta/original/3X/8/4/846edefcaff4069ea37f684b7a8fc9763160b521.png)

Option is checked but not working.

Any idea?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [June 2, 2018, 12:13am UTC](https://meta.discourse.org/t/wp-discourse-as-sso-client-doesnt-log-me-out-from-discourse-when-logging-out-from-wordpress/88957/2 "2018-06-02T00:13:01Z")

</div>

> [@Canapin](#):
>
> Option is checked but not working.
> 
> Any idea?

It should work. Did the user login to WordPress through Discourse? Is your Discourse site set to ‘login required’? Do you know if this is failing for all users on your forum, or just a particular user?

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [June 2, 2018, 1:00am UTC](https://meta.discourse.org/t/wp-discourse-as-sso-client-doesnt-log-me-out-from-discourse-when-logging-out-from-wordpress/88957/3 "2018-06-02T01:00:12Z")

</div>

Hi, I log from Wordpress as SSO client and my Discourse is not login required. The option seems to work when I log in/out with another account (which is a regular user). Could it be because I’m an admin on Wordpress and/or Discourse?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [June 2, 2018, 1:10am UTC](https://meta.discourse.org/t/wp-discourse-as-sso-client-doesnt-log-me-out-from-discourse-when-logging-out-from-wordpress/88957/4 "2018-06-02T01:10:51Z")

</div>

> [@Canapin](#):
>
> Could it be because I’m an admin on Wordpress and/or Discourse?

Being an admin on Discourse shouldn’t have any effect. It’s possible that it is having an effect on the WordPress end though. Syncing logout with Discourse depends on the WordPress `wp_clear_auth_cookie` function. That is a ‘pluggable’ WordPress function. That means that the function can be overwritten by other plugins. Possibly there is a less fragile hook that the [WP Discourse](https://github.com/discourse/wp-discourse) plugin could use for syncing logout. I’ll take a look at that.
