Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Oauth Login with omniauth-google-oauth2 failed frequently

I'm using gem omniauth-google-oauth2 to login with google from Rails app. These days I'm getting this error:

{
 "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."
 }
}

Same settings would work fine for localhost, but failed frequently and sometime work on production. I have no idea of what's going on? Is Google changing there API recently? What API do I need to enable just to login and get user info?

like image 838
Phương Nguyễn Avatar asked Mar 21 '23 02:03

Phương Nguyễn


1 Answers

I came across this problem when updating from omniauth-google-oauth2 0.2.2 to 0.2.4. To resolve the issue, go to your Google Developers Console. Click on "APIs" and enable the "Contacts API" and "Google+ API". This GitHub issue describes the problem in more detail.

like image 188
Chris Alley Avatar answered Mar 22 '23 14:03

Chris Alley