mirror of
https://github.com/stablyai/orca.git
synced 2026-11-15 18:37:24 +00:00
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.