This API provides endpoints for user registration, login, and client credential management.
- Clone the repository:
git clone https://github.com/dprakash2101/authservice
- Install Dependencies
cd authservice
npm install
- Set up environment variables:
PORT=3000
MONGODB_URI=your_mongodb_connection_uri
JWT_SECRET=your_jwt_secret
Start the server:
nodemon start
The server will run on port 3000 by default. You can change the port by setting the PORT environment variable.
The API provides the following endpoints:
POST /register
: Registers a new user.POST /login/client
: Logs in a user using client ID and secret.GET /client
: Retrieves client ID and secret.POST /regenerate-client-credentials
: Regenerates client credentials.
For detailed information on each endpoint, refer to the Swagger Documentation.
You can view the Swagger documentation for this API by visiting the following URL:
http://localhost:3000/api-docs
This project is licensed under the MIT License - see the LICENSE file for details.