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

Be proactive about serialization formats #591

Closed
jennybc opened this issue May 9, 2019 · 1 comment
Closed

Be proactive about serialization formats #591

jennybc opened this issue May 9, 2019 · 1 comment
Labels
feature a feature request or enhancement oauth 🏓

Comments

@jennybc
Copy link
Member

jennybc commented May 9, 2019

Currently OAuth tokens are indexed by their hash and the method calls serialize() without specifying the version:

httr/R/oauth-token.r

Lines 104 to 107 in af25ebd

msg <- serialize(
list(self$endpoint, self$app, normalize_scopes(self$params$scope)),
NULL
)

gargle extends httr::Token2.0 with Gargle2.0 and its hash method calls super$hash(). I am seeing that OAuth tokens cached with R 3.5 are un-retrievable after upgrading to 3.6, because their hash has changed due to the change in R's default serialization version. This is not tragic, as OAuth tokens should be regarded as perishable. But it can be somewhat mystifying.

httr2 should always set the version when doing this sort of thing going forward.

@hadley hadley added feature a feature request or enhancement oauth 🏓 labels Apr 3, 2020
@hadley
Copy link
Member

hadley commented Oct 31, 2023

httr has been superseded in favour of httr2, so is no longer under active development. If this problem is still important to you in httr2, I'd suggest filing an issue offer there 😄. Thanks for using httr!

@hadley hadley closed this as completed Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement oauth 🏓
Projects
None yet
Development

No branches or pull requests

2 participants