How To Send A Verification Email using Next-Auth - Step by Step (Detailed)

Опубликовано: 14 Май 2026
на канале: Brett Westwood - Software Engineer
8,269
212

My fav place to learn to code is Scrimba

Get 20% off a subscription with my link 👇
https://scrimba.com/?via=brettwestwood

GitHub Repo Link 👇
https://github.com/bwestwood11/verifi...

Join our Discord server to interact with other developers 👇
  / discord  

In this video, I teach you how to create a verification token so you can send it to the user after they register for an account.

This will allow them to verify their email by clicking the link we send them which in turn will allow them to login.

We will be using Next.js 14, Auth.js v5, Resend, MongoDB, Prisma, Shadcn & Tailwind.

Documentation Pages

Auth.js 👇
https://authjs.dev/getting-started/mi...

Prisma 👇
https://www.prisma.io/docs/getting-st...

Next.js 👇
https://nextjs.org/docs

Resend 👇
https://resend.com/docs/send-with-nextjs

Timestamps
0:00 Intro
0:45 Overview of the UI
1:40 Overview of Configuring Auth.js
7:32 Create a model in Prisma Schema file
10:56 Generate a Verification Token
22:35 Send Email with Verification Token and Resend
35:52 Verifying the Token when they click link in email
50:40 Creating Logic if they should be able to login or not
56:25 Retrieving the session object from Auth.js
58:12 Outro