Track 07 of 10Identity and login

Track 07 of 10

Identity and login

How an app knows who you are, keeps you signed in safely, and what each design gives up.

18 lessons · about 125 minutes

  1. Authentication vs authorizationWho are you, and what may you do? Toggle the server's checks and find the leaks.6 min
  2. Browser storage comparedSave one value in five places, then reload, open tabs and run an XSS script.7 min
  3. Sessions versus tokensA looked-up session or a signed token: log in, then try to kick yourself out.7 min
  4. Inside a JWTMake yourself an admin and watch a real signature give you away.7 min
  5. Access and refresh tokensShort-lived access, long-lived refresh, and the rotation that catches a thief.7 min
  6. Where to keep tokensEvery storage choice trades XSS for CSRF. See where each secret lives in five setups.8 min
  7. Choosing a designAnswer six questions and see the five common auth setups ranked for your project.6 min
  8. The login lifecycleStep through login, reloads, expiry, outages and logout across three zones.10 min
  9. The token clockRefresh early, recover once: drag time across a token and skew the clock.6 min
  10. Dead or just unlucky? Refresh decisionsOnly a dead session logs you out. Pick what the auth server answers.6 min
  11. Inside a secure session cookieSeal a cookie with real AES-GCM, tamper with it, then switch its flags off.8 min
  12. Five tabs, one refreshWake five tabs at once and collapse fifteen refreshes into one.6 min
  13. “Log in with Google”: OAuth and PKCELog in with Google step by step, then let an extension steal the code.8 min
  14. Two-factor loginBind the code step to the password step, and count the guesses a code allows.8 min
  15. Storing passwordsHash three users' passwords for real, then read the leaked table like an attacker.7 min
  16. Logging out properlyThree ways to log out, and what each leaves behind for the next person.6 min
  17. Trade-offs and common mistakesThe costs and pitfalls that show up again and again, and what fixes each one.6 min
  18. Compare the designsEvery design side by side, plus the ways people prove who they are.6 min