Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: callback is not a function #108

Open
evertonpavan opened this issue Sep 28, 2020 · 0 comments
Open

TypeError: callback is not a function #108

evertonpavan opened this issue Sep 28, 2020 · 0 comments

Comments

@evertonpavan
Copy link

I just copy the code of the repository, and run,

Actual Behavior

TypeError: callback is not a function

function authorize(credentials, callback) {
const {client_secret, client_id, redirect_uris} = credentials.web;
const oAuth2Client = new google.auth.OAuth2(
client_id, client_secret, redirect_uris[0]);

// Check if we have previously stored a token.
fs.readFile(TOKEN_PATH, (err, token) => {
if (err) return getNewToken(oAuth2Client, callback);
oAuth2Client.setCredentials(JSON.parse(token));
callback(oAuth2Client);
});
}

Specifications

  • Node v12.18.4
  • Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant