Zammad: Google登录/身份验证不起作用,每次我得到422

创建于 2018-11-14  ·  3评论  ·  资料来源: zammad/zammad

资讯:

  • 使用的Zammad版本:2.7.0、1542128389.fd858449.centos7
  • 安装方法(源,包,..):centos7 zammad存储库
  • 操作系统:centos7.5
  • 数据库+版本:posgresql 9.2.24
  • Elasticsearch版本:5.6.13
  • 浏览器及更高版本:Chrome 70.0.3538.77(官方内部版本)(64位)

预期行为:

  • Google Auth登录可以正常工作

实际行为:

  • 我收到一个错误-422:您想要的更改被拒绝。 来自google_oauth2的消息:invalid_credentials

重现行为的步骤:

  • 我安装了最新的Zammad,按照文档进行操作,在Google Cloud中设置了一个项目,在Zammad中设置了凭据,我已经验证了我的域,并且一切正常,但它不起作用。 使用与Google Auth相同的设置,它可以在多个grafana实例中正常工作。

从主页登录不适用于新用户或现有用户,具有用户/通行证的现有用户也无法链接其Google帐户-所有用户都遇到相同的错误。

是的,我确定这是一个错误,没有功能要求或一般性问题。

生产日志

question verified

最有用的评论

谢谢,我可以确认启用Google+ API后-现在可以正常使用了。

所有3条评论

顺便说一句,同样的问题。 回调URL是正确的,并且同一封电子邮件下的Google帐户存在,并且实际上拥有zammad获得其客户端密钥+机密的项目。

有什么方法可以找到针对您的项目的auth oauth请求的日志?

感谢您的发布。
我可以通过从未启用身份验证的项目来验证这一点-但:
这不是错误。

可以在log / web-1.log中找到此问题的原因:

I, [2018-11-16T10:39:42.637447 #23972]  INFO -- omniauth: (google_oauth2) Request phase initiated.
I, [2018-11-16T10:39:42.970970 #23972]  INFO -- omniauth: (google_oauth2) Callback phase initiated.
E, [2018-11-16T10:39:43.325612 #23972] ERROR -- omniauth: (google_oauth2) Authentication failure! invalid_credentials: OAuth2::Error, {"errors"=>[{"domain"=>"usageLimits", "reason"=>"accessNotConfigured", "message"=>"Access Not Configured. Google+ API has not been used in project [PROJECTID_GOOGLE] before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/plus.googleapis.com/overview?project=[PROJECTID_GOOGLE] then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.", "extendedHelp"=>"https://console.developers.google.com/apis/api/plus.googleapis.com/overview?project=[PROJECTID_GOOGLE]"}], "code"=>403, "message"=>"Access Not Configured. Google+ API has not been used in project [PROJECTID_GOOGLE] before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/plus.googleapis.com/overview?project=[PROJECTID_GOOGLE] then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."}:
{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "accessNotConfigured",
    "message": "Access Not Configured. Google+ API has not been used in project [PROJECTID_GOOGLE] before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/plus.googleapis.com/overview?project=[PROJECTID_GOOGLE] then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
    "extendedHelp": "https://console.developers.google.com/apis/api/plus.googleapis.com/overview?project=[PROJECTID_GOOGLE]"
   }
  ],
  "code": 403,
  "message": "Access Not Configured. Google+ API has not been used in project [PROJECTID_GOOGLE] before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/plus.googleapis.com/overview?project=[PROJECTID_GOOGLE] then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
 }
}

实际上,您需要先启用Google+ API,然后才能通过Google对用户进行身份验证。
我将进行文档更新,因为我们文档的这一部分编写得很差。 不便之处,敬请原谅。

访问以下链接(您需要使用API​​-Project-ID对其进行调整)以启用Google+ API:
https://console.developers.google.com/apis/api/plus.googleapis.com/overview?project=[Your-API-Project-ID]

我将关闭此问题-您可以在这里找到文档问题: https :

谢谢,我可以确认启用Google+ API后-现在可以正常使用了。

此页面是否有帮助?
0 / 5 - 0 等级