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
775 stars 327 forks source link

Fail to obtain access token #48

Open JpEncausse opened 10 years ago

JpEncausse commented 10 years ago

Following sample code I get an error

failed to obtain access token (status: 401 data: { "error" : "invalid_client" })

What I have missed ?

eellpp commented 9 years ago

Got same issue. It was the case of secret id not being correct.

After the google consent screen, i could see the Authorization code being sent over by google, but when the server tried to send the clientID + secretID + AuthCode , there was this error. I could only suspect something wrong on the keys or settings on my google API page. In my case, the key was wrong and after correction it works fine.