PrepCity

Authentication and authorization

Route · 23 of 34Route 23 / 34, see the whole routeOpen the lab

By the last page, this is the design you will have built.

Route · step 23 of 34 · 14 pages · about 13 min

Authentication and authorization

An API that trusts a user id from the client leaks everything. Prove who is calling with a hashed password and a session or signed token, keep tokens short and rotate refresh tokens, then check on every request that this user may touch this row.

New words you’ll learn

  • PII masking
  • Authentication
  • Password hash
  • Password salt
  • Session
  • Cookie
  • HttpOnly
  • JWT
  • JWKS
  • Access token

Page by page