diff --git a/src/v1/cloud_memcache_client.ts b/src/v1/cloud_memcache_client.ts index 5d44661..703e983 100644 --- a/src/v1/cloud_memcache_client.ts +++ b/src/v1/cloud_memcache_client.ts @@ -147,6 +147,12 @@ export class CloudMemcacheClient { // 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; @@ -1563,6 +1569,7 @@ export class CloudMemcacheClient { return this.cloudMemcacheStub!.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve(); diff --git a/src/v1beta2/cloud_memcache_client.ts b/src/v1beta2/cloud_memcache_client.ts index 7065be3..1d1a7c0 100644 --- a/src/v1beta2/cloud_memcache_client.ts +++ b/src/v1beta2/cloud_memcache_client.ts @@ -147,6 +147,12 @@ export class CloudMemcacheClient { // 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; @@ -1734,6 +1740,7 @@ export class CloudMemcacheClient { return this.cloudMemcacheStub!.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve();