PASSPORT
PASSPORT IS A LIBRARY THAT HELPS IN AUTHENTICATION . TO INSTALL: npm i passport npm i passport-local npm i passport-local-mongoose USING PASSPORT , AUTHENTICATION IS MADE EASY, IT CAN BE IMPLENTED USING GMAIL, FACEBOOK,GITHUB..ETC USER MODEL: WE CAN DEFINE OUR USERNAME AS PER OUR WISH. PASSPORT LOCAL MONGOOSE WILL ADD A USERNAME, HASHED PASSWORD, SALT VALUE. IN MAJOR PROJECT, USER.JS const mongoose = require ( "mongoose" ); const Schema = mongoose . Schema ; const passportLocalMessage = require ( "passport-local-mongoose" ); const userSchema = new Schema ({ email : { type : String , required : true , }, }); userSchema . plugin ( passportLocalMessage ); module . exports = mongoose . model ( "User" , userSchema ); APP.JS const flash = require (...