"use client"; /** * SsoTabs (TASK-0131) — the org admin "Integrations → SSO" surface. * * A SELF-CONTAINED component: it takes `orgId` and owns its own data * (react-query against `ssoApi`). TASK-0133's `AdminIntegrations` mounts the * SAME component inside the org console; until then a standalone route * (`/org/[orgId]/admin/integrations`) hosts it. * * Two views: * - NO provider → an empty state + a "Configure SSO" action that opens the * create form (SAML or OIDC). * - provider set → the masked provider summary + an edit form (config only — * the secrets are reveal-once), a test-connection panel, the enforce * toggle (with confirm), and the danger-zone delete. * * Secrets are REVEAL-ONCE: the SAML X.509 cert PEM / OIDC client secret are * pasted into a field on create/rotate, POSTed once, and the server encrypts * them (AES-256-GCM). The read returns only `certificateConfigured` / * `clientSecretConfigured` booleans — the values are never fetched back, so * there is nothing to "reveal" after save (the UI just shows a "configured" * badge + a "Rotate" affordance that re-opens the paste field). * * A11y: the create/edit forms are real