This is a back-end project which sets up an Express.js server with user authentication using JWT (JSON Web Tokens). The project includes endpoints for user registration, login and refreshing access tokens.
- Express.js server setup.
- JWT-based user authentication.
- Password validation and hashing.
- Endpoints for user login, registration, and refreshing tokens.
- Rate limiting to prevent abuse of the login and registration endpoints.
Before you start, ensure you have Node.js and npm installed in your system.
-
Clone the repository:
git clone https://github.com/iamsean007/user-management-login-register-jwt.git cd user-management-login-register-jwt -
Install the dependencies:
npm install
-
Set up your environment variables:
Create a .env file in the root of your project. Check out the .env.example file to see what variables you need to add.
-
Start the server:
npm start
The server will start on the port specified in your .env file (or port 3001 as default).
Contributing Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License MIT
Author: Shivam Mahendru