This is a simple blog and code snippet about local authentication in Express JS using Passport JS . Using this we can authenticate using an email-password combination or using a username-password combination.
This is not an in-depth explanation, rather it’s just like a code snippet. For more information you can refer to the video tutorial given below 😊.
Setting up our project is fairly simple. We will use npm to initialize a project and will further install express for our express app , ejs for templating and mongoose for connecting to our mongoDB database.
npm init --yes npm i express…