GitXplorerGitXplorer
g

api-auth-jwt

public
3 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
ec7b8073ac7bf61eac4187625901d3cf16b3a899

chore: add validator

ggeraldoamf committed 3 years ago
Unverified
8d5748af9e737919c6c0f654fac8c14331ca95af

docs: add badge

ggeraldoamf committed 3 years ago
Unverified
047912e0d51a178215eb4438f74a4457d831ec9d

docs: update readme

ggeraldoamf committed 3 years ago
Unverified
144f4a409c322aefc0c621cc204e8a728a49daca

feat: prettier project

ggeraldoamf committed 3 years ago
Unverified
caf70e84518ae83fe048b5855f780440c340b4c6

chore: prettierrc

ggeraldoamf committed 3 years ago
Unverified
da63323aa9e9837a16ad738d63dc317e582e59a4

feat(delete): json to js

ggeraldoamf committed 3 years ago

README

The README file for this repository.

API Auth JavaScript Web Token

With this simple app you can send email and password req and create a token when auth. You can verify the token and return user id from db.

Tools & Packages

  • TypeScript.
  • Postgres with TypeORM.
  • JWT, Bcrypt.

API

Create User
/users

# post
{
  "email": "email@email.com",
  "password": "password"
}

# return
{
  "email": "email@email.com",
  "password": "password",
  "id": "id"
}
Login User
/login

# post
{
  "email": "teste04@gmail.com",
  "password": "123456"
}

# return
"(jwt token)"
Auth User (Authenticate with Middleware)
/users

# get | Bearer Token -> JWT Token

# return
{
  "userID": "(userId)"
}