Search code examples
authenticationruby-on-rails-4oauthgoogle-oauthgoogle-authentication

Google-Oauth authentication error


Getting the following error when trying to login with google -oauth.

I, [2014-04-23T10:08:24.349056 #4905]  INFO -- omniauth: (google_oauth2) Request phase initiated.

I, [2014-04-23T10:08:24.861288 #4905]  INFO -- omniauth: (google_oauth2) Request phase initiated.

I, [2014-04-23T10:08:28.637438 #4905]  INFO -- omniauth: (google_oauth2) Callback phase initiated.

E, [2014-04-23T10:08:30.207714 #4905] 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."
 }
}

Solution

  • The answer is in your error log, Activate the Google API in developers settings in your account.