WP Discourse SSO redirect loop

AI-generated summary

The user waffleslop encountered a redirect loop and ‘Request-URI Too Long’ error when accessing disco.site.com without being logged in, while SSO was otherwise working between their WordPress and Discourse installations. simon suggested checking the ‘Path to your Login Page’ setting in the WP Discourse SSO Provider tab, as the issue was likely due to an incorrect login path. waffleslop confirmed that adjusting the login page path in PMP settings resolved the problem.

I have a Wordpress install with 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?

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 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.

That setting should not need to be enabled.

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!!