# Can Discourse be used as an OAuth provider?

**URL:** <https://meta.discourse.org/t/can-discourse-be-used-as-an-oauth-provider/43872>\
**Category:** SSO\
**Created:** [2016年五月7日 17:35 UTC](https://meta.discourse.org/t/can-discourse-be-used-as-an-oauth-provider/43872 "2016-05-07T17:35:41Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdpiowa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sdpiowa/32/242915_2.png) [@sdpiowa](https://meta.discourse.org/u/sdpiowa)\
**Post date:** [2016年五月7日 17:35 UTC](https://meta.discourse.org/t/can-discourse-be-used-as-an-oauth-provider/43872/1 "2016-05-07T17:35:41Z")

</div>

Can Discourse function as an oAuth provider for a system like Rocket.Chat? I’m still trying to figure out what the difference is between oAuth, SSO, and what all the terminology means. Basically, we need Discourse to host the user database, and another chat system (maybe Rocket.Chat, maybe something else) to patch into that database for authentication purposes.

Not really sure what values would need to go where on Rocket.Chat’s end for testing purposes:

 ![](https://global.discourse-cdn.com/meta/original/3X/d/d/dd1750dab830bbd74a90d0e2ea68a40bb8c82a6f.png)

Apologies for my ignorance. This is all new to me. I was trying to follow some of the instructions in other threads, but wasn’t getting very far because they were addressing slightly different situations.

---

<div class="post-metadata">

**Author:** ![fantasticfears](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fantasticfears/32/119608_2.png) [@fantasticfears](https://meta.discourse.org/u/fantasticfears)\
**Post date:** [2016年五月7日 18:18 UTC](https://meta.discourse.org/t/can-discourse-be-used-as-an-oauth-provider/43872/2 "2016-05-07T18:18:13Z")

</div>

OAuth provider is a completely different thing. It’s not supported. And OAuth provider is rather complicated which takes a lot of effort to build.

---

<div class="post-metadata">

**Author:** ![sdpiowa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sdpiowa/32/242915_2.png) [@sdpiowa](https://meta.discourse.org/u/sdpiowa)\
**Post date:** [2016年五月7日 18:18 UTC](https://meta.discourse.org/t/can-discourse-be-used-as-an-oauth-provider/43872/3 "2016-05-07T18:18:55Z")

</div>

Gotcha. Thank you very much.

---

<div class="post-metadata">

**Author:** ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)\
**Post date:** [2016年五月8日 10:56 UTC](https://meta.discourse.org/t/can-discourse-be-used-as-an-oauth-provider/43872/4 "2016-05-08T10:56:36Z")

</div>

And just to clarify, what you want to do here is entirely doable. You’d probably want to:

- Use Discourse as an SSO provider and hook that up with Rocket.Chat’s login.
- Enable standard OAuth login providers like Google and Facebook for Discourse logins so that users could register/login using those standard services.

---

<div class="post-metadata">

**Author:** ![auryn\_macmillan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/auryn_macmillan/32/56633_2.png) [@auryn\_macmillan](https://meta.discourse.org/u/auryn_macmillan)\
**Post date:** [2016年七月14日 10:47 UTC](https://meta.discourse.org/t/can-discourse-be-used-as-an-oauth-provider/43872/5 "2016-07-14T10:47:01Z")

</div>

I’m really keen to set this up also. I familiar and comfortable with setting up discourse as an SSO provider, but no idea how to get rocket.chat to use it. A little out of scope for you I know, but any idea? I’ve had a pretty good google and look through the Rocket.Chat docs, but can’t seem to find it. My guess is I just don’t quite know the right thing to be looking for.

---

<div class="post-metadata">

**Author:** ![lrossouw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lrossouw/32/121275_2.png) [@lrossouw](https://meta.discourse.org/u/lrossouw)\
**Post date:** [2016年九月7日 08:05 UTC](https://meta.discourse.org/t/can-discourse-be-used-as-an-oauth-provider/43872/6 "2016-09-07T08:05:21Z")

</div>

Would also like rocket.chat using discourse as SSO provider.

---

<div class="post-metadata">

**Author:** ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)\
**Post date:** [2017年三月8日 20:13 UTC](https://meta.discourse.org/t/can-discourse-be-used-as-an-oauth-provider/43872/7 "2017-03-08T20:13:57Z")

</div>

Just a bump to suggest the value of using Discourse user management as a community’s single user identity hub. And the easiest, most standard way for others to tap into that is to use Discourse as an oAuth provider (IMHO).

---

<div class="post-metadata">

**Author:** ![pacharanero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pacharanero/32/500583_2.png) [@pacharanero](https://meta.discourse.org/u/pacharanero)\
**Post date:** [2019年一月28日 12:03 UTC](https://meta.discourse.org/t/can-discourse-be-used-as-an-oauth-provider/43872/8 "2019-01-28T12:03:45Z")

</div>

_BUMP_

This feature would be game-changing for those wanting to federate identity across a number of Discourses - increasingly I am being asked by customers if they can have a [MyHealthTechDiscourse B] but sign in with [ThisOtherHealthTechDiscourseWhichAllOurUsersAreAlreadyOn A]

If [Discourse A] could respond to the OAuth2 login flow at standard endpoints this could be relatively straightforward to build (but probably out reach of my personal ability)

---

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [2019年一月28日 13:47 UTC](https://meta.discourse.org/t/can-discourse-be-used-as-an-oauth-provider/43872/9 "2019-01-28T13:47:42Z")

</div>

> [@pacharanero](#):
>
> I am being asked by customers if they can have a [MyHealthTechDiscourse B] but sign in with [ThisOtherHealthTechDiscourseWhichAllOurUsersAreAlreadyOn A]

Discourse to [Discourse SSO](https://meta.discourse.org/t/13045?silent=true) already works out of the box for years.

See [Use Discourse as an identity provider (SSO, DiscourseConnect)](https://meta.discourse.org/t/using-discourse-as-a-sso-provider/32974)

---

<div class="post-metadata">

**Author:** ![aaronpk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aaronpk/32/149994_2.png) [@aaronpk](https://meta.discourse.org/u/aaronpk)\
**Post date:** [2021年八月26日 22:17 UTC](https://meta.discourse.org/t/can-discourse-be-used-as-an-oauth-provider/43872/10 "2021-08-26T22:17:38Z")

</div>

谢谢，但这似乎是一种专有的单点登录（SSO）流程。我原本希望看到基于标准的 OAuth/OIDC 支持，这样它就能与其他软件开箱即用，而无需为其他软件编写自定义插件来消费 [Discourse SSO](https://meta.discourse.org/t/13045?silent=true)。

---

<div class="post-metadata">

**Author:** ![tachibanalolo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tachibanalolo/32/233762_2.png) [@tachibanalolo](https://meta.discourse.org/u/tachibanalolo)\
**Post date:** [2021年十二月26日 17:58 UTC](https://meta.discourse.org/t/can-discourse-be-used-as-an-oauth-provider/43872/11 "2021-12-26T17:58:22Z")

</div>

和你一样。

---

<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:** [2022年七月25日 15:30 UTC](https://meta.discourse.org/t/can-discourse-be-used-as-an-oauth-provider/43872/12 "2022-07-25T15:30:14Z")

</div>

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