This is a full-stack authentication project built using the MERN (MongoDB, Express.js, React.js, Node.js) stack. The project includes features like user signup, login, Google OAuth authentication, profile updating (including image upload using Firebase), JWT authentication, and password hashing.
Check out the Demo of Auth Project !
- User signup with email and password.
- User login with email and password.
- Google OAuth authentication.
- Profile updating including image upload using Firebase storage.
- JWT authentication for secure routes.
- Password hashing for user security.
- Easily customizable and extendable for your own projects.
To run this project locally, follow these steps:
- Clone the repository:
git clone https://github.com/your-username/mern-authentication.git
- Navigate to the project directory:
cd mern-authentication
- Install dependencies for both the server and client:
cd server
npm install
cd ../client
npm install
3.Set up environment variables:
Create a .env file in the server directory. Add the following environment variables:
FIREBASE_API_KEY=your_firebase_api_key
1.Start the server:
cd server
npm start
2.Start the client:
cd client
npm run dev
Remember to replace the placeholder values in the .env.local
and .env
files with your actual API keys and other sensitive information. Adjust the instructions and details according to your specific setup