git-annex-remote-googledrive
git-annex-remote-googledrive copied to clipboard
Limit Drive API scope
I don't know all the internals of this library, but cannot you use the https://www.googleapis.com/auth/drive.file
API scope only?
According to the docs it is
View and manage Google Drive files and folders that you have opened or created with this app
which should be enough, shouldn't it?
I thought so, too, but no. This scope is made for apps that you can open within Google Drive (by clicking on a file and selecting "open with") such as editors and the like. And it also doesn't actually work with folders, so you can't select an app to open a folder with.
At least in my experiments I could never get it to work with the drive.file
scope. I might look into it another time, so I'm leaving this issue open for now. But I'm quite pessimistic about it.
I have used rclone recently to upload some files to Drive and drive.file
worked fine for me – rclone was unable to see other files stored in my Drive but was able to upload new ones and I was able to access them using the web interface.