Can I use user access_token from user-centric OAuth login in this library
Hello! I'm looking for some help.
Can I use accessToken that I receive from OAuth to upload and read files on Google Cloud Storage? I have found that this two scopes will give me rights to manipulate files:
https://www.googleapis.com/auth/devstorage.read_only https://www.googleapis.com/auth/devstorage.read_write
from: https://developers.google.com/identity/protocols/googlescopes#storagev1
On the other hand, in this library the authorisation process looks like here: https://github.com/googleapis/google-cloud-node/blob/master/docs/authentication.md
Is it possible to use accessToken instead of service account? I'm developing desktop app with no backend server, and I would like to avoid leaving service account's private key in code ;)
If it is not the right library to work with in such case, what should I use to upload, list and read files (on behalf of user account)?
Thank you in advance, Krzysztof
Hello! We are limited by the authentication library we are using, which does not support providing a token directly. I will close this issue to let the feature request issue there track the progress.
You can also look into using signed URLs and access control, maybe that's all you need! https://cloud.google.com/storage/docs/concepts#access-control