jaredhanson / passport-google-oauth

Google authentication strategies for Passport and Node.js.
https://www.passportjs.org/packages/passport-google-oauth/?utm_source=github&utm_medium=referral&utm_campaign=passport-google-oauth&utm_content=about
MIT License
776 stars 327 forks source link

Error: GoogleOAuth2Strategy requires a [clientId] #124

Closed arvinsim closed 7 years ago

arvinsim commented 7 years ago

I have this code

passport.use(new GoogleStrategy({
  clientID: config.auth.google.clientId,
  clientSecret: config.auth.google.clientSecret,
  callbackURL: 'http://localhost:3000/auth/google/callback'
}, ...)

But I get this error

Error: GoogleOAuth2Strategy requires a [clientId]

I have verified that config.auth.google.clientId and config.auth.google.clientSecret have the correct values.

I researched a bit and this is what I read.

Do I really need to define global environment variables for the client id and secret for this library to work? Or am I missing something?

arvinsim commented 7 years ago

Never mind. I mistakenly used a different package, passport-google-auth.