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

Can you give a little more detail in what was wrong on the other end so people looking for this error might use this to fix their issues?

I’m one of those, authorizing discourse against mattermost and I’m a little stuck with a similar error:

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"}

Thanks,
Beam

Hi there,

not anymore, I´m afraid … we had a call with one of the eam guys, and during the call he had a big revelation about what he did wrong. The bad thing is, that he never told me exactly what that was :frowning:

Sorry dude…

1 个赞

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

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

“抱歉,授权您的帐户时出错。”

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