Concept
Passwords are stored as slow, salted hashes with bcrypt, scrypt or argon2, never encrypted or in plain text. Verifying compares a fresh hash of the attempt against the stored one.
The tutor works through these with you, in conversation and code. A session ends when you have shown them, not when a video does.
A few lines that show Password hashing doing its job.
import { hash, verify } from "@node-rs/argon2";
const stored = await hash(password); // argon2id, random salt
const ok = await verify(stored, attempt);
// Always take the same time whether or not the user exists:
const user = await users.findByEmail(email);
const valid = user ? await verify(user.passwordHash, attempt) : (await verify(DUMMY_HASH, attempt), false);Using a fast hash such as SHA-256, with or without a salt. A leaked table can be cracked at billions of guesses per second; password hashes must be slow on purpose.
Your roadmap puts these before Password hashing, unless you already know them.
Once a session shows you understand Password hashing, it comes back for review. Each review takes a minute and tells the memory model how well you still know it.
Topics that build on Password hashing.