diff --git a/src/v1/eventarc_client.ts b/src/v1/eventarc_client.ts index 81d65ac..f499c1f 100644 --- a/src/v1/eventarc_client.ts +++ b/src/v1/eventarc_client.ts @@ -134,6 +134,12 @@ export class EventarcClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; @@ -1244,6 +1250,7 @@ export class EventarcClient { return this.eventarcStub!.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve();