jmchaves / node-passport-jwt-example-app

Node - Using JWT with Passport authentication

Repository from Github https://github.comjmchaves/node-passport-jwt-example-appRepository from Github https://github.comjmchaves/node-passport-jwt-example-app

node-passport-jwt-example-app

1) Go to the project folder

2) npm install

3) npm start

Make a post request to login, use localhost:3000/auth/login/

Credentials:

name: javier
password: password123
  • You can use Postman

Test the authentication, use localhost:3000/auth/secret/

Header:

key: Authorization
value: Bearer + token

Example: Login: alt text

Get secret message: alt text

About

Node - Using JWT with Passport authentication


Languages

Language:JavaScript 93.2%Language:HTML 4.8%Language:CSS 1.9%