It is very hard to find or clear the cache, partly because the gargle_oauth_cache() docs show wrong default path. So in this issue, I would like to :
- Report a doc issue
- Feature request: add
Documentation: gargle_oauth_cache() states wrong default path?
The documentation for gargle_oauth_cache() states:
TRUE means to cache using the default user-level cache file, ~/.R/gargle/gargle-oauth
But it seems that the default path is determined by rappdirs::user_cache_dir("gargle"), which resolves to ~/.cache/gargle on Linux (and platform-specific paths on macOS/Windows). Following the docs, a user would look in ~/.R/gargle/gargle-oauth, find nothing, and be stuck.
The actual tokens live in ~/.cache/gargle/, discoverable only by reading the source code or calling gargle::gargle_oauth_sitrep() (which is not referenced in ?gargle_oauth_cache).
Feature request: expose the cache path and provide a cache clearing helper
My use scenario: a cached token has stale or insufficient scopes, causing (403) Insufficient Permission errors. The fix is to delete the cached token and re-authenticate, but:
- gargle_oauth_cache() returns TRUE, not a path
- The documentation points to a path that does not exist
- gargle_oauth_sitrep() shows the real path but is not cross-referenced from ?gargle_oauth_cache
It would help to have either:
- A function like
gargle_oauth_cache_path() that returns the cache path
- A function
like gargle_oauth_clear(email = "user@example.com") to delete a specific cached token
- At minimum, updating the docs for gargle_oauth_cache() to show the correct default path and cross-reference gargle_oauth_sitrep()
Session info
- version: 1.6.1
- Platform: Linux (Ubuntu 24.04)
It is very hard to find or clear the cache, partly because the
gargle_oauth_cache()docs show wrong default path. So in this issue, I would like to :Documentation:
gargle_oauth_cache()states wrong default path?The documentation for
gargle_oauth_cache()states:But it seems that the default path is determined by
rappdirs::user_cache_dir("gargle"), which resolves to~/.cache/gargleon Linux (and platform-specific paths on macOS/Windows). Following the docs, a user would look in ~/.R/gargle/gargle-oauth, find nothing, and be stuck.The actual tokens live in ~/.cache/gargle/, discoverable only by reading the source code or calling gargle::gargle_oauth_sitrep() (which is not referenced in ?gargle_oauth_cache).
Feature request: expose the cache path and provide a cache clearing helper
My use scenario: a cached token has stale or insufficient scopes, causing (403) Insufficient Permission errors. The fix is to delete the cached token and re-authenticate, but:
It would help to have either:
gargle_oauth_cache_path()that returns the cache pathlike gargle_oauth_clear(email = "user@example.com")to delete a specific cached tokenSession info