Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

passport-google-oauth2 vs passport-google-oauth20 packages

Tags:

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.

like image 419
hubpixel Avatar asked Apr 20 '19 19:04

hubpixel


2 Answers

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!

like image 54
Mike Zarra Avatar answered Oct 25 '22 18:10

Mike Zarra


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

like image 42
David Dehghan Avatar answered Oct 25 '22 18:10

David Dehghan