Hi everyone !!
Today i’m going to show you my simple authentication practice. There is lots of good authentication modules out there which can be used as middleware like PassportJS and Everyauth and they are also very useful for integration your web site with social networks like Facebook and Twitter. I will cover both the mentions tools in future posts but today we are going to build our authentication functionality on our own !!
Before we start I should mention that like always I used MongoDB as a database for saving and loading our users. And I integrate it with our app using Mongoose module. So make sure you have them installed or if you using my source files first run
npm install . Also make sure you are running mongo server by running
mongod in new shell.
- Module Dependencies
- Database and Models
- Middlewares and configurations
- Helper Functions