Identity and access
What is Authentication?
Definition
Authentication is the process of proving who you are — verifying an identity using something you know, something you have or something you are.
Also known as: AuthN, Login
Authentication in more detail
Authentication answers exactly one question: are you who you claim to be? A password is something you know, a phone or hardware key is something you have, a fingerprint or face is something you are. Combining factors from different categories is what multi-factor authentication means; two passwords are not two factors, and an SMS code is a weak second factor because phone numbers can be taken over.
It is constantly confused with authorization, and the distinction is worth stating flatly. Authentication establishes identity; authorization decides what that identity may do. Authentication happens first and once; authorization is checked on every action. Showing a passport at a hotel desk is authentication; the key card only opening your own room is authorization. HTTP's status codes muddle this — 401 Unauthorized actually means unauthenticated, while 403 Forbidden is the authorization failure.
In practice the mechanism has moved on from passwords. Passkeys, built on WebAuthn, store a private key on the device and sign a challenge, so there is no shared secret to steal and nothing phishable to type. Where passwords remain, they must be stored only as salted hashes from a slow algorithm such as Argon2 or bcrypt — never encrypted, because a system that can decrypt a password can also leak every one of them.
Authentication example
Factors, and what each proves
knowledge password, PIN you know a secret
possession passkey, TOTP app, key you hold a device
inherence fingerprint, face you are this person
Authentication vs authorization, in one exchange
POST /login { user, password } -> 200, session issued
(authentication)
DELETE /invoices/9 as that user -> 403 Forbidden
(authorization)
401 = the server does not know who you are
403 = the server knows, and the answer is still noAuthentication — common questions
- What is the difference between authentication and authorization?
- Authentication verifies identity — proving you are who you say. Authorization verifies permission — deciding what that verified identity is allowed to do. You authenticate once per session and are authorized on every request.
- Is two-factor authentication really necessary?
- For anything valuable, yes. It defeats the most common attack by far, which is reusing a password leaked from another site. A passkey or hardware key is stronger than an SMS code, because SMS can be intercepted or redirected through a SIM swap.
- Should passwords ever be encrypted?
- No. Encryption is reversible, so a breach of the key exposes every password. Store a salted hash from a deliberately slow password hashing function such as Argon2id, bcrypt or scrypt, and verify by hashing the attempt and comparing.
Keep reading
Every definition in the set is indexed A-Z in the developer glossary, and the cheat sheets cover the syntax once you know what you are looking for.
Browse the A-Z glossary