# Issue with Discourse as SSO provider & Social Sign Up

**URL:** <https://meta.discourse.org/t/issue-with-discourse-as-sso-provider-social-sign-up/160148>\
**Category:** SSO\
**Tags:** discourseconnect\
**Created:** [7 augustus 2020 om 18:44 UTC](https://meta.discourse.org/t/issue-with-discourse-as-sso-provider-social-sign-up/160148 "2020-08-07T18:44:14Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [7 augustus 2020 om 18:44 UTC](https://meta.discourse.org/t/issue-with-discourse-as-sso-provider-social-sign-up/160148/1 "2020-08-07T18:44:14Z")

</div>

Hi,

### Issue

By using Discourse as SSO provider via the API (domain A), if you try to register on Discourse (domain B) with a social button, you don’t see immediately the `create-account` modal, but instead you are back to the `login` modal.

At this point, you need to close the `login` modal, then you click on `Sign Up` button and you see the `create-account` modal you were supposed to see before.

#### Issue demo

Here a short video demo:

- Edge, with cache/cookies cleaned and no extensions.
- Using WP-Discourse set up to use Discourse as SSO provider (fastest way to show the issue)

What you see _first_ is I’m clicking on the WP-[Discourse SSO](https://meta.discourse.org/t/13045?silent=true) login link.  
After clicking on the Facebook button, i’m redirected to the login `modal` instead of `create-account`.

### Possible reason

We are using _different_ domains for Discourse and from where the API is called.

To make sure issue is not from plugins/whatever, that’s something I was able to reproduce with a clean Wordpress (with WP-Discourse set up to use Discourse as SSO provider) and a clean Discourse. Both on _different_ domains.

(_Note_: this not related to wp-discourse, this is just easier to show/test the issue. We can also reproduce it with _our app_ which consumes the Discourse API and as SSO provider as well).

### Others informations

- Discourse security settings disabled (not sure if has an effect, CSP disabled, same cookies to None or Disabled).
- Discourse up to date
- No issue with logging in with SSO
- Nothing in the browser console or Discourse logs
- If you experience the issue once with the SSO API, and you try to Social Sign Up _directly_ on discourse, you will get the same issue. At this point, you need to clear your cookies/cache to make it work. (same issue reported here: [Suggestion: unite the sign up & log in buttons](https://meta.discourse.org/t/suggestion-unite-the-sign-up-log-in-buttons/160085))

* * *

Since Discourse is able to show the expected `create-modal` with _pre-filled_ fields after you click manually on `Sign Up`, it makes me think there is a bug or a situation that Discourse could handle, am I wrong?

Is there something can be done to fix this behavior? Do we miss something?

Thanks!

---

_[View the full topic](https://meta.discourse.org/t/issue-with-discourse-as-sso-provider-social-sign-up/160148)._
