Google OAuth 2.0 incremental authorization not working

为君一笑 提交于 2019-12-10 13:53:57

问题


I have a server-side application that needs access to a combination of Google APIs, for some users of our app we only need access to one API/set of scopes (say Google Drive), for other users to another API/scope (say G+), and for some we need access to both (users can link to the other part of the app at a later time).

We wanted to use incremental authorization for this, but when we first request access to one set of scopes, then later on request access to another set of scopes, the access token we get for that second request only allows access to the second scopes, not the combination of the initially requested scopes and the new scopes, as documented in the Google link given above.

All our authorization urls include the include_granted_scopes=true parameter.

Is there any additional step we have to do to enable incremental auth? We are using the Google oauth Java client libs in our server-side app, if that makes any difference.

This question describes a similar problem, but for an installed app, and it includes a nice simple script to reproduce the problem.


回答1:


We are seeing a variant of this problem. We found that things worked find with scopes for Drive APIs, but that it didn't work for the Spreadsheets API.

Have filed an issue with Google

https://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3642&thanks=3642&ts=1412997212



来源:https://stackoverflow.com/questions/23086351/google-oauth-2-0-incremental-authorization-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!