Reputation: 533
I am working on getting an app set up for google oauth2 using the omniauth google oauth2 gem. I currently have another model that is using a different oauth provider, so this is taking a bit of configuring on my end.
I was able to configure the app fine, and I can hit the route localhost:3000/auth/google_oauth2
to get to the google auth prompt. From there, I select my google account, and it attempts to redirect to my callback, but I get this error instead
{
"error": {
"code": 403,
"message": "Legacy People API has not been used in project <PROJECT_ID> before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/legacypeople.googleapis.com/overview?project=<PROJECT_ID> then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "https://console.developers.google.com/apis/api/legacypeople.googleapis.com/overview?project=<PROJECT_ID>"
}
]
}
]
}
}
When I go to the link provided https://console.developers.google.com/apis/api/legacypeople.googleapis.com/overview?project=<PROJECT_ID>
in the google developer console, I get this error from google
There was an error while loading /apis/api/legacypeople.googleapis.com/overview?project=<PROJECT_ID>. Please try again.
Which makes sense because that API is no longer in use. In my project on google, I have enabled the following API's
In an attempt at gathering what I have found online to piece this together. However, none of this works currently.
Does anyone know how I can get passed the google oauth2 Legacy People API
error?
Upvotes: 2
Views: 1273
Reputation: 41
Updating omniauth-google-oauth2 to 0.8.0 or higher avoids the error:
bundle update --source omniauth-google-oauth2
Reference https://github.com/zquestz/omniauth-google-oauth2/issues/377
Upvotes: 4