From 380ef0ada793d873bd074a3def6431d4fcf5c78d Mon Sep 17 00:00:00 2001 From: Lahiru Maramba Date: Wed, 20 Nov 2024 11:49:23 -0500 Subject: [PATCH] fix: Fix the property names when initializing the SDK with ServiceAccount type (#2779) --- 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 };