This is a template for authentication, featuring session storage, protected routes, and Passport.js integration.
- Frontend: React, Tailwind CSS
- Backend: Node.js, Express
- Database: MongoDB
- Authentication: Passport.js with session-based authentication
- User authentication with session handling
- Protected routes for authorized users only
- Secure password management
- MongoDB integration
git clone <repository-url>
cd authentication-template# Install client dependencies
cd client
npm install
# Install server dependencies
cd ../server
npm installCreate a .env file in the server directory and update the MongoDB connection string:
MONGO_URL=your_mongodb_connection_string
SESSION_SECRET=your_secret_keycd server
npm startcd client
npm run dev- Users can sign up and log in securely.
- Protected routes require authentication.
- Sessions persist across page reloads.
This project is licensed under the MIT License.