Securely Update User Password after Login in Express & MySQL - Part 3

Securely Update User Password after Login in Express & MySQL - Part 3

T
Thapa Technical
Apr 6, 2025

Welcome to Part 3 of the Change Password Series! In this video, we'll look into the secure process of changing user passwords in Express. We’ll cover how to validate input, find the user by userId, compare current and database passwords, and securely update the new password using hashing.

🔥 Access Source Code, PPT & Notes here for Free : https://www.thapatechnical.com/2024/11/introduction-to-nodejs.html

💡 What You’ll Learn in Part 3:
Validating input data using Zod
Finding users by userId
Comparing current and stored passwords securely
Hashing the new password before updating
Implementing proper error handling and security practices

📺 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 - Introduction: Overview of Change Password Process
0:12 - Recap: What We Covered So Far
0:30 - Steps to Change Password Securely
4:18 - Pause & Try It Yourself Challenge
4:30 - My POV on Learning by Doing
5:00 - Get the Source Code for Free
5:20 - Finding User by userId
6:38 - Extracting Current & New Password from Zod Data
7:10 - Comparing Current & Database Passwords
9:46 - Important Considerations for Password Updates
11:25 - Updating the Password with Hashing
12:15 - Testing the Change Password Functionality
12:30 - Outro & What’s Next in Part 3

Timestamps