Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sandeepkv93/node-user-auth-starterkit
A complete toolkit for developers aiming to swiftly implement a user authentication system using Node.js, React.js, MongoDB, and Mongoose. It offers secure, efficient login solutions, integrates best practices, and demonstrates the synergy of Node.js for robust server-client setups. Perfect for building secure user interfaces with ease. 🚀🔑💻
https://github.com/sandeepkv93/node-user-auth-starterkit
authentication authorization expressjs jwt-authentication middlewares mongodb nodejs routing
Last synced: 10 days ago
JSON representation
A complete toolkit for developers aiming to swiftly implement a user authentication system using Node.js, React.js, MongoDB, and Mongoose. It offers secure, efficient login solutions, integrates best practices, and demonstrates the synergy of Node.js for robust server-client setups. Perfect for building secure user interfaces with ease. 🚀🔑💻
- Host: GitHub
- URL: https://github.com/sandeepkv93/node-user-auth-starterkit
- Owner: sandeepkv93
- License: gpl-3.0
- Created: 2022-01-22T00:02:10.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-14T09:12:17.000Z (about 2 years ago)
- Last Synced: 2024-11-24T10:19:27.756Z (2 months ago)
- Topics: authentication, authorization, expressjs, jwt-authentication, middlewares, mongodb, nodejs, routing
- Language: JavaScript
- Homepage:
- Size: 55.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Node User Authentication Starter Kit
This repository provides a starter kit for building user authentication and authorization features in a Node.js application. It includes a sample login and registration flow, as well as an example of how to protect routes and manage user roles and permissions.
### Features
- User registration and login
- Hashing and salting of passwords
- JWT-based authentication
- Route protection and user role management
- Example implementation of user roles and permissions### Getting Started
1. Clone the repository
```shell
git clone https://github.com/sandeepkv93/node-user-auth-starterkit.git
```2. Install dependencies
```shell
npm install
```3. Start the server
```shell
npm start
```4. Test the endpoints using a tool like Postman or Insomnia. The following routes are available:
- POST /register for user registration
- POST /login for user login
- GET /protected for a protected route example### Customization
1. Update the config.js file with your own JWT secret and database configuration
2. Add more roles and permissions in the config.js file as per your requirements
3. Update the User model in models directory with any additional fields you need
4. Update the auth middleware in middlewares directory as per your requirements
5. Add more routes and update the existing routes as per your requirements### Built With
- Node.js
- Express.js
- MongoDB (with Mongoose)
- jsonwebtoken
- bcrypt