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.
The following must be installed in you system.
git clone git@github.com:andrsdev/jwt-endpoint-example.gitcd jwt-endpoint-examplenpm installoryarn installnpm run devoryarn dev
- Create a .env file in at the root of the project and copy the contents of
.env.example - You can set the value of
AUTH_JWT_SECRETto any string but I recommend using a key generator.
- Import the
postman_collection.jsonfile into Postman. - Create a Postman environment with the variable
urland valuehttp://localhost:3000