Open muxspace opened 1 year ago
Is there a way to specify in the auth request that an OAuth access token is desired, instead of an OpenID Connect ID token?
The auto library is 6 years old, are you generating a new package first? The gar_discovery functions do that. Using the old version probably won't work I guess.
Have you also looked at the gargle library which is a more modern take?
Check out also https://github.com/samterfa/googlePackageMaker
Hi @MarkEdmondson1234 yes I saw the package is six years old. I'm still using some packages I wrote over 10 years ago, so I figured why not :laughing:
At any rate, I did create a package and almost got it working. I'll take a look at the other packages you mention and see if I can get those working. Many thanks!
Great you made progress. The generator functions should update with latest api changes, and are intended to be run each time you need them, rather than rely on the generation from a while back.
Cannot authenticate service account
I am trying to authenticate a service account. This worked last week but now is failing. I traced it to the returned token from Google, which doesn't include an access token, so a
NULL
is being returned.Note that I'm trying to create a package to connect with StackDriver logging based on the auto API generator provided by same author.
Steps to reproduce the problem
The
json_path
holds a JSON file containing the JSON key downloaded from GCP Service Account page.Expected output
Successful authentication
Actual output
When I debug
credentials_service_account
, and subsequentlytoken <- httr::oauth_service_token(endpoint = gargle_oauth_endpoint(), secrets = info, scope = scopes, sub = subject)
, I see that the OAuth response contains an ID token but not an access token.This is failing because
httr
appears to only look for an access token.I'm wondering if you've seen a change in the way Google's APIs are handling these authentication requests?
Session Info