LoginSignup
19
21

More than 5 years have passed since last update.

Google OAuth 2.0 loginが2014年9月に使えなくなる(Googleアカウントからのユーザ登録機能がある場合は注意)

Posted at

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の無効ボタンをクリック
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."
 }
}
19
21
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
19
21