# 将 Discourse 用作身份提供者 (SSO, DiscourseConnect)

**URL:** <https://meta.discourse.org/t/use-discourse-as-an-identity-provider-sso-discourseconnect/32974>\
**Category:** Integrations\
**Tags:** sso, discourseconnect, how-to\
**Created:** [2015年九月7日 09:19 UTC](https://meta.discourse.org/t/use-discourse-as-an-identity-provider-sso-discourseconnect/32974 "2015-09-07T09:19:21Z")\
**Posts on this page:** 1\
**Showing post:** 101

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [2020年四月29日 17:16 UTC](https://meta.discourse.org/t/use-discourse-as-an-identity-provider-sso-discourseconnect/32974/101 "2020-04-29T17:16:04Z")

</div>

> [@balupton](#):
>
> 或者，推荐的做法是创建一个“所有用户”API 密钥，然后在创建帖子时，将该 API 密钥与 SSO 认证流程返回的用户名配对使用？

我们的 WordPress 插件正是这样处理的。用户的 Discourse 用户名会被保存到数据库中，然后与“所有用户”API 密钥配对，以该用户名发布帖子。

---

_[View the full topic](https://meta.discourse.org/t/use-discourse-as-an-identity-provider-sso-discourseconnect/32974)._
