Speed up development with full-stack environments for every branch.

Learn More

Login auth using sessions in express [Node.js and authentication]

14945 Runs 53212 Views 13478 Copies
Saved

Saved

runnable 15

runnable
published 5 years ago


  
  

Session-based Auth in Express.js

This example uses express.js to provide session-based authentication page.

  • server.js - the main file which contains the main logic for this example

  • pass.js - provides a hash function that is used in the main example file

  • login.ejs - the main template that displays the login form. It's located under /views.

  • head.ejs - a header template that is used in the 'login.ejs' template file. It's located under /views.

  • foot.ejs - a footer template that is used in the 'login.ejs' template file. It's located under /views.

Please login/signup to get access to the terminal.

Your session has timed out.

Dismiss (the page may not function properly).