LoginSignup
22
7

More than 5 years have passed since last update.

2019年3月7日以降はGoogle+ APIが使えない / rails + omniauth-google-oauth2でgoogleログインができなくなったら

Last updated at Posted at 2019-03-05

Google+ API のサービス終了について

2019 年 3 月 7 日をもって、すべての Google+ API はサービスが終了します。 とのことです。

参考URL) https://developers.google.com/+/api-shutdown

これにより、Googleアカウントでログインしているサービスにも影響が出るようです。

対応方法

利用するAPIをこちらに差し替えると良いという記述がありました。
https://www.googleapis.com/oauth2/v2/userinfo

参考URL) https://github.com/zquestz/omniauth-google-oauth2/issues/340

ruby gemの omniauth-google-oauth2 のversion 0.6.0 では既に対応済みとのことです。

railsで既に導入している場合は、以下のようにgemをアップデートすると解消するかと思います。

bundle update 'omniauth-google-oauth2'

確認方法

Google APIsのダッシュボードから、Google+ APIを無効化した状態でもGoogleアカウントでログインできれば成功です。
omniauth-google-oauth2 の旧バージョンでは、Google+ API用のendpointを参照しているようですので、これで確認OKだと思います。

Google APIs) https://console.developers.google.com/apis/dashboard

image.png

参考URL

22
7
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
22
7