Skip to content

Ath3r/auth-service

Repository files navigation

Auth Service

This is a auth service that uses JWT to authenticate users.

How to run

  1. Clone the repo
  2. Run npm install
  3. Run npm run dev

How to use

  1. Create a user by sending a POST request to /api/users with the following body:
{
    "name": "John Doe",
    "username": ""
    "password": "password"
}
  1. Login by sending a POST request to /api/auth with the following body:
{
    "username": ""
    "password": "password"
}
  1. You will receive a JWT token in the response. Use this token to authenticate your requests by adding it to the Authorization header.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published