An open API service indexing awesome lists of open source software.

https://github.com/santoshshinde2012/multi-factor-authentication

2FA TOTP implementation using Node.js, TypeScript, and React.js
https://github.com/santoshshinde2012/multi-factor-authentication

mfa nodejs reactjs totp typescript

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        

# [Multi-Factor-Authentication](https://github.com/santoshshinde2012/multi-factor-authentication)

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



Twitter Badge


LinkedIn Badge


Medium Badge


Buy Me A Coffee