# Discourse能否提供类似StackExchange的SSO/联合登录服务？

**URL:** https://meta.discourse.org/t/could-discourse-offer-a-stackexchange-like-sso-federated-login-service/160914
**Category:** Feature
**Created:** [2020 年8 月 14 日 18:49 UTC](https://meta.discourse.org/t/could-discourse-offer-a-stackexchange-like-sso-federated-login-service/160914 "2020-08-14T18:49:23Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### 作者： ![sunjam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunjam/32/175682_2.png) [@sunjam](https://meta.discourse.org/u/sunjam)
#### 发布日期： [2020 年8 月 14 日 19:48 UTC](https://meta.discourse.org/t/could-discourse-offer-a-stackexchange-like-sso-federated-login-service/160914/2 "2020-08-14T19:48:33Z")

</div>

> [@alexweissman](#):
>
> 我知道关于这个问题已经有过 [其他讨论](https://meta.discourse.org/t/federation-support-for-discourse/90921)，但它们似乎范围过于复杂且偏离了主题。

那是另一种类型的联合，将 Discourse 与 Mastodon 等工具连接起来，用于帖子和回复（而非登录）。

你可以查看 [Discourse SSO](https://meta.discourse.org/t/13045?silent=true)，相关讨论在 meta 的各个主题中都有涉及。

> [@Setup DiscourseConnect - Official Single-Sign-On for Discourse (sso)](https://meta.discourse.org/t/official-single-sign-on-for-discourse-sso/13045):
>
> [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) is a core Discourse feature that allows you to configure “Single Sign-On (SSO)” to completely outsource all user registration and login from Discourse to another site. Offered to our [pro, business and enterprise hosting customers](https://discourse.org/pricing). information_source (Feb 2021) ‘[Discourse SSO](https://meta.discourse.org/t/13045?silent=true)’ is now ‘[DiscourseConnect](https://meta.discourse.org/t/13045?silent=true)’. If you are running an old version of Discourse, the settings below will be named sso\_... rather than discourse\_connect\_... The Problem Many sites wishing to integrate wit…

> [@Use Discourse as an identity provider (SSO, DiscourseConnect)](https://meta.discourse.org/t/using-discourse-as-a-sso-provider/32974):
>
> So you want to use Discourse as an identity provider for your own web app? Great! Let’s get started. Enable [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) provider setting Under Discourse admin site settings (/admin/site\_settings) enable setting enable discourse connect provider and add a secret string to discourse connect provider secrets (used to hash SSO payloads). Implement [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) in your web app: Generate a random [nonce](https://en.wikipedia.org/wiki/Cryptographic_nonce). Let’s call this value NONCE. Save it temporarily so that you can verify it with the …

---

_[View the full topic](https://meta.discourse.org/t/could-discourse-offer-a-stackexchange-like-sso-federated-login-service/160914)._
