Skip to content

Commit

Permalink
refresh before downscoping
Browse files Browse the repository at this point in the history
  • Loading branch information
shubha-rajan committed Oct 28, 2022
1 parent 15e41cd commit f670014
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,9 @@ private Certificate fetchEphemeralCertificate(KeyPair keyPair) {

if (enableIamAuth) {
try {
GoogleCredentials downscoped = getDownscopedCredentials(credentials.get());
OAuth2Credentials creds = credentials.get();
creds.refresh();
GoogleCredentials downscoped = getDownscopedCredentials(creds);
downscoped.refresh();
String token = downscoped.getAccessToken().getTokenValue();
// TODO: remove this once issue with OAuth2 Tokens is resolved.
Expand Down

0 comments on commit f670014

Please sign in to comment.