Skip to content

britoskies/Jwt-LoginApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Jwt-LoginApi

Description

Learned user authentication with JWT, as well as how to develop an API with Typescrypt.

Status: Finished

Tecnologies

  • Typescript
  • JWT
  • Expressjs

Available Scripts

In the project directory, you can run:

npm run dev

To test the server side / API:
Personal recommendation is using Postman or Thunder Client to test the POST and GET requests.

Open http://localhost:3001/api with POST in order to generate the token.
Add this line of code in the body:

{
    "username": "admin",
    "pw": "admin"
}

Save the token recieved in the header response. Then you will have to do a GET request to the API URL, add a new header with 'auth-token' as the key and the token as the value.

The page will reload when you make changes.
You may also see any lint errors in the console.

About

Login API developed with MVC architecture and Typescript, also user authentication with JWT.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors