# Setup DiscourseConnect - Official Single-Sign-On for Discourse (sso)

**URL:** <https://meta.discourse.org/t/setup-discourseconnect-official-single-sign-on-for-discourse-sso/13045>\
**Category:** Integrations\
**Tags:** sso, discourseconnect, configuring, how-to\
**Created:** [February 25, 2014, 8:30am UTC](https://meta.discourse.org/t/setup-discourseconnect-official-single-sign-on-for-discourse-sso/13045 "2014-02-25T08:30:34Z")\
**Posts on this page:** 1\
**Showing post:** 605

<div class="post-metadata">

**Author:** ![Jules\_Olléon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jules_oll%C3%A9on/32/208793_2.png) [@Jules\_Olléon](https://meta.discourse.org/u/Jules_Oll%C3%A9on)\
**Post date:** [April 25, 2025, 3:32pm UTC](https://meta.discourse.org/t/setup-discourseconnect-official-single-sign-on-for-discourse-sso/13045/605 "2025-04-25T15:32:27Z")

</div>

How will this behave if I turn this on on a site that doesn’t currently use `external_id`? Will it manage to login users based solely on their email?

More generally, since `email` and `external_id` are the 2 mandatory fields in the payload, could you clarify how they are used on the discourse side (when receiving the payload from the authenticating site) to figure which user account to login?

- What if no external\_id was associated with email during user creation, will it use email and then associate the external\_id with this email for future logins?
- What if there is a mismatch between `email` and `external_id` (each is associated with a different discourse account), will it use `external_id` or `email` to figure which user to login? Or throw an error?

Thank you!

---

_[View the full topic](https://meta.discourse.org/t/setup-discourseconnect-official-single-sign-on-for-discourse-sso/13045)._
