12 - Hashing Your Passwords - Advanced Node and Express - freeCodeCamp
Ganesh H
So far we have been storing our user's passwords as plain text, which is very dangerous! We need to 'hash' our passwords using a one-way function to store them securely. We can do this through an npm module called bcrypt.
Link to Challenge : https://www.freecodecamp.org/learn/quality-assurance/advanced-node-and-express/hashing-your-passwords Written Guide: https://www.notion.so/ganeshh123/Hashing-Your-Passwords-8c6c1e0914e04ffcafabe0096db9fa84
Full Playlist for this course : https://www.youtube.com/playlist?list=PLhGp6N0DI_1RL9djhgSH65pZhJ6xSyKX8 All Writen Guides for this course : https://www.notion.so/ganeshh123/ccf6039186334f83a54c1c9216f30e3c All My Tutorials can be found at : https://www.notion.so/Tutorials-Ganesh-H-293ea420d34a464f9a1907e0405b5f26
00:00 - Introduction 00:10 - Why Plain Text passwords are unacceptable 00:35 - How Hashing Works 00:52 - Installing bcrypt 01:14 - Salt Rounds 01:32 - Hashing a Password - bcrypt.hashSync() Generates a hash for the given input with the number of rounds specified. https://www.npmjs.com/package/bcrypt#to-hash-a-password-1 02:48 - Checking Passwords - bcrypt.compareSync() Checks that the given hash (second argument) is valid for the given input (first argument). The number of salt rounds can be obtained from the hash. https://www.npmjs.com/package/bcrypt#to-check-a-password-1 04:12 - Why it's safe to store the Hash 04:34 - Testing bcrypt Hashing Online 05:00 - How Secure is bcrypt? 05:22 - Implementing Password Hashing in our App 07:52 - Challenge Solution
-————————————————————————————————————- Node.js is an open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside a web browser. Node.js lets developers use JavaScript to write command line tools and for server-side scripting—running scripts server-side to produce dynamic web page content before the page is sent to the user's web browser.
Express.js, or simply Express, is a web application framework for Node.js. It is designed for building web applications and APIs. It has been called the de facto standard server framework for Node.js. Express runs between the server created by Node.js and the frontend pages of a web application. Express also handles an application's routing.
freeCodeCamp (also referred to as “Free Code Camp”) is a non-profit organization that consists of an interactive learning web platform, an online community forum, chat rooms, online publications and local organizations that intend to make learning web development accessible to anyone. Beginning with tutorials that introduce students to HTML, CSS and JavaScript, students progress to project assignments that they complete either alone or in pairs. Upon completion ... https://www.youtube.com/watch?v=N4rU2efvpuI
43594684 Bytes