Googleアカウント経由のログインで使われているAPIが変更される
以前からGoogleは、Google OAuth 2.0 loginをGoogle+ Sign-Inに変更するようにアナウンスしていたようですが、
Google OAuth 2.0 loginが2014年9月1日に廃止されるようです。
これに伴い、Googleアカウントからのユーザ登録機能にも変更が必要になるので、ライブラリのアップデート等を行ってください。
また、Google+ APIを許可していない場合はGoogle Development Consoleからの設定も必要です。
設定手順: プロジェクトを選択->APIと認証->API->Google+ APIの無効ボタンをクリック
なぜこの問題に当たったか
Railsアプリでomniauth-google-oauth2のGemのアップデートを行った後にGoogleアカウントからのユーザ登録ができなくなったので、この問題に気づいた。
以下はその時のログ
log
INFO -- omniauth: (google_oauth2) Callback phase initiated.
ERROR -- omniauth: (google_oauth2) Authentication failure! invalid_credentials: OAuth2::Error, {"errors"=>[{"domain"=>"usageLimits", "reason"=>"accessNotConfigured", "message"=>"Access Not Configured. Please use Google Developers Console to activate the API for your project."}], "code"=>403, "message"=>"Access Not Configured. Please use Google Developers Console to activate the API for your project."}:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
],
"code": 403,
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
}