This is the code for the Next-auth 5.0 tutorial on YouTube: https://www.youtube.com/watch?v=bMYZSi_LZ2w
Topics I cover:
- Next-auth 5.0 setup with Prisma Neon adapter & Vercel Postgres
- OAuth (Google, GitHub)
- Email magic links (Resend)
- Admin role
- Authentication in server components, client components, server actions, and API route handlers
- Auth request deduplication (caching)
- Updating user data
- Static caching
- And more