Skip to content

ONE QUESTION. YOUR REASONING.

Design login and authentication

Design user login for a large consumer product: sign-up, sign-in, staying signed in, password reset, a second factor, and protection against account takeover.

System designInfrastructure and platformMid-levelSenior

YOUR BRIEF

What to work through

Work through login and authentication as a spoken system design interview. Start by clarifying the scope, sketch a working design and explain the trade-offs behind your choices.

  • Sign up and sign in with email and password
  • Stay signed in across visits, and sign out of one device or all of them
  • Reset a forgotten password by email
  • Turn on a second factor, and be asked for it on risky sign-ins
  • Slow down password guessing and attacks with leaked passwords

BEFORE YOU START

Constraints to discuss

  • Passwords are kept only as slow salted hashes, never in a form that can be reversed
  • Session ids carry at least 64 bits of entropy (OWASP)
  • Sign-in stays available, and an outage never weakens the checks
  • At most 100 failed attempts in a row on one factor before it is disabled (NIST)
  • Sessions end on the server after an idle limit and an absolute limit
Need a starting point?

Watch for these common gaps as you prepare:

  • Storing passwords with a fast hash, or encrypted so they can be reversed
  • Long-lived tokens with no way to end them early
  • A reset link that never expires or works more than once
  • Different answers for known and unknown emails at sign-in or reset
  • Locking an account after a few failures, so anyone can lock out any user
  • Keeping old sessions alive after a password reset
Read: System design questions and who asks them

Why this question is in the collection

These sources connect the problem to company interview reports or preparation guides. They do not guarantee what a company will ask you.

KEEP GOING

Your next question

Storage, files and linksDesign BitlyInfrastructure and platformDesign a rate limiterInfrastructure and platformDesign an A/B testing platformInfrastructure and platformDesign an ad click aggregator
Browse the collection
01

Pick a question

Read the brief and choose what you want to work on.

02

Talk it through

Explain your thinking. Respond to follow-ups. Draw when a design needs it.

03

Find your next improvement

Use the feedback from your interview to decide what to practise next.