Ancient authentication library, built in the days when everything was built using tons of nested callbacks in NodeJS. The code works and makes sense, but is often hard to follow. Huge library of plugins that help you authenticate with others. The official documentation is pretty bad, but folks on Reddit have recommended this set of docs to help you truly understand dit: https://github.com/jwalton/passport-api-docs
Passport comes with ton of strategies as they call for login via various methods be it social logins like Facebook, Twitter , Github , google etc or be it local jwt, session etc. It is very old authentication package for nodejs and has a strong user community despite poor documentation we find the solution on other discussion platforms. It gets work done in case of social logins, but in the case of others, it is best to choose others over it. There are very few customisable options in any strategy available but is good for beginners who don't want to hustle for writing extra code and want to do things quickly.
passport.js is an authentication middleware for node.js. It supports a lot of social authentication using its plugins. The only con I noticed is the poorly written documentation. Also it still uses callback API which is highly inconvenient.
I've used passport both professionally and on hobby projects, for years. It's well documented, and personally I found it easy to use. It provides a great api for authentication through various methods. There's a bit of a learning curve, but once you understand the framework, it makes it very easy to build an authentication system that's easily extensible - meaning down the road, if you want to add a new authentication method to your application, there will be a clear way to do so, by providing a new strategy for passport. Personally I've used it with local auth, google auth, and facebook auth, and had success all around. It also has support for sessions, which is very helpful
A highly extensible and reliable authentication middleware for Node that has been around for seemingly forever. However, till date passport remains of the most trusted go-to middleware for developers due to the insane number of ready made authentication strategies that are available for it. No matter what kind of authentication mechanism your application might require, chances are high that there is a pre-existing passport strategy available for you out there. With one of the largest community based ecosystems out there, passport is a highly recommended and well backed open source authentication middleware out there.
Passport is a battle-tested library for authentication, but it feels very outdated. The documentation is pretty bad, and it takes several trial-and-error attempts to actually get something working. I hope we get a nicer and more modern take on this library in the future. Since there aren't many alternatives to it, I still recommend it opposed to building auth layers yourself.
I have used it in most of my projects which requires authentication So here What I have found out Pros : 1. Great community - Lots of people are using it so you get help most of times if you get stuck 2. Easy to use for beginner 3. Lots of option for authentication including fb, twitter and google Cons : The only con is that its doc is not beginner friendly to hard
This library is a well written one with the exception that it uses callback hell for everything. I would recommend writing some wrappers for the whole setup with Promises and use that across all the projects. Even though there are a lot of plugins around authentication for many social sites, the documentation just is so bad. Support for sessions is also quite good.
It is a powerful middleware to be used with expressjs for authentication. It is an ancient library in the sense that it doesn’t use Promise API. There are so many passport plugins to be used when you want to add additional authentication platforms support. The documentation is bit harder to grasp and that is what I don’t like about the library.