Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Product Authentication Platform

Design a shared first-party login and session platform with secure credentials, fast token validation, tested backups, and a 10× growth path.

Problem statement

For this exercise, assume several first-party products share one authentication platform. An existing user signs in with normalized email and password, receives a signed audience-bound access token valid for 15 minutes plus an opaque rotating refresh session valid for up to 30 days, and can log out or revoke sessions.

Product services authenticate requests using the access token without placing the identity database on every request path. Passwords exist only as modern salted adaptive hashes; plaintext passwords and refresh secrets never enter logs, caches, backups, or analytics.

Design the database and schema, API and authentication flow, backup and restore strategy, and a path to 10x load without changing the client contract.

Account registration, email verification, password reset, social login, enterprise federation, MFA, passwordless login, product authorization roles, and profile storage are outside scope.

What to build

  1. For this exercise, an existing active user can submit email and password and receive one durable session plus a short-lived access token or a safe authentication failure.
  2. For this exercise, a client can rotate a valid opaque refresh token and receive a new access token without allowing replayed old refresh tokens to create parallel sessions.
  3. For this exercise, a first-party product can authenticate an audience-bound access token with low latency and reject expired, invalid, or revoked credentials.
  4. For this exercise, a user can log out one session or revoke all sessions and receive a stable result that prevents future refreshes.

At scale

  • Source fact: the design discussion must cover the database and schema, backups, API and authentication flow, and scaling by 10x.
  • For this exercise, assume a baseline of five million accounts, 2,000 login or refresh requests per second, and 200,000 product-token validations per second, with a required path to 10x each workload.
  • For this exercise, target 300 milliseconds p95 for healthy login or refresh, 20 milliseconds p95 for product-side access-token validation, and 99.99% monthly availability for authentication APIs.
  • For this exercise, retain security audit events for one year and provide encrypted point-in-time recovery with a five-minute RPO and one-hour RTO, verified through quarterly restore drills.