NextAuth v5 for Beginners: Simple Server-Side Auth in NextJS

  Рет қаралды 801

Taylor Lindores-Reeves

Taylor Lindores-Reeves

Күн бұрын

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!

Пікірлер: 10
@prashlovessamosa
@prashlovessamosa Ай бұрын
Wow thanks very helpful
@taylorlindoresreeves
@taylorlindoresreeves Ай бұрын
Thanks for watching :)
@snbwcs
@snbwcs Ай бұрын
Thank you, this is great content ! ;)
@taylorlindoresreeves
@taylorlindoresreeves Ай бұрын
You are very welcome friend
@leo-phiponacci
@leo-phiponacci Ай бұрын
Thank you, great video! Can you please do a video about Credentials Provider with database sessions?
@taylorlindoresreeves
@taylorlindoresreeves Ай бұрын
Sure can!
@sivasirigiri6616
@sivasirigiri6616 17 күн бұрын
Hey can you please make a same video using trpc or t3 stack
@nasko235679
@nasko235679 29 күн бұрын
There's 0 documentation on credentials provider + database session. When I asked the creator of AuthJS he told me there never will be because he doesn't like it and I should just use JWT. You seem well versed in what is undoubtedly the worst documented auth library in the world lol, so it would be extremely helpful if you could make a video about credentials + database session setup. It's really hard for me to understand as a newer developer since it's all abstracted away and I don't know how to implement the session logic.
@taylorlindoresreeves
@taylorlindoresreeves 29 күн бұрын
Yeah, I've set up credentials across multiple projects so I certainly will create a video on that. It requires a few workarounds because as you said, the author doesn't want you to use credentials and it's obvious when trying to configure it, you have to implement a few hacks. Video will come soon. Thanks!
@nasko235679
@nasko235679 29 күн бұрын
@@taylorlindoresreeves No man, THANK YOU! Coming from Laravel where everything is batteries included, setting up an actually useable nextJS environment with authentication is tough. So far I've had great success using lucia auth for database sessions + credentials, but I'd like to learn how to do the same in authJS.
NextJS 13. Аутентификация и приватные роуты
33:59
Михаил Непомнящий
Рет қаралды 44 М.
Clown takes blame for missing candy 🍬🤣 #shorts
00:49
Yoeslan
Рет қаралды 44 МЛН
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 10 МЛН
Iron Chin ✅ Isaih made this look too easy
00:13
Power Slap
Рет қаралды 36 МЛН
Set up Next-Auth with Next.js and Prisma with this ultimate guide!
42:45
Build SaaS with Ethan
Рет қаралды 53 М.
Server-side Pagination with NextJS 13 Server Actions
19:27
Taylor Lindores-Reeves
Рет қаралды 10 М.
Magic Link With Next Auth Tutorial
25:19
Nizzy
Рет қаралды 744
I Never Want To Build Authentication Any Other Way
2:03:20
Elliott Chong
Рет қаралды 16 М.
Next.js with a separate server - good idea?
22:53
ByteGrad
Рет қаралды 54 М.
Next Auth v5 Complete Guide in Next.js 15 with Prisma and MongoDB
1:22:52
Programming with Umair
Рет қаралды 5 М.
The Story of Next.js
12:13
uidotdev
Рет қаралды 558 М.
Clown takes blame for missing candy 🍬🤣 #shorts
00:49
Yoeslan
Рет қаралды 44 МЛН