# Synchronising log out of discourse when logging out of WordPress

**URL:** <https://meta.discourse.org/t/synchronising-log-out-of-discourse-when-logging-out-of-wordpress/48823>\
**Category:** WordPress\
**Created:** [18 augustus 2016 om 19:01 UTC](https://meta.discourse.org/t/synchronising-log-out-of-discourse-when-logging-out-of-wordpress/48823 "2016-08-18T19:01:21Z")\
**Posts on this page:** 1\
**Showing post:** 18

<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:** [2 januari 2018 om 22:12 UTC](https://meta.discourse.org/t/synchronising-log-out-of-discourse-when-logging-out-of-wordpress/48823/18 "2018-01-02T22:12:27Z")

</div>

> [@hanks](#):
>
> Is there any way to automatically log in users on WP when they log in from Discourse?

The easiest way to do that is to embed an SSO login link on your forum. You can get the format required for the link by viewing the page source code for the Login with Discourse link on your WordPress login page. You can probably embed the link without URL encoding the redirect parameter.

Something like this:

```plaintext
<a href="http://wpdiscourse.test/?discourse_sso=1&redirect_to=http://wpdiscourse.test/">Log in with Discourse</a>

```

---

_[View the full topic](https://meta.discourse.org/t/synchronising-log-out-of-discourse-when-logging-out-of-wordpress/48823)._
