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

YouTube

Next-Auth Login Authentication Tutorial with Next.js App Directory

Dave Gray via YouTube

Overview

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

Reviews

Start your review of Next-Auth Login Authentication Tutorial with Next.js App Directory

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.