Using Discourse as SSO provider but facilitating users continuing task on Wordpress?

AI-generated summary

The discussion revolves around using Discourse as an SSO provider for a WordPress site, focusing on the user experience when new users sign up. glenatron explains that while existing users are seamlessly redirected back to WordPress after logging in via Discourse, new users face a confusing process involving email verification and being sent to Discourse’s welcome flow, which is not ideal for those seeking to complete learning activities. angus clarifies that when WordPress is correctly set up as a Discourse client, users should be automatically redirected back to WordPress after signing up, demonstrating the expected flow with a working example. glenatron confirms that the issue was resolved, attributing the initial problem to a possible confusion between browser windows during sign-up and approval, and appreciates the clarification.

We have a Wordpress site with an associated Discourse instance and it’s all working fine except that there are some learning activities on the Wordpress side that requires a user to be signed in. If a user already exists that works fine, but if a new user wants to show up and do one of the courses, they get redirected through to Discourse to create an account and then have to go through email verification and sign in. After that they go into the standard “welcome to Discourse” helpers, which is great for users who signed up through Discourse but if they signed up in the interests of doing a learning activity it is very confusing and I’d like to be able to send them straight back to that part of Wordpress.

Is there a built-in way to pass a redirect url to DiscourseConnect registration so that it knows to direct the user back to the front-end site when they complete sign-up, or even just so that I can put it in a message? This works great when the user already exists it’s only a problem for sign-in.

If you’ve set up Wordpress as a Discourse client to Discourse (as a provider) in the standard fashion your users should be automatically redirected back to your Wordpress after signing up.

I’ve set up https://wordpress.pavilion.tech as a client of https://test.pavilion.tech to demonstrate this.

  1. Go to the Wordpress login.
  2. Click “Log in with Discourse” and you’ll be directed to test.pavilion.tech
  3. Create an account in the Discourse Create Account modal that appears
  4. Click the link in the account confirmation email you receive.
  5. You’ll be redirected back to Wordpress

Which part of this flow is not working for you?

Amazing, this works perfectly now. But when I posted this I had just watched it not working for a user going through sign up. I wonder whether there was a confusion between the browser window they signed up in and the browser window they did the approval with.

Anyways, that describes it perfectly, thank you very much, I couldn’t find the part of the documentation that explained what this process is supposed to look like.