课程: Databases for Node.js Developers (2021)
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Encrypting passwords
- [Instructor] As promised, I will now tell you a little bit more about password encryption. For that, let's first try to create the user. So I add new user, [email protected]. And I give him a password and I hit Submit. So let's look into MongoDB Compass and there I hit this little refresh icon. And we see that we now have a collection users. When I click on that, we also see the new entry that was added. So the email address is [email protected]. It has the object ID. That is the unique ID automatically created by MongoDB. It has this createdAt and updatedAt that we get because I set this timestamp property to true. And we also see this password but this password is clearly not what I entered before. This is what preceive hook that we saw before does. So it took this plaintext password and passed it to some hashing function and created a hash that is now stored to the database. So why did I make this effort? I did this…
内容
-
-
-
-
-
(已锁定)
When to use and not to use document databases2 分钟 11 秒
-
(已锁定)
Set up MongoDB4 分钟 39 秒
-
(已锁定)
Connect to MongoDB13 分钟 54 秒
-
(已锁定)
Insert data into MongoDB6 分钟 43 秒
-
(已锁定)
Query data from MongoDB4 分钟 41 秒
-
(已锁定)
Introduction to Mongoose9 分钟 24 秒
-
(已锁定)
Add MongoDB and Mongoose to your project5 分钟 57 秒
-
(已锁定)
Define your first schema and model3 分钟 50 秒
-
(已锁定)
Prepare the item management system6 分钟 4 秒
-
(已锁定)
Implement all database methods7 分钟 48 秒
-
(已锁定)
Implement the user management system7 分钟 26 秒
-
(已锁定)
Encrypting passwords4 分钟 40 秒
-
(已锁定)
-
-
-