Authentication
AuthN
ELI5 — The Vibe Check
Authentication is proving you are who you say you are. It's the bouncer at the club checking your ID — not deciding if you can go to the VIP area, just making sure you're actually you. Username and password? That's authentication.
Real Talk
Authentication is the process of verifying the identity of a user, system, or entity. It confirms that credentials (passwords, tokens, certificates) match a known identity before granting access to a system.
Show Me The Code
// Checking a user's credentials
const user = await db.users.findOne({ email });
const isValid = await bcrypt.compare(password, user.passwordHash);
if (!isValid) throw new Error('Authentication failed');
When You'll Hear This
"We need to add authentication to the API." / "Authentication failed — wrong password."
Related Terms
Authorization (AuthZ)
Authorization is deciding what you're allowed to do after you've proven who you are.
Password Manager
A password manager remembers all your passwords so you don't have to reuse the same one everywhere.
Session Hijacking
Session hijacking is when an attacker steals your session cookie or token and impersonates you.
Token
In AI-land, a token is a chunk of text — roughly 3/4 of a word.
Two-Factor Authentication (2FA)
2FA means you need two things to log in: something you know (password) and something you have (your phone).