I would like to share how I configured Passport.js for my Node.js Express Server. I was looking for something to refer but couldn’t find any matching my requirements. I was working on a web-app that needed authentication that was not so complex but yet efficient.

Image for post
Image for post
Photo by Jason Strull on Unsplash

My requirements were:

  1. Authenticate using email and password
  2. Separate routes for login and signup

Based on the requirements, I encountered Passport.js, which is an authentication middleware for Node.js. It’s simple way of implementation made me explore it.

James Kaviyil Jose

MEVN Stack Web Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store