Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

Commit 557da2c

Browse files
1 parent 7eaf7bd commit 557da2c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ function getAuthenticatedClient() {
147147
return new Promise((resolve, reject) => {
148148
// create an oAuth client to authorize the API call. Secrets are kept in a `keys.json` file,
149149
// which should be downloaded from the Google Developers Console.
150-
const oAuth2Client = new OAuth2Client(
151-
keys.web.client_id,
152-
keys.web.client_secret,
153-
keys.web.redirect_uris[0]
154-
);
150+
const oAuth2Client = new OAuth2Client({
151+
clientId: keys.web.client_id,
152+
clientSecret: keys.web.client_secret,
153+
redirectUri: keys.web.redirect_uris[0]
154+
});
155155

156156
// Generate the url that will be used for the consent dialog.
157157
const authorizeUrl = oAuth2Client.generateAuthUrl({
@@ -1304,7 +1304,7 @@ const googleAuth = new GoogleAuth({
13041304
const client = await googleAuth.getClient();
13051305

13061306
// Use the client to create a DownscopedClient.
1307-
const cabClient = new DownscopedClient(client, cab);
1307+
const cabClient = new DownscopedClient({authClient: client, credentialAccessBoundary: cab});
13081308

13091309
// Refresh the tokens.
13101310
const refreshedAccessToken = await cabClient.getAccessToken();

0 commit comments

Comments
 (0)