erika-freitas / user-auth-api

A user authentication API microservice made with Nodejs and Typescript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

User authentication API

This is a guided project by DIO's instructor Renan J Paula

Available Scripts:

npm run build
npm run dev

Open http://localhost:3000 to view it in your browser.

Endpoints:

Users:

  • GET /users
  • GET /users/:uuid
  • POST /users
  • PUT /users/:uuid
  • DELETE /users/:uuid

Authentication:

  • POST /token
    get a token

  • POST /token/validate
    validate a token

Dependencies:

  • PG:
npm install pg
  • Express:
npm install express
  • Status Codes:
npm install http-status-codes
  • JWT:
npm install jsonwebtoken

Special thanks and resources

What's next?

  • Add refresh token endpoint (/token/refresh)
  • Add config library to use environment variables

About

A user authentication API microservice made with Nodejs and Typescript


Languages

Language:TypeScript 100.0%