Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grant vs Passport.js? [closed]

What's the difference between Grant & Passport.js? When should one use Grant over passport.js and vice versa?

If I want to make a social media and track user activities and post them on a news feed, which should I use? Grant or passport.js?

like image 832
roadtocode Avatar asked Oct 31 '22 06:10

roadtocode


1 Answers

Grant is designed specifically for OAuth, whereas passport is designed for pretty much any authentication method (HTTP Basic, local-auth etc). Before I say any more, I don't have much first-hand experience using grant, but I'm pretty familiar with passport.

Passport is at-least 7x more popular (based on github stars), so if you run into an issue your more likely to not be the only person with that problem using passport. This is somewhat evident on stack overflow, the passport tag has ~2100 questions (just the main tag, let alone passport-local etc), whereas Grant doesn't have a tag (that I could fine) associated with it.

Saying that though - some of the official passport documentation is out of date, but the documentation on google-authentication seems to be correct if that's all your using.

All in all, the choice is really up to you, both are viable options. Jared Hanson (the creator of passport) wrote about some of the reasons to choose passport in this answer (Everyauth vs Passport.js).

like image 171
Ash Avatar answered Nov 10 '22 00:11

Ash