# SSO - 无法注销

**URL:** https://meta.discourse.org/t/sso-cannot-log-out/113124
**Category:** WordPress
**Created:** [2019年四月1日 13:50 UTC](https://meta.discourse.org/t/sso-cannot-log-out/113124 "2019-04-01T13:50:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![TimJensen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/timjensen/32/543315_2.png) [@TimJensen](https://meta.discourse.org/u/TimJensen)
#### Post date: [2019年四月1日 13:50 UTC](https://meta.discourse.org/t/sso-cannot-log-out/113124/1 "2019-04-01T13:50:36Z")

</div>

I have set up SSO, using WordPress as the provider. The log in process works as expected; however, the log out process does not work. When I click “Log Out” from the Discourse menu I do see a modal confirming logout, but then I am automatically logged back in when the page refreshes. Is there a way to fix this so that clicking “Log Out” actually logs the user out of Discourse?

Related: The authentication request that Discourse makes to WordPress only has `sso` and `sig` args, so there’s no way for me to check on the provider side if the request is a logout request since the signature looks identical to a login request.

---

<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: [2019年四月1日 16:56 UTC](https://meta.discourse.org/t/sso-cannot-log-out/113124/2 "2019-04-01T16:56:42Z")

</div>

> [@TimJensen](#):
>
> When I click “Log Out” from the Discourse menu I do see a modal confirming logout, but then I am automatically logged back in when the page refreshes

This will happen if the `login required` setting is enabled on your Discourse site. To get users logged out of Discourse, they also need to be logged out of the WordPress site. To log users out of WordPress, set the Discourse `logout redirect` site setting to `https://example.com/?request=logout`, with your domain name substituted for `example.com`.

---

<div class="post-metadata">

### Author: ![TimJensen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/timjensen/32/543315_2.png) [@TimJensen](https://meta.discourse.org/u/TimJensen)
#### Post date: [2019年四月1日 17:19 UTC](https://meta.discourse.org/t/sso-cannot-log-out/113124/3 "2019-04-01T17:19:29Z")

</div>

Perfect! Adding the logout redirect was exactly what I was looking for. Thanks!
