Skip to content

AlejoTorres2001/jwt-auth-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backend Branch

this is the master branch for the server-side code of this implementation of a jwt auth strategy

Both Backend and Frontend should be considered as separated projects each one with its dependencies. if you are about to contribute to this project or just to play around with the code I suggest cloning each master branch in different folders

About The Project

and express app using and http server to handle the signing and verification of access and refresh tokens.Storing the refresh token of each device where an user legged in,using MongoDB. the tokens are rotated accordingly to minimize the damage of a possible token leak/hack

image

this image explains dead simple how the jwt strategy works

Stack used

JavaScript

Node.js

Express

MongoDB

For handling the authorization for each route I'm using middlewares that check the authorization header in each request as well as the origin to handle CORS accordingly

Contributing

Alt

If you have a suggestion that would make this better, please fork the repo and create a Pull Request. You can also simply open an issue with the tag enhancement.

Don't forget to give the project a star ⭐!

  1. Fork the project

  2. Clone the repository

git clone -b master-backend https://github.com/AlejoTorres2001/jwt-auth-app.git
  1. Create your Feature Branch
git checkout -b feature/AmazingFeature
  1. Push to the Branch
git push origin feature/AmazingFeature
  1. Open a Pull Request

About

a FullStack example of a JWT auth strategy

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published