Skip to content
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

Better token location #228

Open
nathancday opened this issue Feb 27, 2022 · 0 comments
Open

Better token location #228

nathancday opened this issue Feb 27, 2022 · 0 comments

Comments

@nathancday
Copy link
Member

We've stumbled on path issues by storing tokens in the R session's HOME directory. But by stumbling we found a new, cleaner way to store tokens.

For what boxr is doing (storing a token), you probably want to use either tools::R_user_dir(..., which = "cache") (introduced in R 4.0.0) or rappdirs::user_cache_dir()) (would work on earlier versions of R) as the location. That's sort of the morally right place to put the token anyway and it relieves you of your Windows vs everything else dilemma.

Back porting this function to pre-4.0 feels a bit overkill IMO, but we could target this change in token location for a later R/boxr release version. I think the code to handle token paths is only in a few auth/read functions and should be stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant