A user, Frankpanduh, is experiencing issues with WP Discourse SSO not working, resulting in a loop back to WordPress. After setup, logging in to Discourse redirects to the WordPress login page, signs in, but never redirects back to Discourse or logs in successfully.
itsbhanusharma suggests checking the SSO secret, ensuring WordPress is configured as the SSO provider, and verifying that SSO is enabled on Discourse. The user confirms that the settings are correct, but the issue persists.
Disabling the “Theme My Login” plugin and the “sso allows all return paths” option are suggested as potential solutions, but the issue remains. itsbhanusharma believes the issue might be due to the custom login/register plugin or WordPress getting confused between user accounts.
After further investigation, itsbhanusharma is able to recreate the issue by installing the “Theme My Login” plugin and suggests that it might be removing the Discourse hook from the URL, causing the redirect issue. simon agrees that the “Theme My Login” plugin could be the cause of the problem and recommends exploring alternative solutions.
So Can You Please Cross check the Following are Correctly done:
#1 Your SSO Secret is same across Discourse and Wordpress #2 Wordpress is Configured as SSO Provider not Client (Only Fields under the SSO Provider sub-tab are Populated) #3 On Discourse, You’ve Enabled the SSO (and Not Provider) Along with a SSO URL (Link to Your wordpress Install) ?
I’m almost certain this is either due to the custom login/register plugin messing up with permissions or due to Wordpress Getting confused among your user accounts between the transition (Different username or email) so this needs to be investigated further.
I’m on the other hand totally able to create and register users! …
I hope You have the re-enabled the “sso allows all return paths” which probably will fix this issue.
@simon I’m unable to recreate his issue and There is nothing that can be blamed! … settings seem fine and the only thing I can suggest him is to revert back to wordpress default login/registration system instead of a plugin.
do You have any recommendation on how to integrate wp-discourse to custom login plugins like theme my login ??
Divi theme is totally fine! … I’ve used it on wp install running discourse SSO and it worked absolutely fine.
the problem is rather something removing the discourse hook from the URL and rather redirecting the default register page to something else.!
I was able to recreate your issue by installing the theme my login plugin so I’d suggest You first try disabling it and then ensuring that the flow works fine! I hope simon can provide better help at resolving the compatibility between two plugins.