I'm working on a R package that interacts with APIs from GitHub, Google, and Calendly and these services all have tokens. Our package directs the user to create a personal access token, let's say a GitHub PAT, and asks the user to paste the token. Then, we save the token in a variable called token
and cache it.
I was wondering what are some best practices to cache (store) these personal access tokens? Currently, we are saving the tokens as a RDS file and moving it to inst/extdata/cached_secrets
.