Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Dont always need credentials when signing
When getting signed urls, the credentials are always loaded only so that the client email can be used in the signing blob. The Google Auth client caches the email on the first call, which never changed. When using GCE/GKE for authentication, calling `getCredentials()` makes a call to the metadata service. This call is often not needed because the email is already known. In the case of signing many files at once, this can really degrade the metadata service and cause timeout errors. This change simply uses the cached client email if it exists, before making a remote call Fixes googleapis#1386
- Loading branch information