Skip to content

Commit 3d57d18

Browse files
committed
fix: add transporterOptions when keyFile is object in populateGoogleAuth()
1 parent 0776fba commit 3d57d18

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/app/credential-internal.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,11 @@ function populateGoogleAuth(keyFile: string | object, httpAgent?: Agent)
477477
copyAttr(keyFile, keyFile, 'private_key', 'privateKey');
478478
copyAttr(keyFile, keyFile, 'client_email', 'clientEmail');
479479

480-
client = auth.fromJSON(keyFile);
480+
client = auth.fromJSON(keyFile, {
481+
transporterOptions: {
482+
agent: httpAgent,
483+
},
484+
});
481485
}
482486
return { auth, client };
483487
}

0 commit comments

Comments
 (0)