Skip to content

Commit d88bece

Browse files
Merge pull request firebase#462 from luskin/patch-1
Update getToken from functinosOauthClient
2 parents 4d3e15b + 24b5181 commit d88bece

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

google-sheet-sync/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ exports.oauthcallback = functions.https.onRequest(async (req, res) => {
6565
res.set('Cache-Control', 'private, max-age=0, s-maxage=0');
6666
const code = req.query.code;
6767
try {
68-
const tokens = await functionsOauthClient.getToken(code);
68+
const {tokens} = await functionsOauthClient.getToken(code);
6969
// Now tokens contains an access_token and an optional refresh_token. Save them.
7070
await admin.database().ref(DB_TOKEN_PATH).set(tokens);
7171
return res.status(200).send('App successfully configured with new Credentials. '

0 commit comments

Comments
 (0)