Stop using JSON Web Tokens. Use Cookies & Server Sessions instead
CoderOne CoderOne
108K subscribers
77,519 views
1.5K

 Published On May 15, 2022

JSON Web Tokens are a great stateless way to authenticate your users and remove the load from your servers and APIs, but JWT is not always secure and can take more than what they can offer us as developers! If you have been using JWTs to implement your authentication architecture, you need to watch the most general practices and security pitfalls you should avoid!



⭐ Timestamps ⭐
00:00 Intro
00:45 JWT the Right Way!
03:27 How JWT and Auth work?
04:44 Example Project 1: LocalStorage JWT
10:34 Stealing JWT From LocalStorage
12:50 Quick Fix for LocalStorage JWT tokens
13:21 How to implement HTTP-Only cookies w/ JWT
16:17 Login in with HTTP-Only cookies
16:53 Say goodbye to XSS
18:02 Using Stateful Server Sessions
21:26 Invalidating JWT Tokens (Before Expiration)


💻 Source Code:
Frontend App: https://github.com/ipenywis/jwt-best-...
Backend Server: https://github.com/ipenywis/jwt-best-...


🧭 Turn Design into React Code | From prototype to Full website in no time
   • Turn Design into React Code | From pr...  

🧭 Watch Tutorial on Designing the website on Figma
   • I Design a onecolor Website in 1 hour...  

🧭 Watch Create a Modern React Login/Register Form with smooth Animations
   • Create a Modern React Login/Register ...  

🧭 Debug React Apps Like a Pro | Master Debugging from Zero to Hero with Chrome DevTools
   • Debug React Apps Like a Pro | Master ...  

🧭 Master React Like Pro w/ Redux, Typescript, and GraphQL | Beginner to Advanced in React
   • Master React Like Pro w/ Redux, Types...  

🧭 Learn Redux For Beginners | React Redux from Zero To Hero to build a real-world app
   • Debug React Apps Like a Pro | Master ...  

🧭 Build Login/Register API Server w/ Authentication | JWT Express AUTH using Passport.JS and Sequelize
   • Build Login/Register API Server w/ Au...  

🧭 Introduction to GraphQL with Apollo and React
   • Introduction to GraphQL with Apollo a...  


🐦 Follow me on Twitter:   / ipenywis  
💻 Github Profile: https://github.com/ipenywis

Made with 💗 by Coderone

show more

Share/Embed