diff --git a/google-sheet-sync/functions/index.js b/google-sheet-sync/functions/index.js index 5ad7b15c81..cdfbdd92d0 100644 --- a/google-sheet-sync/functions/index.js +++ b/google-sheet-sync/functions/index.js @@ -65,7 +65,7 @@ exports.oauthcallback = functions.https.onRequest(async (req, res) => { res.set('Cache-Control', 'private, max-age=0, s-maxage=0'); const code = req.query.code; try { - const tokens = await functionsOauthClient.getToken(code); + const {tokens} = await functionsOauthClient.getToken(code); // Now tokens contains an access_token and an optional refresh_token. Save them. await admin.database().ref(DB_TOKEN_PATH).set(tokens); return res.status(200).send('App successfully configured with new Credentials. '