Skip to content

Latest commit

Β 

History

History
1277 lines (702 loc) Β· 81.5 KB

CHANGELOG.md

File metadata and controls

1277 lines (702 loc) Β· 81.5 KB

Changelog

npm history

9.6.3 (2024-02-06)

Bug Fixes

  • Always sign with scopes on Non-Default Universes (#1752) (f3d3a03)

9.6.2 (2024-02-02)

Bug Fixes

9.6.1 (2024-02-01)

Bug Fixes

9.6.0 (2024-01-29)

Features

  • Open More Endpoints for Customization (#1721) (effbf87)
  • Use self-signed JWTs when non-default Universe Domains (#1722) (7e9876e)

Bug Fixes

  • Revert Missing WORKFORCE_AUDIENCE_PATTERN (#1740) (422de68)

9.5.0 (2024-01-25)

Features

Bug Fixes

9.4.2 (2024-01-04)

Bug Fixes

9.4.1 (2023-12-01)

Bug Fixes

  • Support 404 When GaxiosError != GaxiosError (#1707) (704674f)

9.4.0 (2023-11-30)

Features

9.3.0 (2023-11-29)

Features

Bug Fixes

9.2.0 (2023-10-26)

Features

Bug Fixes

9.1.0 (2023-10-02)

Features

Bug Fixes

  • deps: Update dependency @google-cloud/storage to v7 (#1629) (8075b6f)
  • deps: Update dependency @googleapis/iam to v11 (#1622) (03c0ac9)
  • deps: Update dependency google-auth-library to v9 (#1618) (1873fef)
  • deps: Update dependency puppeteer to v21 (#1627) (dd04fbd)
  • Workforce Audience Pattern (#1654) (77eeaed)

9.0.0 (2023-07-20)

⚠ BREAKING CHANGES

  • deps: upgrade node-gtoken to 7.0.0 (#1590)
  • make transporter attribute type more generic (#1406)
  • migrate to Node 14 (#1582)
  • remove arrify and fast-text-encoding (#1583)

Features

  • Make transporter attribute type more generic (#1406) (dfac525)

Bug Fixes

  • deps: Update dependency @googleapis/iam to v10 (#1588) (f95a153)

Build System

Miscellaneous Chores

8.9.0 (2023-06-29)

Features

  • Adds universe_domain field to base external client (#1548) (7412d7c)
  • Utilize gcp-metadata's GCP Residency Check (#1513) (43377ac)

Bug Fixes

8.8.0 (2023-04-25)

Features

  • Add External Account Authorized User client type (#1530) (06d4ef3)
  • Document External Account Authorized User Credentials (#1540) (c6138be)

Bug Fixes

  • deps: Update gcp-metadata to v5.2.0 (#1502) (2562d11)
  • deps: Update dependency @googleapis/iam to v4 (#1482) (00d6135)
  • deps: Update dependency @googleapis/iam to v5 (#1526) (a1f9835)
  • deps: Update dependency @googleapis/iam to v6 (#1536) (86a4de8)
  • deps: Update dependency @googleapis/iam to v7 (#1538) (fdb67dc)
  • Do not call metadata server if security creds and region are retrievable through environment vars (#1493) (d4de941)
  • Removing 3pi config URL validation (#1517) (a278d19)
  • Removing aws url validation (#1531) (f4d9335)

8.7.0 (2022-11-08)

Features

  • Introduce environment variable for quota project (#1478) (8706abc)

Bug Fixes

  • deps: Update dependency puppeteer to v19 (#1476) (86b258d)
  • Validate url domain for aws metadata urls (#1484) (6dc4e58)

8.6.0 (2022-10-06)

Features

8.5.2 (2022-09-22)

Bug Fixes

8.5.1 (2022-08-31)

Bug Fixes

8.5.0 (2022-08-31)

Features

  • Support Not Requiring projectId When Not Required (#1448) (b37489b)

Bug Fixes

8.4.0 (2022-08-23)

Features

  • adding configurable token lifespan support (#1441) (178e3b8)

Bug Fixes

8.3.0 (2022-08-19)

Features

  • Add generateIdToken support for Impersonated Clients (#1439) (4ace981)

8.2.0 (2022-08-11)

Features

8.1.1 (2022-07-08)

Bug Fixes

  • deps: update dependency puppeteer to v15 (#1424) (1462f2c)

8.1.0 (2022-06-30)

Features

8.0.3 (2022-06-17)

Bug Fixes

  • deps: update dependency @googleapis/iam to v3 (#1421) (0dc8857)

8.0.2 (2022-04-27)

Bug Fixes

  • Fixing Implementation of GoogleAuth.sign() for external account credentials (#1397) (b0ddb75)

8.0.1 (2022-04-22)

Bug Fixes

  • deps: update dependency gaxios to v5 (#1398) (cbd7d4f)
  • deps: update dependency google-auth-library to v8 (#1399) (9a8be63)

8.0.0 (2022-04-20)

⚠ BREAKING CHANGES

  • Set Node v12 to minimum supported version & Upgrade TypeScript (#1392)
  • remove deprecated DeprecatedGetClientOptions (#1393)

Code Refactoring

  • remove deprecated DeprecatedGetClientOptions (#1393) (9c02941)

Build System

  • Set Node v12 to minimum supported version & Upgrade TypeScript (#1392) (b7bcedb)

7.14.1 (2022-03-09)

Bug Fixes

7.14.0 (2022-02-22)

Features

  • Add AWS Session Token to Metadata Requests (#1363) (9ea3e98)

Bug Fixes

  • Rename auth to authClient & Use Generics for AuthClient (#1371) (8373000)

7.13.0 (2022-02-17)

Features

  • Support instantiating GoogleAuth with an AuthClient (#1364) (8839b5b)

7.12.0 (2022-02-09)

Features

7.11.0 (2021-12-15)

Features

  • adds README, samples and integration tests for downscoping with CAB (#1311) (4549116)

7.10.4 (2021-12-13)

Bug Fixes

  • deps: update dependency puppeteer to v13 (#1334) (e05548d)

7.10.3 (2021-11-29)

Bug Fixes

  • deps: update dependency puppeteer to v12 (#1325) (110ddc2)

7.10.2 (2021-11-03)

Bug Fixes

  • deps: update dependency puppeteer to v11 (#1312) (b3ba9ac)

7.10.1 (2021-10-14)

Bug Fixes

  • security: explicitly update keypair dependency (94401a6)

7.10.0 (2021-09-28)

Features

7.9.2 (2021-09-16)

Bug Fixes

  • deps: update dependency @googleapis/iam to v2 (#1253) (59b8243)

7.9.1 (2021-09-02)

Bug Fixes

7.9.0 (2021-09-02)

Features

  • wire up implementation of DownscopedClient. (#1232) (baa1318)

7.8.0 (2021-08-30)

Features

  • use self-signed JWTs if alwaysUseJWTAccessWithScope is true (#1196) (ad3f652)

7.7.0 (2021-08-27)

Features

  • add refreshHandler callback to OAuth 2.0 client to handle token refresh (#1213) (2fcab77)

7.6.2 (2021-08-17)

Bug Fixes

  • validate token_url and service_account_impersonation_url (#1229) (0360bb7)

7.6.1 (2021-08-13)

Bug Fixes

  • use updated variable name for self-signed JWTs (#1233) (ef41fe5)

7.6.0 (2021-08-10)

Features

  • add GoogleAuth.sign() support to external account client (#1227) (1ca3b73)

7.5.0 (2021-08-04)

Features

  • Adds support for STS response not returning expires_in field. (#1216) (24bb456)

7.4.1 (2021-07-29)

Bug Fixes

  • downscoped-client: bug fixes for downscoped client implementation. (#1219) (4fbe67e)

7.4.0 (2021-07-29)

Features

  • impersonated: add impersonated credentials auth (#1207) (ab1cd31)

7.3.0 (2021-07-02)

Features

  • add useJWTAccessWithScope and defaultServicePath variable (#1204) (79e100e)

7.2.0 (2021-06-30)

Features

  • Implement DownscopedClient#getAccessToken() and unit test (#1201) (faa6677)

7.1.2 (2021-06-10)

Bug Fixes

7.1.1 (2021-06-02)

Bug Fixes

  • deps: update dependency puppeteer to v10 (#1182) (003e3ee)

7.1.0 (2021-05-21)

Features

7.0.4 (2021-04-06)

Bug Fixes

  • do not suppress external project ID determination errors (#1153) (6c1c91d)

7.0.3 (2021-03-23)

Bug Fixes

  • support AWS_DEFAULT_REGION for determining AWS region (#1149) (9ae2d30)

7.0.2 (2021-02-10)

Bug Fixes

  • expose BaseExternalAccountClient and BaseExternalAccountClientOptions (#1142) (1d62c04)

7.0.1 (2021-02-09)

Bug Fixes

  • deps: update dependency google-auth-library to v7 (#1140) (9c717f7)

7.0.0 (2021-02-08)

⚠ BREAKING CHANGES

  • integrates external_accounts with GoogleAuth and ADC (#1052)
  • workload identity federation support (#1131)

Features

  • adds service account impersonation to ExternalAccountClient (#1041) (997f124)
  • adds text/json credential_source support to IdentityPoolClients (#1059) (997f124)
  • defines ExternalAccountClient used to instantiate external account clients (#1050) (997f124)
  • defines IdentityPoolClient used for K8s and Azure workloads (#1042) (997f124)
  • defines ExternalAccountClient abstract class for external_account credentials (#1030) (997f124)
  • get AWS region from environment variable (#1067) (997f124)
  • implements AWS signature version 4 for signing requests (#1047) (997f124)
  • implements the OAuth token exchange spec based on rfc8693 (#1026) (997f124)
  • integrates external_accounts with GoogleAuth and ADC (#1052) (997f124)
  • workload identity federation support (#1131) (997f124)

Bug Fixes

6.1.6 (2021-01-27)

Bug Fixes

  • call addSharedMetadataHeaders even when token has not expired (#1116) (aad043d)

6.1.5 (2021-01-22)

Bug Fixes

6.1.4 (2020-12-22)

Bug Fixes

  • move accessToken to headers instead of parameter (#1108) (67b0cc3)

6.1.3 (2020-10-22)

Bug Fixes

6.1.2 (2020-10-19)

Bug Fixes

  • update gcp-metadata to catch a json-bigint security fix (#1078) (125fe09)

6.1.1 (2020-10-06)

Bug Fixes

6.1.0 (2020-09-22)

Features

6.0.8 (2020-08-13)

Bug Fixes

  • deps: roll back dependency google-auth-library to ^6.0.6 (#1033) (eb54ee9)

6.0.7 (2020-08-11)

Bug Fixes

  • migrate token info API to not pass token in query string (#991) (a7e5701)

6.0.6 (2020-07-30)

Bug Fixes

  • types: include scope in credentials type (#1007) (a2b7d23)

6.0.5 (2020-07-13)

Bug Fixes

  • deps: update dependency lru-cache to v6 (#995) (3c07566)

6.0.4 (2020-07-09)

Bug Fixes

6.0.3 (2020-07-06)

Bug Fixes

  • deps: update dependency puppeteer to v5 (#986) (7cfe6f2)

6.0.2 (2020-06-16)

Bug Fixes

  • deps: update dependency puppeteer to v4 (#976) (9ddfb9b)
  • tsc: audience property is not mandatory on verifyIdToken (#972) (17a7e24)
  • types: add locale property to idtoken (#974) (ebf9bed), closes #973

6.0.1 (2020-05-21)

Bug Fixes

6.0.0 (2020-03-26)

⚠ BREAKING CHANGES

  • [email protected] introduced some breaking changes in generated code.
  • require node 10 in engines field (#926)
  • remove deprecated methods (#906)

Features

Bug Fixes

Build System

Miscellaneous Chores

5.10.1 (2020-02-25)

Bug Fixes

  • if GCF environment detected, increase library timeout (#899) (2577ff2)

5.10.0 (2020-02-20)

Features

  • support for verifying ES256 and retrieving IAP public keys (#887) (a98e386)

Bug Fixes

5.9.2 (2020-01-28)

Bug Fixes

  • populate credentials.refresh_token if provided (#881) (63c4637)

5.9.1 (2020-01-16)

Bug Fixes

  • ensures GCE metadata sets email field for ID tokens (#874) (e45b73d)

5.9.0 (2020-01-14)

Features

  • add methods for fetching and using id tokens (#867) (8036f1a)
  • export LoginTicket and TokenPayload (#870) (539ea5e)

5.8.0 (2020-01-06)

Features

Bug Fixes

5.7.0 (2019-12-10)

Features

  • make x-goog-user-project work for additional auth clients (#848) (46af865)

5.6.1 (2019-12-05)

Bug Fixes

  • deps: pin TypeScript below 3.7.0 (#845) (a9c6e92)
  • docs: improve types and docs for generateCodeVerifierAsync (#840) (04dae9c)

5.6.0 (2019-12-02)

Features

  • populate x-goog-user-project for requestAsync (#837) (5a068fb)
  • set x-goog-user-project header, with quota_project from default credentials (#829) (3240d16)

Bug Fixes

  • deps: update dependency puppeteer to v2 (#821) (2c04117)
  • docs: add jsdoc-region-tag plugin (#826) (558677f)
  • expand on x-goog-user-project to handle auth.getClient() (#831) (3646b7f)
  • use quota_project_id field instead of quota_project (#832) (8933966)

5.5.1 (2019-10-22)

Bug Fixes

  • deps: update gaxios dependency (#817) (6730698)
  • don't append x-goog-api-client multiple times (#820) (a46b271)

5.5.0 (2019-10-14)

Features

  • refresh: add forceRefreshOnFailure flag for refreshing token on error (#790) (54cf477)

5.4.1 (2019-10-10)

Bug Fixes

  • deps: updats to gcp-metadata with debug option (#811) (744e3e8)

5.4.0 (2019-10-08)

Features

5.3.0 (2019-09-27)

Features

  • if token expires soon, force refresh (#794) (fecd4f4)

5.2.2 (2019-09-17)

Bug Fixes

  • deps: update to gcp-metadata and address envDetect performance issues (#787) (651b5d4)

5.2.1 (2019-09-06)

Bug Fixes

  • deps: nock@next has types that work with our libraries (#783) (a253709)
  • docs: fix variable name in README.md (#782) (d8c70b9)

5.2.0 (2019-08-09)

Features

  • populate x-goog-api-client header for auth (#772) (526dcf6)

5.1.2 (2019-08-05)

Bug Fixes

5.1.1 (2019-07-29)

Bug Fixes

  • deps: update dependency google-auth-library to v5 (#759) (e32a12b)

5.1.0 (2019-07-24)

Features

  • types: expose ProjectIdCallback interface (#753) (5577f0d)

5.0.0 (2019-07-23)

⚠ BREAKING CHANGES

  • getOptions() no longer accepts GoogleAuthOptions (#749)

Code Refactoring

  • getOptions() no longer accepts GoogleAuthOptions (#749) (ba58e3b)

4.2.6 (2019-07-23)

Bug Fixes

  • use FUNCTION_TARGET to detect GCF 10 and above (#748) (ca17685)

4.2.5 (2019-06-26)

Bug Fixes

4.2.4 (2019-06-25)

Bug Fixes

  • only require fast-text-encoding when needed (#740) (04fcd77)

4.2.3 (2019-06-24)

Bug Fixes

  • feature detection to check for browser (#738) (83a5ba5)

4.2.2 (2019-06-18)

Bug Fixes

  • compute: correctly specify scopes when fetching token (#735) (4803e3c)

4.2.1 (2019-06-14)

Bug Fixes

4.2.0 (2019-06-05)

Bug Fixes

Features

  • make both crypto implementations support sign (#727) (e445fb3)

4.1.0 (2019-05-29)

Bug Fixes

  • deps: update dependency google-auth-library to v4 (#705) (2b13344)

Features

4.0.0 (2019-05-08)

Bug Fixes

  • deps: update dependency arrify to v2 (#684) (1757ee2)
  • deps: update dependency gaxios to v2 (#681) (770ad2f)
  • deps: update dependency gcp-metadata to v2 (#701) (be20528)
  • deps: update dependency gtoken to v3 (#702) (2c538e5)
  • re-throw original exception and preserve message in compute client (#668) (dffd1cc)
  • surface original stack trace and message with errors (#651) (8fb65eb)
  • throw on missing refresh token in all cases (#670) (0a02946)
  • throw when adc cannot acquire a projectId (#658) (ba48164)
  • deps: update dependency semver to v6 (#655) (ec56c88)

Build System

Features

  • support scopes on compute credentials (#642) (1811b7f)

BREAKING CHANGES

  • upgrade engines field to >=8.10.0 (#686)

v3.1.2

03-22-2019 15:38 PDT

Implementation Changes

  • fix: getCredential(): load credentials with getClient() (#648)

Internal / Testing Changes

  • chore: publish to npm using wombat (#645)

v3.1.1

03-18-2019 08:32 PDT

Bug Fixes

  • fix: Avoid loading fast-text-encoding if not in browser environment (#627)

Dependencies

  • fix(deps): update dependency gcp-metadata to v1 (#632)

Documentation

  • docs: update links in contrib guide (#630)

Internal / Testing Changes

  • build: use per-repo publish token (#641)
  • build: Add docuploader credentials to node publish jobs (#639)
  • build: use node10 to run samples-test, system-test etc (#638)
  • build: update release configuration
  • chore(deps): update dependency @types/lru-cache to v5 (#635)
  • chore(deps): update dependency mocha to v6
  • chore: fix lint (#631)
  • build: use linkinator for docs test (#628)
  • chore(deps): update dependency @types/tmp to ^0.0.34 (#629)
  • build: create docs test npm scripts (#625)
  • build: test using @grpc/grpc-js in CI (#624)

v3.1.0

02-08-2019 08:29 PST

Bug fixes

  • fix: use key file when fetching project id (#618)
  • fix: Throw error if there is no refresh token despite the necessity of refreshing (#605)

New Features

  • feat: allow passing constructor options to getClient (#611)

Documentation

  • docs: update contributing path in README (#621)
  • chore: move CONTRIBUTING.md to root (#619)
  • docs: add lint/fix example to contributing guide (#615)
  • docs: use the People API for samples (#609)

Internal / Testing Changes

  • chore(deps): update dependency typescript to ~3.3.0 (#612)
  • chore(deps): update dependency eslint-config-prettier to v4 (#604)
  • build: ignore googleapis.com in doc link check (#602)
  • chore(deps): update dependency karma to v4 (#603)

v3.0.1

01-16-2019 21:04 PST

Bug Fixes

  • fix(deps): upgrade to the latest gaxios (#596)

v3.0.0

01-16-2019 10:00 PST

Welcome to 3.0 πŸŽ‰ This release has it all. New features, bug fixes, breaking changes, performance improvements - something for everyone! The biggest addition to this release is support for the browser via Webpack.

This release has breaking changes. This release has a few breaking changes. These changes are unlikely to affect most clients.

BREAKING: Migration from axios to gaxios

The 2.0 version of this library used the axios library for making HTTP requests. In the 3.0 release, this has been replaced by a mostly API compatible library gaxios. The new request library natively supports proxies, and comes with a smaller dependency chain. While this is mostly an implementation detail, the request method was directly exposed via the GoogleAuth.request and OAuth2Client.request methods. The gaxios library aims to provide an API compatible implementation of axios, but that can never be 100% promised. If you run into bugs or differences that cause issues - please do let us know.

BREAKING: generateCodeVerifier is now generateCodeVerifierAsync

The OAuth2Client.generateCodeVerifier method has been replaced by the OAuth2Client.generateCodeVerifierAsync method. It has changed from a synchronous method to an asynchronous method to support async browser crypto APIs required for Webpack support.

BREAKING: verifySignedJwtWithCerts is now verifySignedJwtWithCertsAsync

The OAuth2Client.verifySignedJwtWithCerts method has been replaced by the OAuth2Client.verifySignedJwtWithCertsAsync method. It has changed from a synchronous method to an asynchronous method to support async browser crypto APIs required for Webpack support.

New Features

  • feat: make it webpackable (#371)

Bug Fixes

  • fix: accept lowercase env vars (#578)

Dependencies

  • chore(deps): update gtoken (#592)
  • fix(deps): upgrade to gcp-metadata v0.9.3 (#586)

Documentation

  • docs: update bug report link (#585)
  • docs: clarify access and refresh token docs (#577)

Internal / Testing Changes

  • refactor(deps): use gaxios for HTTP requests instead of axios (#593)
  • fix: some browser fixes (#590)
  • chore(deps): update dependency ts-loader to v5 (#588)
  • chore(deps): update dependency karma to v3 (#587)
  • build: check broken links in generated docs (#579)
  • chore(deps): drop unused dep on typedoc (#583)
  • build: add browser test running on Kokoro (#584)
  • test: improve samples and add tests (#576)

v2.0.2

12-16-2018 10:48 PST

Fixes

  • fix(types): export GCPEnv type (#569)
  • fix: use post for token revocation (#524)

Dependencies

  • fix(deps): update dependency lru-cache to v5 (#541)

Documentation

  • docs: add ref docs again (#553)
  • docs: clean up the readme (#554)

Internal / Testing Changes

  • chore(deps): update dependency @types/sinon to v7 (#568)
  • refactor: use execa for install tests, run eslint on samples (#559)
  • chore(build): inject yoshi automation key (#566)
  • chore: update nyc and eslint configs (#565)
  • chore: fix publish.sh permission +x (#563)
  • fix(build): fix Kokoro release script (#562)
  • build: add Kokoro configs for autorelease (#561)
  • chore: always nyc report before calling codecov (#557)
  • chore: nyc ignore build/test by default (#556)
  • chore(build): update the prettier and renovate config (#552)
  • chore: update license file (#551)
  • fix(build): fix system key decryption (#547)
  • chore(deps): update dependency typescript to ~3.2.0 (#546)
  • chore(deps): unpin sinon (#544)
  • refactor: drop non-required modules (#542)
  • chore: add synth.metadata (#537)
  • fix: Pin @types/sinon to last compatible version (#538)
  • chore(deps): update dependency gts to ^0.9.0 (#531)
  • chore: update eslintignore config (#530)
  • chore: drop contributors from multiple places (#528)
  • chore: use latest npm on Windows (#527)
  • chore: update CircleCI config (#523)
  • chore: include build in eslintignore (#516)

v2.0.1

Implementation Changes

  • fix: verifyIdToken will never return null (#488)
  • Update the url to application default credentials (#470)
  • Update omitted parameter 'hd' (#467)

Dependencies

  • chore(deps): update dependency nock to v10 (#501)
  • chore(deps): update dependency sinon to v7 (#502)
  • chore(deps): update dependency typescript to v3.1.3 (#503)
  • chore(deps): update dependency gh-pages to v2 (#499)
  • chore(deps): update dependency typedoc to ^0.13.0 (#497)

Documentation

  • docs: Remove code format from Application Default Credentials (#483)
  • docs: replace google/ with googleapis/ in URIs (#472)
  • Fix typo in readme (#469)
  • Update samples and docs for 2.0 (#459)

Internal / Testing Changes

  • chore: update issue templates (#509)
  • chore: remove old issue template (#507)
  • build: run tests on node11 (#506)
  • chore(build): drop hard rejection and update gts in the kitchen test (#504)
  • chores(build): do not collect sponge.xml from windows builds (#500)
  • chores(build): run codecov on continuous builds (#495)
  • chore: update new issue template (#494)
  • build: fix codecov uploading on Kokoro (#490)
  • test: move kitchen sink tests to system-test (#489)
  • Update kokoro config (#482)
  • fix: export additional typescript types (#479)
  • Don't publish sourcemaps (#478)
  • test: remove appveyor config (#477)
  • Enable prefer-const in the eslint config (#473)
  • Enable no-var in eslint (#471)
  • Update CI config (#468)
  • Retry npm install in CI (#465)
  • Update Kokoro config (#462)

v2.0.0

Well hello 2.0 πŸŽ‰ This release has multiple breaking changes. It also has a lot of bug fixes.

Breaking Changes

Support for node.js 4.x and 9.x has been dropped

These versions of node.js are no longer supported.

The getRequestMetadata method has been deprecated

The getRequestMetadata method has been deprecated on the IAM, OAuth2, JWT, and JWTAccess classes. The getRequestHeaders method should be used instead. The methods have a subtle difference: the getRequestMetadata method returns an object with a headers property, which contains the authorization header. The getRequestHeaders method simply returns the headers.

Old code
const client = await auth.getClient();
const res = await client.getRequestMetadata();
const headers = res.headers;
New code
const client = await auth.getClient();
const headers = await client.getRequestHeaders();

The createScopedRequired method has been deprecated

The createScopedRequired method has been deprecated on multiple classes. The createScopedRequired and createScoped methods on the JWT class were largely in place to help inform clients when scopes were required in an application default credential scenario. Instead of checking if scopes are required after creating the client, instead scopes should just be passed either into the GoogleAuth.getClient method, or directly into the JWT constructor.

Old code
auth.getApplicationDefault(function(err, authClient) {
   if (err) {
     return callback(err);
   }
  if (authClient.createScopedRequired && authClient.createScopedRequired()) {
    authClient = authClient.createScoped([
      'https://www.googleapis.com/auth/cloud-platform'
    ]);
  }
  callback(null, authClient);
});
New code
const client = await auth.getClient({
  scopes: ['https://www.googleapis.com/auth/cloud-platform']
});

Deprecate refreshAccessToken

Note: refreshAccessToken is no longer deprecated.

getAccessToken, getRequestMetadata, and request methods will all refresh the token if needed automatically.

You should not need to invoke refreshAccessToken directly except in certain edge-cases.

Features

  • Set private_key_id in JWT access token header like other google auth libraries. (#450)

Bug Fixes

  • fix: support HTTPS proxies (#405)
  • fix: export missing interfaces (#437)
  • fix: Use new auth URIs (#434)
  • docs: Fix broken link (#423)
  • fix: surface file read streams (#413)
  • fix: prevent unhandled rejections by avoid .catch (#404)
  • fix: use gcp-metadata for compute credentials (#409)
  • Add Code of Conduct
  • fix: Warn when using user credentials from the Cloud SDK (#399)
  • fix: use Buffer.from instead of new Buffer (#400)
  • fix: Fix link format in README.md (#385)

Breaking changes

  • chore: deprecate getRequestMetadata (#414)
  • fix: deprecate the createScopedRequired methods (#410)
  • fix: drop support for node.js 4.x and 9.x (#417)
  • fix: deprecate the refreshAccessToken methods (#411)
  • fix: deprecate the getDefaultProjectId method (#402)
  • fix: drop support for node.js 4 (#401)

Build / Test changes

  • Run synth to make build tools consistent (#455)
  • Add a package.json for samples and cleanup README (#454)
  • chore(deps): update dependency typedoc to ^0.12.0 (#453)
  • chore: move examples => samples + synth (#448)
  • chore(deps): update dependency nyc to v13 (#452)
  • chore(deps): update dependency pify to v4 (#447)
  • chore(deps): update dependency assert-rejects to v1 (#446)
  • chore: ignore package-lock.json (#445)
  • chore: update renovate config (#442)
  • chore(deps): lock file maintenance (#443)
  • chore: remove greenkeeper badge (#440)
  • test: throw on deprecation
  • chore: add intelli-espower-loader for running tests (#430)
  • chore(deps): update dependency typescript to v3 (#432)
  • chore(deps): lock file maintenance (#431)
  • test: use strictEqual in tests (#425)
  • chore(deps): lock file maintenance (#428)
  • chore: Configure Renovate (#424)
  • chore: Update gts to the latest version πŸš€ (#422)
  • chore: update gcp-metadata for isAvailable fix (#420)
  • refactor: use assert.reject in the tests (#415)
  • refactor: cleanup types for certificates (#412)
  • test: run tests with hard-rejection (#397)
  • cleanup: straighten nested try-catch (#394)
  • test: getDefaultProjectId should prefer config (#388)
  • chore(package): Update gts to the latest version πŸš€ (#387)
  • chore(package): update sinon to version 6.0.0 (#386)

Upgrading to 1.x

The 1.x release includes a variety of bug fixes, new features, and breaking changes. Please take care, and see the release notes for a list of breaking changes, and the upgrade guide.