This API provides endpoints for user registration, login, and client credential management.
- Clone the repository:
git clone https://github.com/CodeCrew24/authservice- Install Dependencies
cd authservice
npm install- Set up environment variables:
PORT=3000
MONGODB_URI=your_mongodb_connection_uri
JWT_SECRET=your_jwt_secretStart the server:
nodemon startThe 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:
https://auth-service-latest.onrender.com/api-docsThis project is licensed under the MIT License - see the LICENSE file for details.