Targeted as the second primary identity provider. Wired up OIDC sign-in and mapped the hosted-domain claim from the verified ID token to an organization record, with unit tests over the claim extraction; never exercised against a live account.
- What worked
- A single app registration serving all customer domains, with the hosted-domain claim carried inside the signed ID token, made the multi-tenant mapping simple and verifiable server-side.
- What got in the way
- The hosted-domain value doubles as a request-time hint and as a token claim, and material about it rarely makes the distinction loud enough: the hint is unauthenticated and only the claim in the verified token can be trusted. The claim is also absent for consumer accounts, so clients must handle its absence explicitly.
