From 3de5b1bf5ddb5236b3d517888a762c2519c0c4a7 Mon Sep 17 00:00:00 2001 From: Lahiru Maramba Date: Tue, 19 Nov 2024 18:08:38 -0500 Subject: [PATCH] fix: Fix the property names when initializing the SDK with ServiceAccount type --- src/app/credential-internal.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/credential-internal.ts b/src/app/credential-internal.ts index c8ce25b246..2171d6e637 100644 --- a/src/app/credential-internal.ts +++ b/src/app/credential-internal.ts @@ -473,6 +473,10 @@ function populateGoogleAuth(keyFile: string | object, httpAgent?: Agent) 'Service account must be an object.', ); } + copyAttr(keyFile, keyFile, 'project_id', 'projectId'); + copyAttr(keyFile, keyFile, 'private_key', 'privateKey'); + copyAttr(keyFile, keyFile, 'client_email', 'clientEmail'); + client = auth.fromJSON(keyFile); } return { auth, client };