Next.js · Authentication · Tech Lead · Architecture
Lead: design auth for a multi-tenant Next.js SaaS.
Short Interview Answer
Org-aware sessions, middleware tenant resolution, server-side enforcement, audit logs, and SSO options.
Detailed Explanation
Isolate data by tenant at the query layer. Support invite flows and role claims. Plan for session revocation and SCIM later.