This project implements a robust authentication system with features such as user registration, login, email verification, text code verification, profile management (including image uploads with abuse detection), and account deletion.
- User Registration with email and username
- User Login with JWT authentication
- Email Verification for new registrations
- Text Code Verification with rate limiting
- Password Reset functionality
- Profile Image Uploads with Cloudinary integration
- Gemini API integration for text and image abuse detection
- Account Deletion with optional Cloudinary image removal
-
Clone the repository:
git clone https://github.com/UltronTheAI/AuthSystem.git cd AuthSystem
-
Install dependencies:
npm install
-
Environment Variables: Create a
.env
file in the root directory and add the following environment variables:PORT=5000 MONGO_URI=<Your MongoDB Connection String> JWT_ACCESS_SECRET=<Your JWT Secret Key> GMAIL=<Your Gmail Address for sending emails> GMAIL_PASSWORD=<Your Gmail App Password> CLOUDINARY_CLOUD_NAME=<Your Cloudinary Cloud Name> CLOUDINARY_API_KEY=<Your Cloudinary API Key> CLOUDINARY_API_SECRET=<Your Cloudinary API Secret> GEMINI_API_KEY=<Your Gemini API Key>
-
Run the application:
npm start
The server will run on
http://localhost:5000
(or your specified PORT).
For detailed API endpoint documentation, refer to API.md.