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

**URL:** https://meta.discourse.org/t/using-discourse-as-sso-provider-but-facilitating-users-continuing-task-on-wordpress/240706
**Category:** WordPress
**Created:** [October 3, 2022, 9:22am UTC](https://meta.discourse.org/t/using-discourse-as-sso-provider-but-facilitating-users-continuing-task-on-wordpress/240706 "2022-10-03T09:22:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![glenatron](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/glenatron/32/272996_2.png) [@glenatron](https://meta.discourse.org/u/glenatron)
#### Post date: [October 3, 2022, 9:22am UTC](https://meta.discourse.org/t/using-discourse-as-sso-provider-but-facilitating-users-continuing-task-on-wordpress/240706/1 "2022-10-03T09:22:04Z")

</div>

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](https://meta.discourse.org/t/13045?silent=true) 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.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [October 3, 2022, 3:58pm UTC](https://meta.discourse.org/t/using-discourse-as-sso-provider-but-facilitating-users-continuing-task-on-wordpress/240706/2 "2022-10-03T15:58:20Z")

</div>

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.

> [@Configure single sign-on (SSO) with WP Discourse and DiscourseConnect](https://meta.discourse.org/t/configure-single-sign-on-sso-with-wp-discourse-and-discourseconnect/223494#logging-in-to-wordpress-with-discourse-discourseconnect-client-9):
>
> The [WP Discourse](https://github.com/discourse/wp-discourse) plugin lets you set up [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) in Wordpress so your users can use their Wordpress account to log into Discourse, or their Discourse account to log into Wordpress. Before you can set up [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) you first have to install the [WP Discourse](https://github.com/discourse/wp-discourse) plugin on Wordpress and Connect it to your Discourse. If you’re ready to get started, start by watching this short video, or follow the instructions below. Next Step Once you’ve set up [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true), you may want to check o…

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

1. Go to the [Wordpress login](https://wordpress.pavilion.tech/wp-login.php).
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?

---

<div class="post-metadata">

### Author: ![glenatron](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/glenatron/32/272996_2.png) [@glenatron](https://meta.discourse.org/u/glenatron)
#### Post date: [October 4, 2022, 10:03am UTC](https://meta.discourse.org/t/using-discourse-as-sso-provider-but-facilitating-users-continuing-task-on-wordpress/240706/3 "2022-10-04T10:03:38Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [November 3, 2022, 10:04am UTC](https://meta.discourse.org/t/using-discourse-as-sso-provider-but-facilitating-users-continuing-task-on-wordpress/240706/4 "2022-11-03T10:04:28Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
