Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Learn how to implement Next-Auth login authentication in a Next.js app using the App Directory structure. Explore the process of protecting pages with credentials or OAuth login from providers like GitHub. Discover various approaches to secure different parts of your application, including server pages and client components. Gain insights into setting up NextAuth options, configuring providers, and implementing middleware for authentication. Master the integration of Next.js images from OAuth providers and understand different protection strategies for your app's pages.
Syllabus
Intro
Welcome
CodiumAI
Create Next.js Project & Dependencies
NextAuth.js Introduction
Auth Route Handler
NextAuth options
NEXTAUTH_SECRET
Setting up GitHub OAuth
Configuring Providers in options
Send a GET request to /api/auth/providers
App Behavior for 3 different server pages
Apply NextAuth with Middleware
3 Different Protection Approaches
NextAuth with Client Components
Next.js Images from an OAuth Provider
Wrap-up
Taught by
Dave Gray