# 抱歉，您的账户授权时出现了错误

**URL:** <https://meta.discourse.org/t/sorry-there-was-an-error-authorizing-your-account/112229>\
**Category:** SSO\
**Tags:** oauth2\
**Created:** [2019年三月21日 08:51 UTC](https://meta.discourse.org/t/sorry-there-was-an-error-authorizing-your-account/112229 "2019-03-21T08:51:24Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![Beam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/beam/32/169161_2.png) [@Beam](https://meta.discourse.org/u/Beam)\
**Post date:** [2020年二月7日 14:10 UTC](https://meta.discourse.org/t/sorry-there-was-an-error-authorizing-your-account/112229/21 "2020-02-07T14:10:20Z")

</div>

能否提供更多关于另一端出错的细节，以便遇到此错误的人能据此解决问题？

我就是其中之一，正在尝试将 Discourse 与 Mattermost 进行授权，但遇到了类似的错误，目前有些卡住：

```plaintext
Started GET "/auth/oauth2_basic/callback?code=<redacted>&state=<redacted>" for <IPv4> at 2020-02-07 13:07:46 +0000
(oauth2_basic) Setup endpoint detected, running now.
(oauth2_basic) Callback phase initiated.
(oauth2_basic) Authentication failure! invalid_credentials: OAuth2::Error,
Started GET "/auth/failure?message=invalid_credentials&origin=https%3A%2F%2F<discourse_FQDN>%2Flogin&strategy=oauth2_basic" for <IPv4> at 2020-02-07 13:07:47 +0000
Processing by Users::OmniauthCallbacksController#failure as HTML
  Parameters: {"message"=>"invalid_credentials", "origin"=>"https://<discourse_FQDN>/login", "strategy"=>"oauth2_basic"}

```

谢谢，  
Beam

---

<div class="post-metadata">

**Author:** ![Wurzelseppi](https://avatars.discourse-cdn.com/v4/letter/w/eada6e/32.png) [@Wurzelseppi](https://meta.discourse.org/u/Wurzelseppi)\
**Post date:** [2020年二月10日 07:20 UTC](https://meta.discourse.org/t/sorry-there-was-an-error-authorizing-your-account/112229/22 "2020-02-10T07:20:12Z")

</div>

你好，

恐怕不行了……我们和一位 EAM 团队的成员通了电话，他在通话中对自己犯的错误有了重大发现。糟糕的是，他从未确切告诉我那到底是什么：😕

抱歉啊兄弟……

---

<div class="post-metadata">

**Author:** ![MihirR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihirr/32/475158_2.png) [@MihirR](https://meta.discourse.org/u/MihirR)\
**Post date:** [2024年十二月6日 09:46 UTC](https://meta.discourse.org/t/sorry-there-was-an-error-authorizing-your-account/112229/23 "2024-12-06T09:46:27Z")

</div>

我可能迟到了，但我最近遇到了类似的问题。在我的例子中，问题出在我安装了 **Discourse** 并将其与 **Google Sign-In** 集成之后。起初一切都正常，但后来我删除了原始的 droplet（服务器实例）并重新安装了 Discourse。

在重新安装过程中，我为集成重用了 **相同的 Google API 凭据** ，这导致了错误消息：

> _“抱歉，授权您的帐户时出错。”_

经过一些故障排除，我意识到问题出在重用的凭据上。为了解决这个问题，我为集成创建了 **一套新的 Google API 凭据** 。一旦我用这些新凭据更新了配置，一切都开始完美运行了！

[上一頁](https://meta.discourse.org/t/sorry-there-was-an-error-authorizing-your-account/112229.md?page=1)
