Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Next.js Authentication System Implementation - Email, Password and OAuth2

Web Dev Simplified via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn to build a production-ready authentication system from scratch in this comprehensive 2-hour video tutorial. Master the implementation of email/password authentication, OAuth2 integration, cookie handling, and session management in Next.js without relying on external libraries. Follow along with detailed diagram explanations and practical code demonstrations covering essential topics like user sign-up, login logic, session management, and private page protection using Next.js middleware. Explore advanced security features including state management and code verification while implementing OAuth authentication for multiple providers such as Discord and GitHub. Gain hands-on experience through step-by-step guidance in creating a secure, scalable authentication system complete with user data handling, cookie management, and generic OAuth client implementation.

Syllabus

00:00:00 - Introduction
00:02:05 - Email/Password Diagram Explanations
00:09:09 - Starting Code
00:12:28 - Email/Password Sign Up
00:20:25 - Session Management
00:34:15 - Email/Password Sign In
00:37:55 - Logout Logic
00:40:25 - Advanced getCurrentUser Function
00:44:15 - Private Pages/Next.js Middleware
00:49:16 - Updating Session Data
00:56:43 - Clerk Setup
01:02:52 - OAuth Diagram Explanations
01:06:23 - Starting Code Updates
01:10:22 - Discord OAuth Setup
01:12:25 - OAuth Auth URL Step 1
01:21:05 - OAuth Access Token Step 2
01:30:45 - OAuth User Data Step 3
01:39:40 - Advanced OAuth Security State
01:44:00 - Advanced OAuth Security Code Verifier
01:47:29 - Making OAuth Client Generic
01:54:18 - GitHub OAuth
01:58:32 - Fixing Cookie Bug

Taught by

Web Dev Simplified

Reviews

Start your review of Next.js Authentication System Implementation - Email, Password and OAuth2

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.