Auth With Express is a robust authentication system built using Node.js and Express.js. This repository provides a modular template for implementing secure user authentication, session management, and access control in modern web applications.
This project demonstrates best practices for user registration, login, password hashing, and session handling with Express. It’s ideal for developers seeking a reliable starting point for secure authentication in their Node.js projects.
- Backend Framework: Node.js, Express.js
- Authentication: Passport.js, JWT, bcrypt
- Database: MongoDB (Mongoose)
- Session Management: express-session
- Validation: express-validator
- User registration and login
- Password hashing with bcrypt
- Session-based authentication and JWT support
- Role-based access control
- Input validation and error handling
- Modular code structure for easy integration
- Clone the repository:
git clone https://github.com/vikas809028/Auth-With-Express.git cd Auth-With-Express - Install dependencies:
npm install
- Configure environment variables in
.env(see.env.example) - Start the development server:
npm start
- The API will be available at
http://localhost:3000
- Integrate authentication routes into your existing Express application.
- Refer to the API documentation for available endpoints and payload formats.
Contributions, suggestions, and bug reports are welcome! Please open issues or submit pull requests.
Distributed under the MIT License.
- Email: vikas809028@gmail.com
- Website: vikastiwari.dev
- Twitter: @vikas_tiwari80
Built with ❤️ by Vikas Tiwari (IIT Kanpur)