Closed octaviancorlade closed 4 years ago
I'm just thinking about this to make sure no issues, I'm a bit cautious of ... as it can lead to some weird bugs for people if they use an old argument etc.
That is correct, also it will make it harder to add new options to gar_auth
in case those could be used already by token_fetch
. The code was there and I wasn't sure how big these issues could be so I opened this, but it can be closed if needed.
Calling token_fetch
explicitly also works and is fairly easy
gar_auth_configure(app = oauth_app("google", key = client.id, secret = client.secret))
token = token_fetch(app = gar_oauth_app(), credentials = list(refresh_token = "1//refresh-token-here")
gar_auth(token)
I think this may cause problems down the line, would rather arguments are passed through explicity, or perhaps a config object to avoid too many parameters.
This allows to pass any parameter to any of the default functions used by
token_fetch
, for instance it works with offline refresh tokens as follows