GitXplorerGitXplorer
g

api-auth-jwt

public
3 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
0908c2e920f25fd79ce5e3b0259d87ed43a84e54

docs: auth user api preview

ggeraldoamf committed 3 years ago
Unverified
8e4cc49ecdf6bb78ec76f23e22db25866a6d1f02

fix: auth middleware work at the right way

ggeraldoamf committed 3 years ago
Unverified
75add81137d43b1251eb8ea39d8e2e3e86708a6b

fix: env db name

ggeraldoamf committed 3 years ago
Unverified
497cc2a985a4300cac31084fd6c8a504b2341306

docs: fix indentation

ggeraldoamf committed 3 years ago
Unverified
8a9f3a0b5cd14e67890d6ecff46c5726a9e28c75

docs: add api reference

ggeraldoamf committed 3 years ago
Unverified
c79ca0910bf993747a1446a9aaf0d639d2b07bb6

refactor: User and Auth structure

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)"
}