Google 驱动器 API 范围:https://www.googleapis.com/auth/drive
Google drive API SCOPE : https://www.googleapis.com/auth/drive
我正在制作一个多租户平台,将客户的 Google 驱动器集成到:
- 在他们的 Google 驱动器
中创建一个文件夹
- 与租户共享编辑权限
- 允许租户创建子文件夹和写入文档。
我正在使用 SCOPE: https://www.googleapis.com/auth/drive,效果很好。
但是,SCOPE 非常普遍,Grant Full 允许访问所有用户文件的范围。
我只是想创建一个文件夹编辑器访问权限 within.I 不想访问客户之前在他们的云端硬盘中拥有的任何内容。
您认为有什么方法可以限制 SCOPE API?
感谢@Tanaike!范围:https://www.googleapis.com/auth/drive.file 解决了我的问题。
In that case, how about using the scope of
https://www.googleapis.com/auth/drive.file instead of
https://www.googleapis.com/auth/drive? The official document of
https://www.googleapis.com/auth/drive.file says Per-file access to
files created or opened by the app. File authorization is granted on a
per-user basis and is revoked when the user deauthorizes the app.. Is
this the direction you expect? – Tanaike 58 mins ago
我正在制作一个多租户平台,将客户的 Google 驱动器集成到:
- 在他们的 Google 驱动器 中创建一个文件夹
- 与租户共享编辑权限
- 允许租户创建子文件夹和写入文档。
我正在使用 SCOPE: https://www.googleapis.com/auth/drive,效果很好。 但是,SCOPE 非常普遍,Grant Full 允许访问所有用户文件的范围。
我只是想创建一个文件夹编辑器访问权限 within.I 不想访问客户之前在他们的云端硬盘中拥有的任何内容。
您认为有什么方法可以限制 SCOPE API?
感谢@Tanaike!范围:https://www.googleapis.com/auth/drive.file 解决了我的问题。
In that case, how about using the scope of https://www.googleapis.com/auth/drive.file instead of https://www.googleapis.com/auth/drive? The official document of https://www.googleapis.com/auth/drive.file says Per-file access to files created or opened by the app. File authorization is granted on a per-user basis and is revoked when the user deauthorizes the app.. Is this the direction you expect? – Tanaike 58 mins ago