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
- Host: GitHub
- URL: https://github.com/sundaram2021/mern-auth
- Owner: sundaram2021
- License: other
- Created: 2023-01-22T09:07:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-10T13:29:37.000Z (over 2 years ago)
- Last Synced: 2025-01-02T16:28:39.062Z (5 months ago)
- Topics: expressjs, jwt, jwt-authentication, localstorage, mongodb-database, reactjs
- Language: JavaScript
- Homepage:
- Size: 69.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
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