oauth - Multiple Google Account Authorization For Single Google Drive API
问题描述
Can I authorize multiple Google Accounts with single Google Drive API? Because when I am requesting this URI
where |+|redirecturi|+| and |+|clientid|+| replaced by original one, so it is directly redirecting me to redirect_uri without opening consent screen.
解决方案
oauth2 的工作方式是用户必须登录到他们的谷歌帐户并授予您的应用程序访问他们数据的权限。返回给您的访问令牌绑定到用于创建它的客户端 ID。同意屏幕将显示给用户,代码将在重定向 uri 端点返回到您的应用程序
以下 url 为用户构建了一份同意书。
https://accounts.google.com/o/oauth2/auth?client_id= {clientid}.apps.googleusercontent.com&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope= https://www.googleapis.com/ auth/analytics.readonly&response_type=code
在这种情况下,要求他们授予您的应用程序“谷歌分析窗口”访问您的谷歌分析帐户的权限。在用户看到此表单之前,他们必须先登录。
回答者:
可以同意您的应用程序的用户数量没有限制。应向每个用户显示同意屏幕并授予您的应用程序访问权限,您将被授予访问他们数据的权限。
推荐阅读
- mysql - 计算和求和后续 SQL 条目之间的时间
- javascript - chrome.storage.local 写入密钥的问题
- c# - PDF 文件显示在 localhost 的 iframe 中,但现在显示在 asp.net 的在线网页中
- javascript - 将数组 javascript 作为参数传递给控制器
- pascalscript - 我的字符串数组的 Pascal InsertsionSort 无法正常工作
- angular - 如果 kendo-ui 默认使用英语表达但我在我的应用程序中使用另一种语言,我如何生成翻译文件?
- javascript - 无法将表单数据发送到 PHP 页面
- python-3.x - Elasticsearch 7:无法解析日期
- c# - Parallel.For 启动了意外数量的线程
- javascript - 推送订阅已取消订阅或过期,状态码为 410