Wordpress SSO stuck in redirect loop

AI-generated summary

The Wordpress SSO plugin, WP-Discourse 1.43, is causing a redirect loop issue when trying to access the Discourse forum. The user, MattCHM, had previously used PrimeTime WP Discourse SSO and updated to WP-Discourse to fix a logout redirect issue. However, the update resulted in the redirect loop error.

MattCHM attempted to disable WP-Discourse, reactivate PrimeTime WP Discourse SSO, and disable SSO on Discourse, but none of these solutions worked. Disabling SSO on Discourse should have allowed normal login, but instead presented a login form with no fields. simon couldn’t reproduce the issue and offered to further investigate.

Ultimately, MattCHM rebuilt the forum from scratch, resolving the issue.

We had PrimeTime WP Discourse SSO plugin in place on our Wordpress install to handle the SSO to our Discourse forum and that was working apart from redirecting the user back to the Wordpress site on logout. To fix this I tried updating to WP-Discourse 1.43. The Wordpress site is the SSO Provider.

Since that whenever I try to access Discourse the page gets stuck in a redirect loop. At first it gets stuck at
https://www.mydomain.com/?sso=bm9uY2U9NDk3NzQ5MmY4M2Q2MmVjNjRjOTM...&sig=2ec83b391a3cecd44d9123563a237d7f881...
(… being the rest of the string)

Refreshing the page again will get to:
https://forum.mydomain.com/session/sso_login?sso=bm9uY2U9NDk3NzQ5MmY4M2Q2MmVjN...&sig=2ec83b391a3cecd44d9123563a237d7f88132d0d...
But we get the message Login Error. Account login timed out, please try logging in again.

I’ve tried deactivating WP-Discourse and reactivating PrimeTime WP Discourse SSO without any success. We are using the MemberPress plugin on Wordpress which does have a custom login page, but this problem occurs even when that is deactivated. We haven’t changed any of the Discourse settings other than getting an API key. Now I can’t login there to make changes. Disabling SSO on Discourse as per instructions here:
Install and configure the WP Discourse Wordpress plugin for Discourse
Seems to disable the SSO requirement but the login form presented on Discourse has no fields.

Hope someone can offer some advice.

That doesn’t seem right. Disabling SSO on the Discourse end should allow you to login normally to Discourse.

For the issue with SSO, I can’t find any way of reproducing the exact problem you’re describing. I can look at it some more tomorrow if you don’t get it figured out before then.

Thanks @simon

In the end I just rebuilt the forum from scratch. Thankfully I hadn’t put too much in there. Thanks for your help though.