6

These 2 packages look very similar:

http://www.passportjs.org/packages/passport-google-oauth2/ http://www.passportjs.org/packages/passport-google-oauth20/

Is one supersede the other or they serve different purpose? New to Google authentication and still trying to make it work.

hubpixel
  • 319
  • 1
  • 10

2 Answers2

5

passport-google-oauth20 has 10x the use of the other, and it has more recent commits.

One of the properties in the profile response for passport-google-oauth2 is isPlusUser, which suggests that it is not up to date. The readme in the github repository does not match the documentation, and there are a few links in the passport docs that no longer work.

To be fair, I've only ever used passport-google-oauth20. It's possible that pass-port-google-oauth2 works fine, but there is currently a lot more community support for 20.

Hope this helps!

Mike Zarra
  • 91
  • 2
  • 5
3

I have the same question. It is pretty confusing. One is much more popular than the other. https://www.npmtrends.com/passport-google-oauth2-vs-passport-google-oauth20

Google is using passport-google-oauth20 in their Node tutorial examples. https://cloud.google.com/nodejs/getting-started/tutorial-app

David Dehghan
  • 22,159
  • 10
  • 107
  • 95