logo
logo
Sign in

How to Perform Nodejs Authentication With Passport JS

avatar
Alto Palo
How to Perform Nodejs Authentication With Passport JS

Passport-Local Mongoose is a Mongoose plugin that simplifies username creation and password login with Passport. This module auto-generates salt and hash fields, you don’t require to hash the password with this crypto module, the passport-local-mongoose does this for you.

Whenever a user simply hashes their password and if there are two users in the database that have the same password, they will end up having the same hash. Now, if any one of these passwords gets hacked then the hacker can reach each account that uses the same password because users with identical passwords have the same hash fields.

Here are few steps, you can follow for authentication:

Create a Directory Structure
Create a Model/User.js File
Configuring Passport/Passport-Local in App.js
Creation of the Route/User.js File

Read more here - Nodejs Authentication With Passport JS and Passport Local Mongoose

collect
0
avatar
Alto Palo
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more