Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Stop Using LocalStorage!  | HTTP-Only Cookies (FastAPI + Next.js) | Flight Booking Engine | Day 68
Play lesson

FastAPI & Next.js project: Flight Booking App With DevOps. Day 1 - 100 - Stop Using LocalStorage! | HTTP-Only Cookies (FastAPI + Next.js) | Flight Booking Engine | Day 68

5.0 (2)
23 learners

What you'll learn

This course includes

  • 104.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

If your JWT is in localStorage, your users are at risk. 🔓 In Day 68, we harden our authentication system by migrating from insecure storage to HTTP-Only Cookies. This is the gold standard for web security, preventing Cross-Site Scripting (XSS) attacks from stealing user sessions. We are solving the tricky part of full-stack development: making Cookies work across different origins (Next.js on port 3000 ↔️ FastAPI on port 8000). 💡 In this live build: The Vulnerability: Why localStorage is dangerous for sensitive tokens. Backend Setup: Modifying FastAPI to set HttpOnly; Secure; SameSite cookies automatically. CORS Hell: Configuring Access-Control-Allow-Credentials so the browser actually accepts the cookie. Frontend Integration: Teaching Next.js (Axios/Fetch) to send credentials with every request. The Logout Flow: How to securely invalidate the cookie from the server side. By the end, your authentication will be banking-grade secure. 📘 Watch the full playlist: 👉 https://www.youtube.com/playlist?list=PLdtwawCR2QjmdfhM-7SzDOVGop373bbgW 📂 GitHub Repo (Public Mirror): 👉 https://github.com/KNehe/aero_bound_ventures-public.git 🔥 Subscribe to master Full Stack Security. #FastAPI #NextJS #WebSecurity #Cookies #Authentication #XSS #FullStack

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere