https://github.com/dev-eranda/mern-auth-techniques
Built an authentication app using the MERN stack (to learn 2FA)
https://github.com/dev-eranda/mern-auth-techniques
cicd fullstack-development jwt-authentication mern-stack verification-code
Last synced: about 2 months ago
JSON representation
Built an authentication app using the MERN stack (to learn 2FA)
- Host: GitHub
- URL: https://github.com/dev-eranda/mern-auth-techniques
- Owner: dev-eranda
- License: mit
- Created: 2024-08-21T08:52:34.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-03-24T07:32:38.000Z (about 2 months ago)
- Last Synced: 2025-03-24T07:39:13.776Z (about 2 months ago)
- Topics: cicd, fullstack-development, jwt-authentication, mern-stack, verification-code
- Language: JavaScript
- Homepage: https://mern-auth-virid.vercel.app
- Size: 308 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MERN advanced authentication
**Developed by:** Eranda Samarasinghe
## Project Background and Overview
This repository focuses on full-stack development using the MERN stack. It highlights API security, scalable architecture, and database management, while also implementing advanced 2FA authentication using email OTP. Additionally, it is integrated with CI/CD and deployed on AWS EC2 helping to learn cloud infrastructure and automation
## Project Goals
The main objectives of this application are to:1. Implemented JWT authentication to secure API endpoints and manage sessions
2. Built a scalable architecture with modular code using Node.js and Express.js
3. Used MongoDB for efficient and flexible data storage
4. Integrated frontend authentication in React for a smooth user experience
## Technical Details
Core technologies used:- **MERN Stack, JWT Authentication**
## Configuration
1. Set up environment variables:
```sh
# MongoDB Connection URI
MONGO_URI = mongo_uri# Application Port
PORT = 5000# JWT Secret Key for Authentication
JWT_SECRET = secret_key# Environment Mode (development or production)
NODE_ENV = development# Mailtrap Configuration for Email Handling
MAILTRAP_TOKEN = mailtrap_token
MAILTRAP_ENDPOINT = https://send.api.mailtrap.io/# Frontend Application URL
CLIENT_URL = http://localhost:5173```
## Installation
1. Clone repository:
```sh
git clone https://github.com/dev-eranda/mern-auth-techniques.git
2. Install dependencies:
```sh
npm install3. Build the Frontend Application:
```sh
npm run build4. Start the Server Application:
```sh
npm start
- **Open [http://localhost:5000](http://localhost:5000) with your browser to see the result.**