zquestz / omniauth-google-oauth2

Oauth2 strategy for Google
1.46k stars 414 forks source link

Url https://www.googleapis.com/userinfo/email deprecation #372

Closed mrnovalles closed 5 years ago

mrnovalles commented 5 years ago

Google announced that a URL used in the project to fetch user information will be deprecated in December 2019. I think the line for USER_INFO_URL will be affected. `` USER_INFO_URL = 'https://www.googleapis.com/oauth2/v3/userinfo'


Please find attached the complete email sent by Google.

Dear Google API developer,

We are reaching out to let you know that we are turning down https://www.googleapis.com/userinfo/email, which has a newer, spec-defined endpoint:

https://openidconnect.googleapis.com/v1/userinfo

The API will be turned down permanently on or after December 9, 2019, and you will start to see intermittent failures as early as October 1, 2019.

Because you’re associated with one or more of the following Google Cloud project(s), you will need to migrate them to the new endpoint:

MYAPP: Migration to the new endpoint should be straightforward for most callers. Please note the following:

The new API has the same authentication requirements as the old endpoint. The same access token will be accepted at both endpoints./userinfo/email returned two fields, “email” and “isVerified”, which are returned as “email” and “verified_email”, respectively, from the new API.The old API accepted the ‘alt’ parameter, which allowed the caller to specify whether the response should be formatted as application/x-www-form-urlencoded (absent, or alt=form), application/json (alt=json), or text/xml (alt=xml). The new API supports only application/json and specifying the ‘alt’ parameter will result in an error.

zquestz commented 5 years ago

I actually don't think we are affected. We don't actually use https://www.googleapis.com/userinfo/email in the code anywhere. We merely fetch the overall user info at https://www.googleapis.com/oauth2/v3/userinfo. We never actually use the email endpoint at all. We can reopen if we see any issues.