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

Doesn't seem to be working at all #98

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hi,

I've tried the example, as well as implementing this myself and I haven't had any luck. I get a "Failed to obtain request token" error as soon as I try to auth.

Any ideas how I could fix this or what I'm doing wrong?

Kindly, Johann

ghost commented 9 years ago

Apologies.. I was being dumb. Going to put this up here in case someone runs into the same issue...

I copied some example code that looked like this:

var GoogleStrategy = require('passport-google-oauth').OAuthStrategy;

My config was set up for OAuth2, so the code should have been:

 var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;

If you do this, you'll get a "Failed to obtain a request token" error. I hope that helps someone out.