Skip to content

rupachowrasia/node-authentication-session

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodeJs Basic Auth using Session

NodeJs Basic auth which covers brief introduction of the following:

  • bcryptjs [to hash password]
  • mongoose [database model]
  • client-sessions [to manage session]
  • express-session [to manage session]
  • csurf [to manage csrf token]

New Features

  • Hashing password using bcryptjs
  • Using session middleware
  • Using csrf token to validate the form

We can also use other module to manage session:

Tech

This repo uses number of packages/modules:

Installation

It requires Node.js v7+ to run.

Install the dependencies and devDependencies and start the server.

$ cd node-authentication-session
$ npm install
$ npm start

Screen-shots

1. Index Page

index

2. Login Page

login

3. Register Page

register

4. Dashboard Page

dashboard