# Login to Discourse with custom Oauth2 provider

**URL:** https://meta.discourse.org/t/login-to-discourse-with-custom-oauth2-provider/14717
**Category:** Feature
**Tags:** oauth2, completed
**Created:** [12 april 2014 om 12:55 UTC](https://meta.discourse.org/t/login-to-discourse-with-custom-oauth2-provider/14717 "2014-04-12T12:55:42Z")
**Posts on this page:** 5
**Page:** 2

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [22 december 2017 om 02:38 UTC](https://meta.discourse.org/t/login-to-discourse-with-custom-oauth2-provider/14717/22 "2017-12-22T02:38:30Z")

</div>

SSO means: “I trust «other\_site» to rely on ALL of my authentication and rely on it exclusively for this purpose.”

That other site could be anything - it could be your Corporate SSO site, it could be [something horrible that trusts users completely](https://meta.discourse.org/t/bratwurst-the-wurst-possible-production-sso-provider/72343), it could be a provider that requires an RSA key with certificates, heck it could even be [(another) Discourse](https://meta.discourse.org/t/using-discourse-as-a-sso-provider/32974).

oauth2 means: “This is a login option for my site” such as Google oauth2.

If what you’re trying to do is this:

 ![image](https://global.discourse-cdn.com/meta/original/3X/9/4/94a058f1fc8aea1523a3df5e7c0924abcd47959b.png)

then you want to do as @sam [mentioned](https://meta.discourse.org/t/sso-vs-oauth2-difference/76543/5) and use the plugin (possibly extending it to specifically support your OAuth2 provider.

But if what you’re trying to do is this:

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/5/9/9598fd43f77b4f6d7596621fce1ae283a47b8394.png)

Then you need to write “SSO Provider” as Discourse doesn’t _care_ what’s behind it.

---

<div class="post-metadata">

### Author: ![leog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leog/32/119839_2.png) [@leog](https://meta.discourse.org/u/leog)
#### Post date: [22 december 2017 om 03:17 UTC](https://meta.discourse.org/t/login-to-discourse-with-custom-oauth2-provider/14717/23 "2017-12-22T03:17:55Z")

</div>

Super clear. Thanks for taking the time to include diagrams, really neat!

🙇‍♂️

---

<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: [29 februari 2020 om 15:50 UTC](https://meta.discourse.org/t/login-to-discourse-with-custom-oauth2-provider/14717/24 "2020-02-29T15:50:23Z")

</div>



---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [6 juli 2020 om 11:12 UTC](https://meta.discourse.org/t/login-to-discourse-with-custom-oauth2-provider/14717/25 "2020-07-06T11:12:42Z")

</div>

> [@beanieboi](#):
>
> how can i skip the registration and directly create the account?

> [@leog](#):
>
> seamless experience for my customers but seems like there is no way around it. Any other suggestion to accomplish this?

I just added some new settings which makes this possible:

> [@Automatically provision accounts with external SSO provider? (skip Create New Account prompt)](https://meta.discourse.org/t/automatically-provision-accounts-with-external-sso-provider-skip-create-new-account-prompt/134511/6):
>
> I just added some new site settings which will help with this. To skip the ‘create new account’ screen, enable sso\_overrides\_username, sso\_overrides\_email and sso\_overrides\_name. Then to skip the popup completely, enable external\_auth\_skip\_create\_confirm If you don’t see that option, make sure you’re on the latest version of tests-passed.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [6 juli 2020 om 17:00 UTC](https://meta.discourse.org/t/login-to-discourse-with-custom-oauth2-provider/14717/26 "2020-07-06T17:00:03Z")

</div>

This topic was automatically closed after 5 hours. New replies are no longer allowed.

[Previous page](https://meta.discourse.org/t/login-to-discourse-with-custom-oauth2-provider/14717.md?page=1)
