Model answer
Clarify & scope
I’d first clarify whether we’re building login for a new experience or improving an existing one, which clients need it, and whether the account system is shared across Mercari surfaces. I’d treat authentication as a trust-critical backend feature: users need reliable access, while the platform must protect listings, personal information, and transactions. I’d scope the first release to email-and-password login, with a clear path to social login or passkeys if user research supports them.
User segments & pain points
I’d focus first on returning buyers and sellers using a new device. They need to get back into their account quickly, but may have forgotten a password or be signing in from a suspicious location. Recovery must be understandable without making it easy for an attacker to take over an account.
Goals & success metrics
My North Star would be the percentage of legitimate login attempts that reach an authenticated session successfully. I’d pair it with login latency, abandonment, and recovery completion. Guardrails would include account-takeover reports, credential-stuffing rates, false-positive blocks, and support contacts. I’d segment these metrics by device, region, login method, and risk level so a healthy overall rate doesn’t hide problems for a particular group.
Solutions
I’d consider three approaches: password-only login, password login with risk-based additional verification, and passwordless login. Password-only is simple but weak against reused credentials; requiring a second factor every time adds friction; passwordless changes user behavior and recovery requirements.
Recommendation: Start with established, secure password authentication and risk-based step-up verification. Store passwords using a modern password-hashing algorithm with per-user salts and suitable work factors; never log credentials or return whether an email exists. Rate-limit attempts, use generic errors, protect session tokens, and provide an abuse-resistant recovery flow. Issue short-lived access credentials and rotate revocable refresh tokens. Make the design accessible and support secure logout across devices.
Prioritization & trade-offs
I’d prioritize safe, dependable login and recovery over adding multiple sign-in providers. Risk-based checks balance protection and convenience, but depend on reliable signals and need monitoring for bias and false positives.
MVP, measurement & rollout
I’d launch behind a feature flag, test recovery and session revocation, and ramp traffic gradually. I’d compare success, latency, and abuse guardrails by cohort, with rollback criteria agreed in advance. I’d also verify that login integrates cleanly with checkout and listing flows so authentication protects the account without unexpectedly interrupting a transaction.