Caffeinated Coder
Book an appointment
Lesson 43 · Web and backend

Logins: authentication and sessions

When you log in, a website has to answer two questions: who are you, and what may you do? Follow Ada through signing up, logging in and staying logged in. The server never keeps her password, only a salted, slow hash; after a successful login it starts a session and hands her browser a session ID in a protected cookie. Then see two common additions: signed tokens (JWT) and a second factor.

12 min11 steps5 questionsIntermediate
Fig 43 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.