{"repo":"saintedlama/passport-local-mongoose","free":true,"listed":false,"github":"https://github.com/saintedlama/passport-local-mongoose","clone":"git clone https://github.com/saintedlama/passport-local-mongoose.git","description":"Passport-Local Mongoose is a Mongoose plugin that simplifies building username and password login with Passport","language":"TypeScript","stars":1164,"topics":["passport","mongoose-plugin","javascript"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"Passport-Local Mongoose Passport-Local Mongoose is a Mongoose plugin that simplifies building username and password login with Passport. Tutorials Michael Herman gives a comprehensible walk through for setting up mongoose, passport, passport-local and passport-local-mongoose for user authentication in his blog post User Authentication With Passport.js Installation Passport-Local Mongoose does not require passport or mongoose dependencies directly but expects you to have these dependencies installed. In case you need to install the whole set of dependencies Usage Plugin Passport-Local Mongoose First you need to plugin Passport-Local Mongoose into your User schema You're free to define your User how you like. Passport-Local Mongoose will add a username, hash and salt field to store the username, the hashed password and the salt value. Additionally, Passport-Local Mongoose adds some methods to your Schema. See the API Documentation section for more details. ESM modules When using ESM modules, you need to import the default export of passport-local-mongoose like this Configure Passport/Passport-Local You should configure Passport/Passport-Local as described in the Passport Guide. Passport-Local Mongoose supports this setup by implementing a LocalStrategy and serializeUser/deserializeUser functions. To setup Passport-Local Mongoose use this code Make sure that you have mongoose connected to mongodb and you're done. Simplified Passport/Passport-Local Configuration Starting from ver","default_branch":null,"files":null,"tree":[],"storefront":"/r/saintedlama","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/saintedlama/passport-local-mongoose/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}