From a60104b4ffca244c0151190a88db7311b4f5b811 Mon Sep 17 00:00:00 2001 From: Theo Ephraim Date: Tue, 17 Oct 2023 13:56:59 -0700 Subject: [PATCH] docs: remove outdated reference to `doc.useServiceAccountAuth()` --- docs/guides/authentication.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/guides/authentication.md b/docs/guides/authentication.md index a977d5d8..20169d1b 100644 --- a/docs/guides/authentication.md +++ b/docs/guides/authentication.md @@ -134,9 +134,10 @@ Here's one way to get it to work (using heroku cli): And in some other scenarios, replacing newlines in your code can be helpful, for example: ```js -await doc.useServiceAccountAuth({ - client_email: process.env.GOOGLE_SERVICE_ACCOUNT_EMAIL, - private_key: process.env.GOOGLE_PRIVATE_KEY.replace(/\\n/g, "\n"), +const jwtFromEnv = new JWT({ + email: process.env.GOOGLE_SERVICE_ACCOUNT_EMAIL, + key: process.env.GOOGLE_PRIVATE_KEY.replace(/\\n/g, "\n"), + scopes: SCOPES, }); ```