Zammad: Googleログイン/認証が機能しない、毎回422を取得する

作成日 2018年11月14日  ·  3コメント  ·  ソース: zammad/zammad

情報:

  • 使用済みZammadバージョン:2.7.0、1542128389.fd858449.centos7
  • インストール方法(ソース、パッケージ、..):centos7zammadリポジトリ
  • オペレーティングシステム:centos7.5
  • データベース+バージョン:posgresql 9.2.24
  • Elasticsearchバージョン:5.6.13
  • ブラウザ+バージョン:Chrome 70.0.3538.77(公式ビルド)(64ビット)

予想される行動:

  • Google認証ログインが期待どおりに機能する

実際の動作:

  • エラーが発生します-422:必要な変更が拒否されました。 google_oauth2からのメッセージ:invalid_credentials

動作を再現する手順:

  • 最新のZammadをインストールし、ドキュメントに従い、Google Cloudでプロジェクトをセットアップし、Zammadでクレデンシャルをセットアップしました。ドメインを確認しましたが、すべてが機能しません。 グーグル認証の同じ設定で、それは問題なくいくつかのグラファナインスタンスで動作します。

メインページからのログインは、新規または既存のユーザーには機能しません。また、user / passを持つ既存のユーザーは、Googleアカウントをリンクできません。すべて同じエラーが発生します。

はい、これはバグであり、機能のリクエストや一般的な質問はないと確信しています。

production.log

question verified

最も参考になるコメント

おかげで、Google + APIを有効にした後、期待どおりに機能することを確認できました。

全てのコメント3件

ここで同じ問題があります。 コールバックURLは正しく、同じメールアドレスのGoogleアカウントが存在し、zammadがクライアントキーとシークレットを取得したプロジェクトを実際に所有しています。IAM/ AuthのGoogleログをいくつか見つけようとしましたが、成功しませんでした。

プロジェクトへのauthoauthリクエストのログを見つける方法はありますか?

投稿していただきありがとうございます。
認証を有効にしたことがないプロジェクトでこれを確認できましたが、次のようになりました。
これはバグではありません。

この問題の原因は、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を介してユーザーを認証する前に、実際にはGoogle + APIを有効にする必要があります。
ドキュメントのこの部分は十分に記述されていないため、ドキュメントの更新に取り組んでいます。 ご不便をおかけして申し訳ありません。

Google+ APIを有効にするには、次のリンクにアクセスします(API-Project-IDで調整する必要があります)。
https://console.developers.google.com/apis/api/plus.googleapis.com/overview?project=[Your-API-Project-ID]

この問題をクローズします-ドキュメントの問題はここで見つけることができます: https

おかげで、Google + APIを有効にした後、期待どおりに機能することを確認できました。

このページは役に立ちましたか?
0 / 5 - 0 評価