Skip to content

Latest commit

 

History

History
79 lines (62 loc) · 2.24 KB

README.md

File metadata and controls

79 lines (62 loc) · 2.24 KB

2FA TOTP implementation using Node.js, TypeScript, and React.js

Technology Stack

  • Node JS
  • Typescript
  • React JS
  • Vite

Backend

The backend includes the APIs for generating QR code and verifying TOTP code.

Client

The client includes a UI for showing QR codes and an input form to take a TOTP code.

Start The application in Development Mode

## Clone the Application 
git clone https://github.com/santoshshinde2012/multi-factor-authentication.git

## Install the dependencies
cd multi-factor-authentication && npm install

## Make sure to up your database
npm run db:up

## Start the application
npm run dev

Initial Folder Structure

├── multi-factor-authentication
│   ├── backend
│   │  ├── ....
│   │  ├── package-lock.json
│   │  └── package.json
│   ├── client
│   │  ├── ....
│   │  ├── package-lock.json
│   │  └── package.json
│   ├── wiki
│   │   ├── ....
│   │   └── 
│   ├── README.md
│   ├── package-lock.json
│   └── package.json

Main API

  • api/v1/mfa/ready : Check setup is ready or not
  • api/v1/mfa/generate : Generate the OTP Secret
  • api/v1/mfa/verify : Verify the OTP Secret
  • api/v1/mfa/validate : Validate the OTP code
  • api/v1/mfa/reset : Reset using the backup code

Connect with me on