We run a WordPress site and want to use Discourse as our forum, to replace bbPress.
Our current issue is that if a new user (not registered on WP) is on Discourse, clicks login then registers through WP, he ends up on our homepage, not the forum page. Now I’m wondering if this is because right now our Discourse forum is on oursitename.ourhostingsite.net so the domains are different.
Then I’m looking in the settings and wondering if
enable sso provider
Implement Discourse SSO provider protocol at the /session/sso_provider endpoint, requires sso_secret to be set
Should be ticked? Currently we have ticked enable sso and filled in the sso url and secret.
So basically, what’s the difference between enable sso and enable sso provider? Should both be ticked? Why might new users not be re-directed to the forum after signup?
I thing you have it setup correctly. The enable_sso setting on Discourse is the one you need to have checked. It’s for using WordPress as the SSO provider for Discourse. The Discourse enable_sso_provider setting is for using Discourse as the SSO provider for another site.
Your settings on Discourse should look like this - with a better sso_secret:
Usually when this happens it’s because there is another plugin on your site that is performing a redirect after login - redirecting users to your homepage. Do you have any plugins that could be doing this?
Might it because once clicking login, users are getting taken to OURSITE.COM, where I can see the redirect_to in the URL, but then if they’re new they have to click register so then they get taken to OURSITE.COM, which doesn’t have the redirect_to in the URL anymore?
PS Not sure what’s going on with the formatting but you need to hover over the links I pasted to see the full paths.
Sorry, I didn’t read your question correctly. Yes, that’s the way it works when a user first registers. Ideally, users would register on WordPress before they tried to login to Discourse. I’ll see if I can come up with a workaround for this.
I see. Yes, it’s because a significant number of our forum users don’t register through WP first. They come straight to the forum. If you could find a workaround that would be great.