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

Web Dev Roadmap for Beginners (Free!):

In this Next-Auth login authentication tutorial with Next.js app directory, you will learn how to protect all of your pages with credentials or an OAuth login from providers like GitHub. Learn how to protect any page in your app.

**Get CodiumAI for FREE:** or visit:

💖 Support me on Patreon ➜

⭐ Become a full-stack web dev with Zero To Mastery Courses:
– Complete Next.js Developer:
– Advanced React:
– Junior to Senior Dev Roadmap:

🚩 Subscribe ➜

📬 Course Updates ➜

❓ Questions – Please post them to my Discord ➜

☕ Buy Me A Coffee ➜

👇 Follow Me On Social Media:

🔗 Source Code:

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

(00:00) Intro
(00:05) Welcome
(00:28) CodiumAI
(01:39) Create Next.js Project & Dependencies
(02:21) NextAuth.js Introduction
(04:20) Auth Route Handler
(05:49) NextAuth options
(11:52) Setting up GitHub OAuth
(16:09) Configuring Providers in options
(23:08) Send a GET request to /api/auth/providers
(25:06) App Behavior for 3 different server pages
(26:27) Apply NextAuth with Middleware
(29:10) 3 Different Protection Approaches
(31:14) NextAuth with Client Components
(37:35) Next.js Images from an OAuth Provider
(39:26) Wrap-up

📚 Tutorial References:
🔗 NextAuth.js Official Site:
🔗 Next.js Official Site:
🔗 ES7 React Snippets Extension:

Was this Next-Auth tutorial using the Next.js 13 App Directory helpful? If so, please share. Let me know your thoughts in the comments.

#nextjs #next #auth