From b0f2c40604f6ebbf28c12f754786e47d98899b44 Mon Sep 17 00:00:00 2001 From: bluelovers Date: Fri, 12 Dec 2025 07:23:34 +0800 Subject: [PATCH] fix: Cannot read property 'redirect_uris' of undefined https://stackoverflow.com/questions/61912639/typeerror-cannot-read-property-redirect-uris-of-undefined --- sheets/quickstart/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sheets/quickstart/index.js b/sheets/quickstart/index.js index 0ac5b133..12713452 100644 --- a/sheets/quickstart/index.js +++ b/sheets/quickstart/index.js @@ -18,7 +18,6 @@ import path from 'node:path'; import process from 'node:process'; -import {authenticate} from '@google-cloud/local-auth'; import {google} from 'googleapis'; // The scope for reading spreadsheets. @@ -32,9 +31,9 @@ const CREDENTIALS_PATH = path.join(process.cwd(), 'credentials.json'); */ async function listMajors() { // Authenticate with Google and get an authorized client. - const auth = await authenticate({ + const auth = new google.auth.GoogleAuth({ scopes: SCOPES, - keyfilePath: CREDENTIALS_PATH, + keyFile: CREDENTIALS_PATH, }); // Create a new Sheets API client.