# Discourse SSO with Wordpress Only Works with /core/wp-admin URL

**URL:** <https://meta.discourse.org/t/discourse-sso-with-wordpress-only-works-with-core-wp-admin-url/148121>\
**Category:** WordPress\
**Created:** [April 15, 2020, 2:29pm UTC](https://meta.discourse.org/t/discourse-sso-with-wordpress-only-works-with-core-wp-admin-url/148121 "2020-04-15T14:29:51Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![benbowler](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benbowler/32/174749_2.png) [@benbowler](https://meta.discourse.org/u/benbowler)\
**Post date:** [April 15, 2020, 2:29pm UTC](https://meta.discourse.org/t/discourse-sso-with-wordpress-only-works-with-core-wp-admin-url/148121/1 "2020-04-15T14:29:51Z")

</div>

I’ve deployed a new Wordpress plugin that relies on Discourse’s SSO but I’ve got a strange bug that only effects the live deployment of the site.

On local I can login and use the redirect\_url parameter to get back to the page. However on the live site SSO only works if the redirect\_url is the wp-admin URL eg.:

**SSO Works great…**  
[https://www.example.com/core/wp-login.php?redirect\_to=https%3A%2F%2Fwww.example.com%2Fcore%2Fwp-admin%2F&reauth=1](https://www.example.com/core/wp-login.php?redirect_to=https%3A%2F%2Fwww.example.com%2Fcore%2Fwp-admin%2F&reauth=1)

> **[Example Domain](https://www.example.com/?discourse_sso=1vyynljfjbqp&redirect_to=https%3A%2F%2Fwww.example.com%2Fcore%2Fwp-admin%2F)**

**SSO Doesn’t successfully auth, it just returns to the login/post**  
[https://www.example.com/core/wp-login.php](https://www.example.com/core/wp-login.php)

> **[Example Domain](https://www.example.com/?discourse_sso=xsnfq1zk6rma&redirect_to=https%3A%2F%2Fwww.example.com%2F)**

Have you come across this before, any ideas where to look? If it persists I’ll have to build my own redirection mechanism to catch wp-admin

---

_[View the full topic](https://meta.discourse.org/t/discourse-sso-with-wordpress-only-works-with-core-wp-admin-url/148121)._
