From the course: Databases for Node.js Developers
Unlock this course with a free trial
Join today to access over 24,400 courses taught by industry experts.
Securing credentials with password hashing - Node.js Tutorial
From the course: Databases for Node.js Developers
Securing credentials with password hashing
- [Instructor] In our last video, we discussed the dangers of storing passwords in plain text. Now we will implement secure password hashing in our model. Instead of storing passwords directly as you see it here, we will transform them into hashed version using a one-way function. This ensures that even if the database is compromised, passwords remain protected. Under the hood, we will also use salting, which adds randomness to each hash, preventing attackers from exploiting duplicate passwords. For this, we will use Argon2, a modern secure hashing algorithm designed to resist brute force attacks. Let's get started. So I head back into Visual Studio Code, and there first we'll install Argon2. So I type npm install Argon2 into my terminal. Then I start my application right away, and then we have to go into the model because we want to build this functionality directly into the database model. And for that I go to models, Sequelize, and there I open user. And in user I will first bring…
Contents
-
-
-
-
-
-
(Locked)
Using MySQL for our users and orders1m 8s
-
(Locked)
Setting up MySQL with Docker2m 49s
-
(Locked)
Exploring MySQL with MySQL Workbench1m 57s
-
(Locked)
Introducing Sequelize1m 51s
-
(Locked)
Setting up the database connection7m 43s
-
(Locked)
Designing the database structure2m 1s
-
(Locked)
Creating a user model for Sequelize7m 47s
-
(Locked)
Creating the order models for Sequelize11m 56s
-
(Locked)
Loading and syncing the models13m 5s
-
(Locked)
Creating, updating and deleting users with Sequelize12m 52s
-
(Locked)
Securing credentials with password hashing7m 2s
-
(Locked)
Implementing the user login9m 15s
-
(Locked)
-
-
-