Authentication Flow in Next.js (Complete Tutorial)

Опубликовано: 12 Май 2025
на канале: Cosden Solutions
66,345
2.2k

Check Out Eraser → https://eraser.io/cosden

🚀 Project React → https://cosden.solutions/project-react
📥 Import React (Newsletter) → https://cosden.solutions/newsletter?s...

Source Code → https://github.com/cosdensolutions/co...
Join The Discord! → https://discord.cosden.solutions
VSCode Theme | Font → Material Theme Darker | Menlo, Monaco "monospace"

In this video we will learn how to create a complete authentication flow in Next.js from scratch. We won't be using any 3rd party auth libraries, and we'll effectively be rolling our own auth. This is important for us to understand the mental model of authentication, and how to code all of the different pieces required to make this happen!

TIMESTAMPS
00:00 Intro
01:25 Whiteboard explanation
08:24 Code overview
10:37 Client-side code
13:07 Server-side code
22:53 Middleware
26:51 Overview and conclusion