Google Oauth Login failed with omniauth-google-oauth2

I am using gem omniauth-google-oauth2 to log in to Google from a Rails application. These days I get 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."
 }
}

The same settings will work well for the local host, but not often and sometimes work on production. I have no idea what's going on? Has Google recently changed the API? What API do I need to enable only for login and user information?

+4
source share
3 answers

20 , , localhost ( Google). , 3 4 , .

API Google, omniauth-google-oauth2 : https://github.com/zquestz/omniauth-google-oauth2/issues/106. 2014 .

, omniauth-google-oauth2 :

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

:

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

:

: invalid_scope . {invalid = [ https://www.googleapis.com/auth/profile, https://www.googleapis.com/auth/email]}

Update: Lever ( .lever.co):

" ​​ Google, , Lever . , API OAuth Google. Google, , 11:30 PDT."

Google OAuth .

+2

omniauth-google-oauth2 0.2.2 0.2.4. , Google Developers Console. "API" "API " "Google+ API". GitHub .

+4

, , . , , .

, , :

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

: , ~ 11:30 AM PDT, , Google.

+1

Source: https://habr.com/ru/post/1533303/


All Articles