stekatag / 2fa-demo

A demo of how to implement two-factor authentication in a Node.js application. Keep in mind that this is not a production-ready application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🔐 Two-Factor Authentication Demo Project

About the Project

This project is a demo of how to implement two-factor authentication in a Node.js application. Keep in mind that this is not a production-ready application. The goal of this project is to show how to implement two-factor authentication in a Node.js application, not to show how to build a production-ready application.

Used technologies

  • Node.js
  • Express
  • Node-json-db
  • OTPLib
  • QRCode
  • Cookie-parser

Features

  • User login/logout
  • Enable and update two-factor authentication via QR code
  • Cookie-based session management

Demo users

Username Password
user1 123
user2 123

Getting Started

To run the project locally, you'll need Node.js and npm installed on your system. Follow these steps to get started:

  1. Clone this repository to your local machine.
  2. Switch to the project's root directory via cd source.
  3. Install the project's dependencies via npm install.
  4. Start the development server via node server.js.
  5. Open your browser and visit http://localhost:3000 to see the project in action.

To run the presentation slides locally, you'll need to do these steps:

  1. Switch to the slides directory via cd slides.
  2. Install the presentation's dependencies via npm install.
  3. Start the development server via npm start.

About

A demo of how to implement two-factor authentication in a Node.js application. Keep in mind that this is not a production-ready application.

License:MIT License


Languages

Language:HTML 62.6%Language:JavaScript 33.7%Language:CSS 3.7%