Summary
Keywords
Full Transcript
In this video (Part 2 of the Forgot Password series), we will create a secure reset password link and store password reset tokens in the database. Weโll validate the email with Zod, generate a random token, hash it, and insert it into the DB. Finally, we'll build the link to send via email. Letโs make password recovery seamless! ๐ฅ Access Source Code, PPT & Notes here for Free : https://www.thapatechnical.com/2024/11/introduction-to-nodejs.html ๐บ Watch the complete Node.JS Playlist here :https://youtube.com/playlist?list=PLwGdqUZWnOp3KELplHtc-RnJ5xTUPqdgH&si=_ob8F88HYxCdspup ------------------------------------------------------------------------ ๐ Boost Your Skills with these Pre-Requisite Videos: ๐ Best HTML Course - https://youtu.be/5ccq_nLHneE ๐ Best CSS Course - https://youtu.be/MSICFljRcb4 ๐ JavaScript Basics Course Part 1 - https://youtu.be/13gLB6hDHR8 ๐ JavaScript Advanced Course Part 2 - https://youtu.be/YwsOCN8woA8 ------------------------------------------------------------------------ ๐ธ Build Your Own E-commerce Website for Free! - https://www.thapatechnical.com/2024/03/build-complete-ecommerce-website-using.html ------------------------------------------------------------------------ โ๏ธ Join Us! ๐ Become a Member: Unlock perks, free source code, and more Join Now : https://www.youtube.com/channel/UCwfaAHy4zQUb2APNOGXUCCA/join ๐ท Connect on Instagram: https://www.instagram.com/thapatechnical ๐จ๏ธ Join Our Discord Server: Hang out with fellow programmers Discord Link: https://discord.gg/MdScmCsua6 ------------------------------------------------------------------------ โTIMELINEโณ 0:00 Intro to Creating a Reset Password Link & Storing Tokens 0:55 Steps to Post Forgot Password Request 3:25 Creating Route for Post Forgot Password 3:50 Creating Controller Function for Forgot Password 4:30 Creating verifyEmailSchema Using Zod 7:30 Handling Data & Errors from Email Validation 9:40 Verifying User by Email in DB 12:50 Creating a Reset Link for Verified Users 13:20 Steps to Generate and Send the Link 15:00 PAUSE & Try Yourself! 15:35 Passing Arguments in createLink Function 16:05 Generating a Secure Random Token 17:02 Converting Token into a Hashed Format 18:35 Deleting Previous Password Reset Tokens from DB 19:30 Inserting New Password Reset Token into Table 20:34 Creating the Final Reset Password Link 21:50 Understanding the Link and Its Components 23:40 Next Video Update 25:05 Support My Channel
