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

**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:** 1\
**Showing post:** 21

<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

---

_[View the full topic](https://meta.discourse.org/t/sorry-there-was-an-error-authorizing-your-account/112229)._
