Рет қаралды 801
In this video, learn how to set up AuthJS v5 beta for authentication on the server in NextJS 14. This tutorial covers configuring sign-in and sign-out processes, email-only authentication with sessions, and setting up NextAuth to handle everything on the server. We'll use a database for session management, and explore essential configurations, Prisma ORM integration, and securing pages and API routes. This is an update to a previous video, showcasing the latest features of AuthJS v5. Perfect for those looking to quickly implement robust passwordless server-side authentication in their Next.js projects.
Resources 🔑
Source code: github.com/taylor-lindores-re...
AuthJS: authjs.dev/
Prisma ORM: www.prisma.io/
NextJS: nextjs.org/
Chapters 📖
00:00 Introduction to NextAuth v5
02:25 Setting Up the Project
04:04 Configuring Environment Variables
09:13 Setting Up Prisma
11:10 Creating Authentication Pages
16:18 Configuring NextAuth
28:30 Implementing Sign In and Sign Out
31:30 Creating Protected Routes
34:17 Testing and Final Thoughts
Thanks for watching, please feel free to leave any comments below!