Skip to content

dprakash2101/authservice

Repository files navigation

Auth API

This API provides endpoints for user registration, login, and client credential management.

Table of Contents

Installation

  1. Clone the repository:
git clone https://github.com/dprakash2101/authservice
  1. Install Dependencies
cd authservice
npm install
  1. Set up environment variables:
PORT=3000
MONGODB_URI=your_mongodb_connection_uri
JWT_SECRET=your_jwt_secret

Usage

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.

Endpoints

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.

Swagger Documentation

You can view the Swagger documentation for this API by visiting the following URL:

http://localhost:3000/api-docs

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published