Skip to content

santoshshinde2012/multi-factor-authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published