# Syncing login status between WordPress and Discourse, Discourse SSO provider

**URL:** <https://meta.discourse.org/t/syncing-login-status-between-wordpress-and-discourse-discourse-sso-provider/67980>\
**Category:** WordPress\
**Created:** [August 13, 2017, 7:56pm UTC](https://meta.discourse.org/t/syncing-login-status-between-wordpress-and-discourse-discourse-sso-provider/67980 "2017-08-13T19:56:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [August 13, 2017, 8:50pm UTC](https://meta.discourse.org/t/syncing-login-status-between-wordpress-and-discourse-discourse-sso-provider/67980/2 "2017-08-13T20:50:39Z")

</div>

> [@a9udn9u](#):
>
> Is this the expected behavior?

Yes, it is, but there are a couple of workarounds. You can sync logout between Discourse and WordPress by adding a URL like this to the Discourse logout\_redirect setting:  
`http://my-wp-blog.com/?request=logout`

The easiest way to get users logged in on WordPress when they visit the site from Discourse is to link to the site on Discourse with an SSO link. You can get the form of the URL by inspecting the ‘Login With Discourse’ link on your WordPress login page. It should look something like this:

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

Change the value of the `redirect_to` parameter to get users to a specific page.

A Discourse plugin could probably be developed that would automatically sync login with WordPress. It’s not something that can be accomplished through the [WP Discourse](https://github.com/discourse/wp-discourse) plugin.

---

_[View the full topic](https://meta.discourse.org/t/syncing-login-status-between-wordpress-and-discourse-discourse-sso-provider/67980)._
