Livauth is a robust authentication system built using the MERN stack (MongoDB, Express, React, Node.js). It provides essential authentication functionalities including user registration, login, forgot password, and reset password. This project is designed to be used as an authentication API for future projects.
- User Registration: Allows new users to create an account by providing their name, email, and password.
- Login: Authenticates users with their email and password.
- Forgot Password: Sends a password reset link to the user's registered email.
- Reset Password: Allows users to reset their password using the link sent to their email.
- MongoDB: NoSQL database for storing user information.
- Express: Node.js web application framework for building the server-side API.
- React: JavaScript library for building the user interface.
- Node.js: JavaScript runtime for running the server-side code.
Make sure you have the following installed:
-
Clone the repository:
git clone https://github.com/jaswanthkumarpolisetty/livauth.git cd livauth
-
Install dependencies:
Navigate to the
server
andclient
directories and install dependencies.Server:
cd Server npm install
Client:
cd ../Client npm install
-
Environment Variables:
Create a
.env
file in theServer
directory and add the following:MONGODB_URI=your_mongodb_uri JWT_SECRET=your_jwt_secret SMTP_HOST=your_smtp_host SMTP_PORT=your_smtp_port SMTP_USER=your_smtp_user SMTP_PASS=your_smtp_pass
-
Run the Server:
Start the server to run the backend API.
cd Server npm start
The server will be running on
http://localhost:9000
. -
Run the Client:
Start the React application.
cd ../Client npm start
The client will be running on
http://localhost:3000
.
- POST /api/register: Register a new user
- POST /api/login: Login a user
- POST /api/forgot-password: Send a password reset link
- POST /api/reset-password: Reset the user's password
- Account Verification: Add email verification during registration.
- OAuth Integration: Support for logging in with third-party providers like Google, Facebook, etc.
- Two-Factor Authentication: Add an extra layer of security for user accounts.
Contributions are welcome! Please feel free to submit a Pull Request or open an Issue.
This project is licensed under the MIT License - see the LICENSE file for details.