There was an error while loading. Please reload this page.
doc.useServiceAccountAuth()
1 parent a7260d8 commit a60104bCopy full SHA for a60104b
docs/guides/authentication.md
@@ -134,9 +134,10 @@ Here's one way to get it to work (using heroku cli):
134
135
And in some other scenarios, replacing newlines in your code can be helpful, for example:
136
```js
137
-await doc.useServiceAccountAuth({
138
- client_email: process.env.GOOGLE_SERVICE_ACCOUNT_EMAIL,
139
- 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"),
140
+ scopes: SCOPES,
141
});
142
```
143
0 commit comments