根据最新通知,google plus oauth 已折旧。
根据我的理解,只有当我在代码中使用 plus.me 时,我才应该担心。
My code:
google = oauth.remote_app(
'google',
consumer_key=app.config.get('GOOGLE_ID'),
consumer_secret=app.config.get('GOOGLE_SECRET'),
request_token_params={
'scope': ['https://www.googleapis.com/auth/userinfo.email'],
'access_type': 'offline',
'approval_prompt':'force'
},
base_url='https://www.googleapis.com/oauth2/v1/',
request_token_url=None,
access_token_method='POST',
access_token_url='https://accounts.google.com/o/oauth2/token',
authorize_url='https://accounts.google.com/o/oauth2/auth',
)
但是,我仍然可以在我的谷歌开发者控制台中看到 openid。
Google API 的范围
此外,API 响应返回范围为 plus.me
Response from google auth: {
u'access_token': u'ya29.GluoFWy',
u'id_token'hbGciYA',
u'expires_in': 3600,
u'token_type': u'Bearer',
u'scope': u'https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/plus.me',
u'refresh_token': u'1/jgwO0w'}
我已经检查过我没有在任何地方访问 plus.me。我真的很困惑是否需要更改代码。