An open API service indexing awesome lists of open source software.

https://github.com/sundaram2021/mern-auth

This repository is about authentication and authorization in Mern Stack using JWT
https://github.com/sundaram2021/mern-auth

expressjs jwt jwt-authentication localstorage mongodb-database reactjs

Last synced: 3 months ago
JSON representation

This repository is about authentication and authorization in Mern Stack using JWT

Awesome Lists containing this project

README

        

# MERN STACK AUTHENTICATION USING JSON WEB TOKEN AND PROTECTED HOME ROUTE

This project is used for authentication in mern website using jsonwebtoken(jwt).

The authentication flow is as follows :

After login to the website , a unique token is generated and it is stored in local storage .

and using this token in local storage home route is protected.

I have also added a storage event listener so that while using the website is user clears the local storage anyhow
then they has to login again