Skip to content

A simple node REST API that authenticates with JWT tokens

Notifications You must be signed in to change notification settings

souwei/node_rest_api_jwt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAMPLE NODE REST API with JWT AUTH

Sample node rest api that requires user to authenticate with jwt tokens.

INSTRUCTIONS

  1. npm i
  2. node index.js
  3. post to localhost:5000/login with email and password to get access token and refresh token
  4. get localhost:5000/protected with access token to test token
  5. post to localhost:5000/token

READING SOURCES

  1. http://jasonwatmore.com/post/2018/08/06/nodejs-jwt-authentication-tutorial-with-example-api
  2. https://blog.usejournal.com/sessionless-authentication-withe-jwts-with-node-express-passport-js-69b059e4b22c
  3. https://medium.com/@paul.allies/stateless-auth-with-express-passport-jwt-7a55ffae0a5c

About

A simple node REST API that authenticates with JWT tokens

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published