吊销访问令牌 /刷新令牌,撤销其他代币,并具有不同的权限
我正在使用两套Google API,并且权限一组用于Google日历,而另一组是Google Cloud Console中同一OAuth 2.0客户端的Google驱动器。
当我按照该过程撤销Google Drive的令牌时用户他们的Google日历令牌也被撤销,反之亦然。我不确定这是过去的行为还是最近的更新以及如何处理?
I am working with two sets of Google APIs and permissions one is for Google Calendar and another one is for Google Drive from the same OAuth 2.0 Client in the Google Cloud console.
From obtaining tokens to revoking I'm following this article.
where it says to revoke an access token or refresh token send a post request to https://oauth2.googleapis.com/revoke
with header Content-type:application/x-www-form-urlencoded
and param token={token}
When I follow the process to revoke a token for Google Drive for a user their Google Calendar token also got revoked and vice versa. I'm not sure if it's a behavior from past or it's a recent update and how to deal with it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Revoke将撤销用户访问您的应用程序。不管您要求访问什么API范围,所有这些。它不受单个范围的限制。
我的问题是为什么您有两个代币适用于同一用户。为什么不只是一次请求驱动器和日历访问用户一次,并有一个令牌授予您对两个API的访问?
Revoke will revoke a users access to your application. All of it no matter what api scope you requested access for. Its not limited by a single scope.
My question is why you have two tokens for the same user. Why not just request drive and calendar access of the user once and have a single token granting you access to both apis?