google-auth-library
Advanced tools
Comparing version 7.0.3 to 7.0.4
@@ -473,8 +473,14 @@ "use strict"; | ||
const creds = await this.getClient(); | ||
try { | ||
return await creds.getProjectId(); | ||
} | ||
catch (e) { | ||
return null; | ||
} | ||
// Do not suppress the underlying error, as the error could contain helpful | ||
// information for debugging and fixing. This is especially true for | ||
// external account creds as in order to get the project ID, the following | ||
// operations have to succeed: | ||
// 1. Valid credentials file should be supplied. | ||
// 2. Ability to retrieve access tokens from STS token exchange API. | ||
// 3. Ability to exchange for service account impersonated credentials (if | ||
// enabled). | ||
// 4. Ability to get project info using the access token from step 2 or 3. | ||
// Without surfacing the error, it is harder for developers to determine | ||
// which step went wrong. | ||
return await creds.getProjectId(); | ||
} | ||
@@ -481,0 +487,0 @@ /** |
@@ -7,2 +7,9 @@ # Changelog | ||
### [7.0.4](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.0.3...v7.0.4) (2021-04-06) | ||
### Bug Fixes | ||
* do not suppress external project ID determination errors ([#1153](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1153)) ([6c1c91d](https://www.github.com/googleapis/google-auth-library-nodejs/commit/6c1c91dac6c31d762b03774a385d780a824fce97)) | ||
### [7.0.3](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.0.2...v7.0.3) (2021-03-23) | ||
@@ -9,0 +16,0 @@ |
{ | ||
"name": "google-auth-library", | ||
"version": "7.0.3", | ||
"version": "7.0.4", | ||
"author": "Google Inc.", | ||
@@ -5,0 +5,0 @@ "description": "Google APIs Authentication Client Library for Node.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
358586
6195