Question

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?

Was it helpful?

Solution 2

We're started experiencing the same issue 20 hours ago, but it's appearing on both production and localhost (which use two separate Google accounts). The strange thing is that we are able to log in every 3 or 4 tries, but not every time.

As far as an API change on Google's end, this issue on omniauth-google-oauth2 seems relevant: https://github.com/zquestz/omniauth-google-oauth2/issues/106. However, this deprecation should not be enforced until September, 2014.

Also, editing the omniauth-google-oauth2 gem directly and changing these lines:

class GoogleOauth2 < OmniAuth::Strategies::OAuth2
  BASE_SCOPE_URL = "https://www.googleapis.com/auth/"
  DEFAULT_SCOPE = "userinfo.email,userinfo.profile"

to this:

class GoogleOauth2 < OmniAuth::Strategies::OAuth2
  BASE_SCOPE_URL = "https://www.googleapis.com/auth/"
  DEFAULT_SCOPE = "email,profile"

Yielded this error:

Error: invalid_scope Some requested scopes were invalid. {invalid=[https://www.googleapis.com/auth/profile, https://www.googleapis.com/auth/email]}

Update: Quoted from an email from Lever (hire.lever.co):

"The issue stemmed from an bug in a release Google made to the authentication system Lever uses to identify users last night. We were among some apps who lost the ability to verify users via their Google OAuth API. We've been in communication with Google, and we've been told that the release was reverted at 11:30AM PDT."

Google OAuth appears to be fixed for us now.

OTHER TIPS

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.

We found that Billing had been enabled for one of our projects, but no Billing information entered. Disabling Billing for this particular project so far seems to have resolved this issue for us.

The error we were getting was:

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

Update: Of course our fix was applied ~ 11:30 AM PDT, so I am I'm voting this was a Google issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top