Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

Commit f71a4a0

Browse files
committed
chore: fix various reversions
1 parent fa72c1b commit f71a4a0

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

src/auth/baseexternalclient.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,11 +472,10 @@ export abstract class BaseExternalAccountClient extends AuthClient {
472472
} else if (projectNumber) {
473473
// Preferable not to use request() to avoid retrial policies.
474474
const headers = await this.getRequestHeaders();
475-
const url = `${this.cloudResourceManagerURL.toString()}${projectNumber}`;
476475
const opts: GaxiosOptions = {
477476
...BaseExternalAccountClient.RETRY_CONFIG,
478477
headers,
479-
url,
478+
url: `${this.cloudResourceManagerURL.toString()}${projectNumber}`,
480479
};
481480
AuthClient.setMethodName(opts, 'getProjectId');
482481
const response = await this.transporter.request<ProjectInfo>(opts);

src/auth/defaultawssecuritycredentialssupplier.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export class DefaultAwsSecurityCredentialsSupplier
237237
async #retrieveAwsSecurityCredentials(
238238
roleName: string,
239239
headers: Headers,
240-
transporter: Gaxios
240+
transporter: Gaxios,
241241
): Promise<AwsSecurityCredentialsResponse> {
242242
const opts = {
243243
...this.additionalGaxiosOptions,

src/auth/oauth2client.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,8 @@ export class OAuth2Client extends AuthClient {
752752

753753
const opts = {
754754
...OAuth2Client.RETRY_CONFIG,
755-
url,
756755
method: 'POST',
756+
url,
757757
data: new URLSearchParams(values as {}),
758758
headers,
759759
};
@@ -813,17 +813,17 @@ export class OAuth2Client extends AuthClient {
813813
grant_type: 'refresh_token',
814814
};
815815

816-
const opts: GaxiosOptions = {
817-
...OAuth2Client.RETRY_CONFIG,
818-
method: 'POST',
819-
url,
820-
data: new URLSearchParams(data),
821-
};
822-
AuthClient.setMethodName(opts, 'refreshTokenNoCache');
823-
824816
let res: GaxiosResponse<CredentialRequest>;
825817

826818
try {
819+
const opts: GaxiosOptions = {
820+
...OAuth2Client.RETRY_CONFIG,
821+
method: 'POST',
822+
url,
823+
data: new URLSearchParams(data),
824+
};
825+
AuthClient.setMethodName(opts, 'refreshTokenNoCache');
826+
827827
// request for new token
828828
res = await this.transporter.request<CredentialRequest>(opts);
829829
} catch (e) {
@@ -1051,9 +1051,7 @@ export class OAuth2Client extends AuthClient {
10511051
if (callback) {
10521052
this.transporter
10531053
.request<RevokeCredentialsResult>(opts)
1054-
.then(r => {
1055-
callback(null, r);
1056-
}, callback);
1054+
.then(r => callback(null, r), callback);
10571055
} else {
10581056
return this.transporter.request<RevokeCredentialsResult>(opts);
10591057
}

0 commit comments

Comments
 (0)