Earn Your CS Degree, Tuition-Free, 100% Online!
AI Engineer - Learn how to integrate AI into software applications
Overview
Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This tutorial shows how to add NextAuth login to a Next.js App Directory project using credentials or GitHub OAuth. It covers provider configuration and several ways to protect server pages and client components.
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