Code RoomOAuth consent and scope management
MediumPrep Room Coding #3594

OAuth consent and scope management

System designSecurityMid–Senior~40 min

Design the user-consent and granted-scope subsystem of an OAuth provider that hosts a marketplace of thousands of third-party apps. Requirements: a user grants an app only the scopes it asks for; an app can later request MORE scopes incrementally (without re-granting what it has); the user has a dashboard to review and REVOKE any app's access (all or specific scopes) at any time; and admins of an org can restrict which apps/scopes their users may grant. Discuss the consent/grant data model, incremental authorization, how revocation invalidates already-issued tokens, and how org-level policy overrides individual consent.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.

Clarify4:30 left
Estimate4:30 planned
Design13:30 planned
Deep dive10:30 planned
Failure7:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.