# WP Discourse SSO redirect loop

**URL:** https://meta.discourse.org/t/wp-discourse-sso-redirect-loop/153177
**Category:** WordPress
**Created:** [May 29, 2020, 3:00am UTC](https://meta.discourse.org/t/wp-discourse-sso-redirect-loop/153177 "2020-05-29T03:00:43Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![waffleslop](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/waffleslop/32/244974_2.png) [@waffleslop](https://meta.discourse.org/u/waffleslop)
#### Post date: [May 29, 2020, 3:00am UTC](https://meta.discourse.org/t/wp-discourse-sso-redirect-loop/153177/1 "2020-05-29T03:00:43Z")

</div>

I have a Wordpress install with [WP Discourse](https://github.com/discourse/wp-discourse) and a Discourse install on a different server. I have successfully set both up and have SSO working correctly. I use PMP to manage membership. Everything works, but I have one very strange error:

Wordpress: `wp.site.com`  
Discourse: `disco.site.com`

When someone goes to `wp.site.com`, they are shown to the WP login page. If they log in, everything is perfect.

When they go to `disco.site.com` and are NOT logged in, they get redirected to `wp.site.com/?sso=####&sig=###&redirect_to=wp.site.com/?sso=####&sig=###&redirect_to=wp.site.com/?sso=####&sig=###&redirect_to=wp.site.com/?sso=####&sig=###&redirect_to=wp.site.com/?sso=####&sig=###&redirect_to=`

Error: `Request-URI Too Long`

Discourse: 2.5.0.beta4

I do not have “sso allows all return paths” checked on Discourse.

Any ideas what could be causing this redirect loop only when coming from `disco.site.com`?

---

<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: [May 29, 2020, 3:43am UTC](https://meta.discourse.org/t/wp-discourse-sso-redirect-loop/153177/2 "2020-05-29T03:43:17Z")

</div>

> [@waffleslop](#):
>
> Error: `Request-URI Too Long`

If your WordPress login page is not at `wp.site.com/wp-login.php`, try setting the “Path to your Login Page” setting. It’s found on the [WP Discourse](https://github.com/discourse/wp-discourse) SSO Provider tab. It should be set to the login page’s path. For example, if users login at `wp.site.com/login`, set it to `/login`

That might fix the problem, if not, send me a link to your Discourse site and I’ll have a look.

> [@waffleslop](#):
>
> I do not have “sso allows all return paths” checked on Discourse.

That setting should not need to be enabled.

---

<div class="post-metadata">

### Author: ![waffleslop](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/waffleslop/32/244974_2.png) [@waffleslop](https://meta.discourse.org/u/waffleslop)
#### Post date: [May 29, 2020, 3:15pm UTC](https://meta.discourse.org/t/wp-discourse-sso-redirect-loop/153177/3 "2020-05-29T15:15:05Z")

</div>

Thank you @simon for the help. He helped me identify the PMP Log-In page was causing the error.

I changed the WP login page at /wp-admin/admin.php?page=pmpro-pagesettings and the error resolved.

Thank you!!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [June 28, 2020, 3:27pm UTC](https://meta.discourse.org/t/wp-discourse-sso-redirect-loop/153177/4 "2020-06-28T15:27:10Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
