Files
orca/cloud/apps
Neil de4286aa73 fix(cloud): EP-9 billing tokens are minted for the team this device shows, never auth's shared active team
The desktop minted billing tokens with an empty body, so auth picked the team from the cloud
profile's active team, which every device of the same user shares: one device switching teams made
the other read (and act on) that team's plan, hours and usage. mintBillingToken now sends {orgId}
for this device's team (auth #761), refuses a token whose org claim is any other team (fail
closed: billing_org_mismatch), and falls back to {} on an older auth (400) with the claim still
checked. Mirrors the sandbox mint (#634).
Billing test: two teams of one owner on one Stripe customer each read only their own plan/hours.
2026-11-13 05:30:51 -08:00
..