IAM interview questions · Architecture and scenarios
Design customer login for a retail app with web and mobile.
In plain wordsMake the door easy for real customers and hard for robots, remember what each customer agreed to, and use the same door on web and app.
How it works
Architecture: one CIAM IdP serving web and mobile with OIDC authorization code + PKCE; a backend-for-frontend for the web so tokens stay server side; native app uses system browser or native passkey APIs; APIs behind a gateway validating access tokens.
Experience: passkeys first, email or SMS OTP as fallback, social login if the audience wants it, guest checkout, progressive profiling (ask the address only at first order). Security: bot detection on signup and login, breached password check, rate limiting, risk-based step-up, strong recovery. Privacy: consent records per purpose, preference centre, data export and deletion.
A concrete example
Black Friday: traffic grows 20x and a botnet tests leaked email/password pairs. The design holds because the IdP scales horizontally, bot detection blocks most attempts at the edge, breached-password detection forces resets, and passkey users are simply not affected. Conversion stays stable because real customers see no extra step.
See it in action: what are you agreeing to
Mistakes to avoid
- Embedding the login form inside the mobile app with username/password sent to the backend.
- Forgetting account linking: the same person with Google and email becomes two customers.
They may also ask you
- How would you handle account recovery securely?
- How do you link social and local accounts safely?
- Go deeper
- CIAM architecture →
- Consent →