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.
- Node.js
- Express
- Node-json-db
- OTPLib
- QRCode
- Cookie-parser
- User login/logout
- Enable and update two-factor authentication via QR code
- Cookie-based session management
Username | Password |
---|---|
user1 | 123 |
user2 | 123 |
To run the project locally, you'll need Node.js and npm installed on your system. Follow these steps to get started:
- Clone this repository to your local machine.
- Switch to the project's root directory via
cd source
. - Install the project's dependencies via
npm install
. - Start the development server via
node server.js
. - 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:
- Switch to the slides directory via
cd slides
. - Install the presentation's dependencies via
npm install
. - Start the development server via
npm start
.