Unread Notifications

Latest Notifications

No Notifications

You're all set! Start a discussion by leaving a comment on a lesson or replying to an existing comment.

AdonisJS User Roles

Simple Steps To Require Email Verification In Your AdonisJS App

23:30 Watch
0:51 Read

Learn how to require your users to verify their email address using a Token model with AdonisJS and Lucid ORM.

Watch on YouTube
View Repository

Requiring email verification is a common practice among many websites. It usually involves the website asking the user to enter their email address and then clicking on a link that is sent to their email address. This link can be clicked or opened in the browser, and it will take them to a page that confirms that they are who they say they are.

This process ensures that only real people with a valid email address can sign up for an account on the site. It also prevents people from using fake accounts or using someone else’s account without permission.

🕑 Chapters

00:00 - Intro
00:30 - Project Review
01:10 - Tracking User Email Verification
02:15 - Verify Email Token Methods
04:45 - VerifyEmailController.index
07:20 - VerifyEmail Mailer
09:58 - Generate Verify Email Token
11:00 - Send Verify Email User Method
12:09 - VerifyEmailController.verify
15:15 - Testing Verify Email Send & Functionality
17:20 - Resend Verify Email On Invalid Token
18:20 - Restricting App Access For Unverified Users
22:54 - Outro


Prepared By

Tom Gobich

Burlington, KY

Owner of Adocasts, JavaScript developer, educator, PlayStation gamer, burrito eater.

Visit Website