Skip to content

andrsdev/jwt-endpoint-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JWT Auth Strategy for APIs

This is an example on how JWT auth strategy is integrated on API endpoints security. The technolgy stack used is Node.js, Express, JWT and Passport.

Requirements

The following must be installed in you system.

Get started

  1. git clone git@github.com:andrsdev/jwt-endpoint-example.git
  2. cd jwt-endpoint-example
  3. npm install or yarn install
  4. npm run dev or yarn dev

Generate AUTH_JWT_SECRET

  1. Create a .env file in at the root of the project and copy the contents of .env.example
  2. You can set the value of AUTH_JWT_SECRET to any string but I recommend using a key generator.

Test with Postman

  1. Import the postman_collection.json file into Postman.
  2. Create a Postman environment with the variable url and value http://localhost:3000

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors