diff --git a/packages/google-cloud-filestore/src/v1/cloud_filestore_manager_client.ts b/packages/google-cloud-filestore/src/v1/cloud_filestore_manager_client.ts index cf06ed777f1..da64782683c 100644 --- a/packages/google-cloud-filestore/src/v1/cloud_filestore_manager_client.ts +++ b/packages/google-cloud-filestore/src/v1/cloud_filestore_manager_client.ts @@ -152,6 +152,12 @@ export class CloudFilestoreManagerClient { // 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; @@ -2234,6 +2240,7 @@ export class CloudFilestoreManagerClient { return this.cloudFilestoreManagerStub!.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve(); diff --git a/packages/google-cloud-filestore/src/v1beta1/cloud_filestore_manager_client.ts b/packages/google-cloud-filestore/src/v1beta1/cloud_filestore_manager_client.ts index 6e15797a829..b6d2ae01ab2 100644 --- a/packages/google-cloud-filestore/src/v1beta1/cloud_filestore_manager_client.ts +++ b/packages/google-cloud-filestore/src/v1beta1/cloud_filestore_manager_client.ts @@ -155,6 +155,12 @@ export class CloudFilestoreManagerClient { // 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; @@ -2314,6 +2320,7 @@ export class CloudFilestoreManagerClient { return this.cloudFilestoreManagerStub!.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve();