-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change cache location for oauth token? #282
Comments
I am having a hard time following this.
I would expect that to unfold in the opposite order. As in, first you set the option. Then you do something to trigger auth, at which point the "token ... is found ok." These tokens have their cache path built into them and that can't be changed. So I think you need to fully embrace the caching workflow or fully take charge of the token. I think you are in the awkward middle. Tell me what happens before this:
Where does |
Ah, ok, I was wondering if the token had a cache baked in. I created the token in an interactive session and encrypt it to an RDS file. My goal is to deploy for non-interactive use by sharing the encrypted token and providing the decrypt key via environmental variable. |
For some reason, I had a different workflow for generating the token and encrypting it that was almost identical to https://gargle.r-lib.org/articles/managing-tokens-securely.html except that I didn't set |
It sounds like what you are doing is very similar to something I wrote up here for gmailr: https://gmailr.r-lib.org/articles/deploy-a-token.html. Yes, given what you want to do, you want |
I am running a script in a Docker container with a provided oauth token for
{{googledrive}}
.The token itself is found ok, and I can set the cache location with
options(gargle_oauth_cache = ...)
but then when I run
googledrive::drive_auth()
, it tries to cache it in the default location (which is not-accessible in the Docker container).It's not a big deal for me to create the directory, but it seems strange to me that this location cannot be changed?
If I create the
/root/Library/Caches/gargle/
folder first, thendrive_auth()
runs successfully.The text was updated successfully, but these errors were encountered: