diff --git a/src/v1/executions_client.ts b/src/v1/executions_client.ts index b26dc1b..315fc88 100644 --- a/src/v1/executions_client.ts +++ b/src/v1/executions_client.ts @@ -132,6 +132,12 @@ export class ExecutionsClient { // 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; diff --git a/src/v1/workflows_client.ts b/src/v1/workflows_client.ts index 32a8d55..5b57ad4 100644 --- a/src/v1/workflows_client.ts +++ b/src/v1/workflows_client.ts @@ -135,6 +135,12 @@ export class WorkflowsClient { // 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; @@ -1242,6 +1248,7 @@ export class WorkflowsClient { return this.workflowsStub!.then((stub) => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve(); diff --git a/src/v1beta/executions_client.ts b/src/v1beta/executions_client.ts index 67dd752..3b420cc 100644 --- a/src/v1beta/executions_client.ts +++ b/src/v1beta/executions_client.ts @@ -132,6 +132,12 @@ export class ExecutionsClient { // 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; diff --git a/src/v1beta/workflows_client.ts b/src/v1beta/workflows_client.ts index 71f3620..59b1c6a 100644 --- a/src/v1beta/workflows_client.ts +++ b/src/v1beta/workflows_client.ts @@ -135,6 +135,12 @@ export class WorkflowsClient { // 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; @@ -1248,6 +1254,7 @@ export class WorkflowsClient { return this.workflowsStub!.then((stub) => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve();