This is an authentication api service that can serve as a 3rd party authentication service for other services.
Endpoint docs can be found at /api/docs or Documentation Swagger docs can be found at /api/swagger/
- Login - POST /api/v1/auth/login
- Signup - POST /api/v1/auth/signup (can only create a user role)
- Logout - GET /api/v1/auth/logout
- Verify Account - GET /api/v1/auth/verify_account/:token
- Forgot Password - POST /api/v1/auth/password_reset
- Password Reset - POST /api/v1/auth/password_reset/:token
- List Users - GET /api/v1/auth/users (requires token) (admin and manager only)
- Get User - GET /api/v1/auth/user/:id (requires token) (all roles)
- Update User - PUT /api/v1/auth/user/:id (requires token) (all roles)
- Delete User - DELETE /api/v1/auth/user/:id (requires token) (admin only)
- Change User Role - PUT /api/v1/auth/user/:id/role (requires token) (admin only)
- admin
- manager
- staff
- user
- clone the repository using
git clone <repository_url>
- cd into the cloned directory
- install the dependencies using
npm install
- create a .env file and using the .env.sample file as a template, fill in the details
- run the dev server using
npm run dev