Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 697 Bytes

File metadata and controls

10 lines (8 loc) · 697 Bytes

Authentication in Nodejs with Sessions and Cookies

Refactored and Cleaned Code for Understanding Authentication in Node.js using Sessions and Cookies.

In this project, I kept things simple and hammered in the concepts behind using Sessions and Cookies for Authentication.

To use this code do the following:

  1. Clone this repo or download it.
  2. Navigate into the location you downloaded folder in your cmd/bash/terminal
  3. Run npm install to install all the depends in this projects (bcryptjs, config, connect-mongodb-session, ejs, express, express-session and mongoose).
  4. Check inside of the config folder under the default.json for the mongodb URI and insert your own connection string.