API Authentication with Node Part #8 - Bcrypt Explained

preview_player
Показать описание
In this video, we'll learn all about Bcrypt! We'll see how we can use it to hash our passwords so that we don't store them in plain text format in our database.

Next, we'll also learn how salting works and why it's needed later on when we want to compare the password user just typed with the hashed version that we have stored in our database.

Link to repository:

Specific branch:

You can find different branches for different videos and reference the code that way. Every video (that's about programming) will have a corresponding branch that's called the same as the video title.

Huge shout-out to Michael Alaev for helping out with GitHub repository!
Рекомендации по теме
Комментарии
Автор

I have refunded 3 courses + 1 (3 from udemy) for node, and by just watching this series of auth i would buy your course and not refund it :P. Amazing, thank you again. going to continue it tomrrow

marwanfikrat
Автор

I really appreciate these tutorials, man. The quality and relevance is on point

farookk
Автор

Very good video again. In the end you could even write something like this:
const authenticate = (strategy) => passport.authenticate(`${strategy}`, { session: false });
And the reference it in route handler like that: authenticate('jwt'),

HDChif
Автор

Let join other learners in saying you work is marvelous! I love your style and attention to detail and the pace suites me well. One suggestion is to reference the documentation for the third party libraries that are being used. E.g. where in the passport documention is done() documented? I realize walking through the documentation is not practical but just a short mention of where one can go to learn more about the library being used and why you chose to use that particular library over others that are out there. Thanks again and if you decide to make a course I would definitely buy.

kenchang
Автор

Would definitely buy this. Amazing so far, such good in depth knowledge and so adeptly communicated to us! I've watched and read so many different things, but this is by far the clearest, cleanest, easiest to understand code.

technicallyparv
Автор

many is suggesting CodeWorkr for making a paid course. I don't get it why they aren't happy with the free one.
Great series though!

hashmatali
Автор

Hey man thank you very much for this series. I have been through many a YouTubers before I ended up on your channel and this is among the top channels for nodejs tutorials.

BTW an extra thank you for taking the time to explain difficult to grasp concepts along the way.

Please keep them coming.

Well done.

mzaman
Автор

Congratulations! Your lessons are really amazing! I'm learning a lot, thank you :D But I don't understood just a thing: How the users.js from routes, know about passport.js file? Cause you don't use the passportConf anytime, just the third party passport.js.

viniciusmarch
Автор

I got this error...

TypeError: user.isValidPassword is not a function
at [as _verify]
at <anonymous>
at process._tickDomainCallback

tsxdaniel
Автор

Does local strategy need to be aware of the JWT_SECRET ? What is the purpose is using `new LocalStrategy()` as it seems to do is wrap the function we write to checks the password word the return a user instance?

NckNck-puvb
Автор

Fantastic phase 1 series...I learnt Alot, Thank you....Now Unto phase 2

ronnynijimbere
Автор

Even after 3 years, this course are still relevant. Only need some tweak because the package version are different and the API has change. Thank you so much for every effort that you put into this course! Finally i ended up on your tutorial after looking several node js tutorial in youtube. Still looking up for another great tutorial from you!

radenadri
Автор

In the routes' file first line, why do we require express even though it doesn't appear we use the const anywhere? For some reason, without importing it, the password.js authenticate methods will break later because the User model is an empty object even though we import it.

cw
Автор

fabulous job done by you !.
I was not able to configure the local strategy in my node application but just because your this tutorial now i am able to configure it in correct way.
Thank you so much for wonderful tutorial !.

hardikpatel
Автор

I really like your tutorials. I have a doubt in my mind. I am trying to sign in either using phone or using email. I know that by default passport uses username for username and we can set usernameField to use email. But, I want to use either email or phone to be used as usernameField. How can i do that?

audiobeginner
Автор

its the best node authentication tutorial, its on point and everything is well explained. its like more than a paid course. Thank you for your dedication and had work you put on making this. and i hope you make more of this. and Thank you again.

surafelgetachew
Автор

This tutorial is amazing! thank you very much for your work!

dazoo
Автор

I was stuck on it for a few days, cursed by over-complicated tutorials. Thanks, man! Because of you I can rest this weekend.

kaushikbandyopadhyay
Автор

quick Q : isValidPassword in the model is asynch - and it calls bcrypt.compare and awaits it. Then passport.js also awaits isValidPassword. Do they both need to await?

in my mind, the reason isValidPassword doesn't need to be asynch - it would just "await" bcrypt. But now we have two awaits for essentially the same event.

am i missing a nuance?

EdwardMarkovich
Автор

Great video are you still going to make more?

ericlim
join shbcf.ru