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
- Host: GitHub
- URL: https://github.com/santoshshinde2012/multi-factor-authentication
- Owner: santoshshinde2012
- Created: 2024-04-23T14:55:23.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-05-26T05:54:42.000Z (11 months ago)
- Last Synced: 2025-03-17T14:48:58.571Z (about 1 month ago)
- Topics: mfa, nodejs, reactjs, totp, typescript
- Language: TypeScript
- Homepage:
- Size: 214 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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