You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(auth): org-scope registered SSO/SAML providers so any org admin can manage them (ADR-0024 / cloud#551) (#2407)
@better-auth/sso gates ORG-LESS providers' delete/update/domain-verification on
provider.userId === caller (registrar-only). The register bridges now resolve the
caller's active org (best-effort /get-session re-dispatch) and scope the provider
to it, so management gates on isOrgAdmin — any org owner/admin can manage the
env's IdPs. Falls back to org-less when no active org (no regression).
Verified E2E: form-registered OIDC provider lands with organization_id = env org
(was null); register + delete still 200.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Auth: org-scope registered SSO/SAML providers so any org admin can manage them (ADR-0024 / cloud#551)
6
+
7
+
`@better-auth/sso`'s provider-management endpoints (delete / update / domain verification) gate ORG-LESS providers on `provider.userId === caller` — only the original registrar could manage them, so a second org admin couldn't delete or verify an IdP someone else registered. The register bridges now resolve the caller's active organization (best-effort, via a `/get-session` re-dispatch) and scope the provider to it, so management gates on `isOrgAdmin` instead — **any** org owner/admin can manage the environment's IdPs. Falls back to org-less (no behavior change) when no active org is set.
8
+
9
+
Verified E2E: an OIDC provider registered through the form lands with `organization_id` set to the env's org (was null); register + delete still succeed.
0 commit comments