No Justice. No Peace. #BlackLivesMatter

Blog: Authentication with MongoDB, Node.js + Passport.js

Manny Becerra as a child

May 2016

This will be a short one: authenticating with MongoDB, Node.js and Passport.js is pretty easy-to-setup and it lends itself to a scalable pathway.

You can have a pretty solid, reliable user authentication system that leverages various 3rd-party OAuth services, like GitHub, Twitter and Facebook, in a matter of hours or days (depending on how complex you want, or need, to get upfront).


Updates: Additional OAuth services added to authentication demo - LinkedIn (2017), GitHub (2019).

I've already set up an authentication service with this tech stack on my site as a proof-of-concept for a project we're exploring at work. While the demo currently doesn't do much after logging on other than the ability to authenticate with multiple OAuth 2.0-based services, the foundation is in-place to get more creative over time.

If you're already using Node.js and need to create some custom authentication system for your next project, wrap it up with MongoDB and Passport.js—I think you'll like it!

Until next time,


I am human, a father, and a problem solver: a tech and people leader with a passion and proven track-record in building and leading compassionate, productive teams—remote and on-site—within a continuous learning culture. My teams and I champion usable, inclusive digital products and online experiences. My work, passion and intentions also intersect with advising small businesses and political campaigns, life-long learning, outdoor advocacy, community building, and uplifting others. Learn more about Manny