-
Notifications
You must be signed in to change notification settings - Fork 191
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
feat: add ID tokens for user refresh credentials #468
Conversation
) { | ||
if (is_string($jsonKey)) { | ||
if (!file_exists($jsonKey)) { | ||
throw new \InvalidArgumentException('file does not exist'); | ||
throw new InvalidArgumentException('file does not exist'); | ||
} | ||
$json = file_get_contents($jsonKey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file_get_contents
can return a false
value on error. Should we take that into consideration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that's a good point... maybe it should be file does not exist or is unreadable
instead
'json key is missing the refresh_token field' | ||
); | ||
} | ||
if ($scope && $targetAudience) { | ||
throw new InvalidArgumentException( | ||
'Scope and targetAudience cannot both be supplied' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add ID token support to
UserRefreshCredentials
Manually tested by running
gcloud auth application-default login
, and then executing the following:see also googleapis/google-auth-library-nodejs#1811