Safely cache and store personal access tokens

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.

Hi @howardbaek
Check out the keyring and keyringr packages designed for use in your situation.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.