Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

feat(auth): Enterprise SAML SSO (#1455)

Naveen Kashyap848b7e1c7021
diff --git a/.ai/lessons.md b/.ai/lessons.md
index 06ba610b5e..a3aba08ce4 100644
--- a/.ai/lessons.md
+++ b/.ai/lessons.md
@@ -1122,6 +1122,15 @@ canvas hosting Radix popovers/selects.
**Applies to:** `packages/database/supabase/functions/get-method/index.ts` (`quoteToQuote`), `apps/erp/app/modules/sales/sales.service.ts` (`deleteQuote`), any insert into `externalLink`.
+## `crbn reload` must load root `.env` — compose-substituted secrets silently reset
+
+**Context:** Enabling GoTrue SAML via `${SAML_ENABLED:-false}` / `${SAML_PRIVATE_KEY:-}` in docker-compose.dev.yml, values kept in root `.env`.
+
+**Problem:** `crbn reload <service>` invoked `docker compose up -d --force-recreate` with only `--env-file .env.local` and no dotenv preload. Root `.env` vars referenced by compose substitution resolved to their defaults, and — worse — recreating ANY service also reconciles other services whose definition changed, so a `crbn reload kong` recreated gotrue with SAML silently OFF even though the user's earlier `crbn up` had it on. (`crbn up` was immune only because it loads `.env.local` then `.env` into process.env first, and shell env wins compose interpolation.)
+
+**Rule:** Any crbn command that invokes docker compose must preload BOTH env files into process.env the way `up.ts` does (`loadDotenv(.env.local)` then `loadDotenv(.env)`, both `override: false`). `reload.ts` now does this. After any reload, still verify the dependent feature's health endpoint (e.g. `curl .../sso/saml/metadata` → 200), not just container status.
+
+**Applies to:** packages/dev reload/compose commands; any GoTrue/Kong/storage env sourced from root `.env`.
## An incremental pull-sweep cursor must advance on the SAME field the query filters on
**Context:** The Stripe Connect payment pull sweep (`stripe-connect-pull-sweep.ts`) queried Stripe with `invoices.list({ status: "paid", created: { gte: since } })` but advanced the cursor to `latest status_transitions.paid_at + 1`. An invoice created before the cursor but paid after it (a normal case — invoices are created, then paid later) would never be returned by a future `created`-filtered query once the cursor passed its `paid_at`, so it was permanently skipped with no error, no log, and no retry.
diff --git a/.ai/plans/2026-08-21-enterprise-saml-sso.md b/.ai/plans/2026-08-21-enterprise-saml-sso.md
new file mode 100644
index 0000000000..ffc2a61753
--- /dev/null
+++ b/.ai/plans/2026-08-21-enterprise-saml-sso.md
@@ -0,0 +1,468 @@
+# Enterprise SAML SSO — implementation plan
+
+**Spec:** .ai/specs/2026-08-21-enterprise-saml-sso.md
+**Research:** .ai/research/sso.md
+**Branch:** victoria
+
+> **HISTORICAL RECORD — several planned flows were later superseded.** This plan
+> describes what was built at execution time; the spec's Changelog is the source
+> of truth for the final design. In particular: the archival/reassignment flow
+> (Task 6) was replaced by **link-instead-of-archive** (nothing is deactivated;
+> `reassignUserReferences`/`REASSIGNABLE_USER_COLUMNS` were deleted as dead
+> code); the "Users to re-invite" card (Task 9 step 5) became "Covered Users"
+> and was later removed entirely (coverage is documented on the Identity
+> Provider card instead); and the controlled-environment TOTP exception
+> (Task 10) was removed — SSO sessions skip the MFA gate in EVERY environment.
+> Do not reintroduce these flows from this document.
+
+## Progress
+- [x] Task 1: Migration — `ssoConnection` table + crash-free `create_public_user` (`20260820215433_sso-connection.sql`)
+- [x] Task 2: Apply migration + regenerate types (applied via `pnpm db:migrate`; ssoConnection in types.ts, 4 RLS policies confirmed in DB)
+- [x] Task 3: Add `"sso"` auth provider to env (typecheck green)
+- [x] Task 4: `@carbon/auth/sso.server` — GoTrue admin wrappers + session helper (typecheck green)
+- [x] Task 5: SSO connection validator + service functions. Validator barreled via `~/modules/settings`; service fns in `settings.server.ts` (NOT barreled — deliberate, service-role imports must not leak to browser; import `~/modules/settings/settings.server` directly); MES copy at `apps/mes/app/services/sso.service.ts`. Typecheck green.
+- [x] Task 6: `reassignUserReferences` + `migrateUserToSso` transaction (`users.sso.server.ts`). Deviations (schema-forced, documented in-file): list is 39 entries not 43 (`part.assignee`/`service.assignee` moved to `item` by 20240601210618; `nonConformanceInvestigationTask` dropped by 20251120214020; `approvalRequest.approverId` dropped by 20260204204700) — `satisfies` guard makes the list compile-time-checked against Kysely schema; fresh-user-without-old-account edge throws "re-invite" instead of guessing an employeeType. Typecheck green.
+- [x] Task 7: Callback SSO branch (ERP + MES). ERP: provider→connection→company binding, domain enforcement w/ orphan cleanup, invite lookup (ilike), migrateUserToSso w/ multi-company + generic error flashes, company binding + group re-resolve, AccountLockout reset, CONTROLLED_ENVIRONMENT TOTP gate vs `mfaVerified: true`, company cookie always set. MES: same enforcement, no migration (flash "complete first SSO sign-in in Carbon ERP"); `getSsoConnectionByProviderId` added to MES sso.service. All 5 packages typecheck green; biome clean.
+- [x] Task 8: Login "Continue with SSO" (ERP + MES) + public domain-check API route. Public `/api/sso/check` in BOTH apps (assertIsPost, `sso-check:{ip}` sliding-window 20/1h, boolean-only `{ enabled }` reply; MES has its own api+ route + `path.to.api.ssoCheck`); "Continue with SSO" button + email-first handler on both login pages; `?email=` prefill via ValidatedForm defaultValues. Typecheck green (erp + mes).
+- [x] Task 9: Settings → SSO screen + nav + paths. `x+/settings+/sso.tsx` (Enterprise redirect, settings perms, intent-branched action, SP-details Card with `Copy` from @carbon/react, ValidatedForm, deactivate confirm modal inlined from ConfirmDelete pattern, re-invite card via existing `getEmployees`); nav entry Enterprise-gated via `useFlags().isEnterprise`. Note: `defaultValues.domains` carries an `as unknown as string[]` cast (zfd transform output type vs form input string — commented in-file). Typecheck + biome green.
+- [x] Task 10: MFA exemption for SSO sessions. `ssoProviderId?` on AuthSession (types.ts), preserved in refreshAuthSession beside mfaVerified; ERP + MES shell `requireMfa` gates exempt SSO sessions unless CONTROLLED_ENVIRONMENT. `requireAuthSession` bounce verified to honor `mfaVerified` at mint (session.server.ts:346) — no change needed there. `path.to.sso` + `path.to.api.ssoCheck` pre-staged in path.ts.
+- [x] Task 11: SSO-aware invite emails. `getInviteLink(serviceRole, email, code)` in users.server.ts (falls back to code link on lookup error); wired into employees.new / customers.new / suppliers.new / resend-invite (single path); bulk path inlined in jobs user-admin.ts (cannot import ERP modules). Typecheck green (erp + @carbon/jobs).
+- [x] Task 12: GoTrue SAML config (dev + prod compose, .env.example). Routing verified: kong.yml has NO key-auth plugin anywhere and the `auth-v1` catch-all proxies `/auth/v1/` → GoTrue with CORS only; prod bind-mounts the same kong.yml behind Caddy's wholesale `reverse_proxy kong:8000` — SAML ACS/metadata endpoints pass through in dev and prod with no change.
+- [x] Task 13: Unit tests. `users.sso.server.test.ts` (19 tests: archived email, multi-company predicate, permission merge/remove round-trips incl. "0" wildcard, REASSIGNABLE_USER_COLUMNS audit-exclusion invariants) + `packages/auth/src/services/sso.server.test.ts` (5 tests: provider-id extraction). All pass; full @carbon/auth suite still green (36 tests). Note: ERP has no package.json `test` script — invoke `pnpm --filter erp exec vitest run <pattern>`. DB-backed transactional test skipped (no Kysely test harness exists; per plan, not built).
+- [x] Task 14 (automated gates): typecheck green across @carbon/env, @carbon/auth, @carbon/jobs, erp, mes; biome clean on all SSO files; unit tests pass. **Kong fix discovered during verification**: GoTrue self-declares entityID/ACS WITHOUT /auth/v1 (from API_EXTERNAL_URL) and validates assertion Destination against it — added `auth-v1-sso` service to kong.yml routing `/sso/` → gotrue (fixes dev AND prod, same bind-mounted file); settings screen now displays the canonical un-prefixed URLs. Verified live: `/sso/saml/metadata` returns 200 with real SP metadata. Browser walkthrough vs a mock IdP: pending user go-ahead.
+- Gotcha (dev ops): `crbn reload` passes only `--env-file .env.local` to compose — root `.env` vars referenced by docker-compose (SAML_ENABLED, SAML_PRIVATE_KEY) must be exported in the shell when reloading gotrue, or it comes back with SAML off. `crbn up` (run by the user normally) loads them fine.
+
+## Dependencies
+- Task 2 needs Task 1. Tasks 4–6 need Task 2 (generated types) and Task 3.
+- Task 7 needs Tasks 4, 5, 6. Task 8 needs Tasks 3, 5. Task 9 needs Tasks 4, 5.
+- Task 10 needs Task 7. Task 11 needs Task 5. Task 12 independent (can run anytime).
+- Task 13 needs Tasks 6, 7. Task 14 last.
+- Independent groups after Task 3: {4}, {5}, {12} may run in parallel; then {6}, {8 (api route part)}.
+
+## Design refinements forced by the schema sweep (surfaced for user review)
+
+> **SUPERSEDED** — see the spec changelog (`.ai/specs/2026-08-21-enterprise-saml-sso.md`): SSO is now self-hosted-only and existing active accounts are LINKED (never archived), so the multi-company block, archival, and reassignment machinery below were deleted.
+
+1. **`user.email` UNIQUE index** (`index_user_email_key`, `20230123004116_users-and-companies.sql:16`) + `create_public_user()` conflicting only on `(id)` means a duplicate-email SSO signup crashes the trigger inside GoTrue's own transaction — the SAML login would fail opaquely before Carbon code runs. Fix: the trigger skips the `public."user"` insert when the email belongs to a DIFFERENT id (no mutation of the old row — a rogue IdP must not be able to touch it). The callback migration transaction then owns creating the new row after domain+invite verification.
+2. **Multi-company old accounts are BLOCKED from SSO migration in v1.** If the same-email old user has `userToCompany` rows in companies other than the SSO company, archiving their email/account would break their other-company logins. The callback rejects with a clear flash ("this account belongs to multiple companies — contact support"). Single-company accounts (the normal case) migrate automatically. This is a documented v1 limitation, echoed in the spec changelog.
+3. **Old-account archival**: within the migration transaction the old `public."user"` row gets `active = false` and its email rewritten to `sso-archived+{oldId}+{originalEmail}` (frees the unique index; the `employees` view already filters `u.active = TRUE` so the mangled email is never displayed). Post-commit, the old `auth.users` account is deleted via the admin API (revokes its sessions; auth-level email freed). `fullName` is untouched, so audit references still render the person's name.
+4. **Reassignment column list** (mutable, forward-looking, company-scoped — from the FK sweep):
+ - `assignee` on: `changeOrder`, `changeOrderActionTask`, `customer`, `item`, `job`, `jobOperation`, `maintenanceDispatch`, `nonConformance`, `nonConformanceActionTask`, `nonConformanceApprovalTask`, `nonConformanceInvestigationTask`, `nonConformanceReviewer`, `part`, `pickingList`, `procedure`, `purchaseInvoice`, `purchaseOrder`, `purchasingRfq`, `qualityDocument`, `quote`, `receipt`, `riskRegister`, `salesOrder`, `salesOrderShipment`, `salesRfq`, `service`, `shipment`, `stockTransfer`, `supplier`, `supplierQuote`, `training`
+ - `quote.salesPersonId`, `quote.estimatorId`, `quoteLine.estimatorId`, `salesRfq.salesPersonId`, `salesOrder.salesPersonId`, `approvalRequest.approverId`, `employeeJob.managerId`, `costCenter.ownerId`, `purchaseOrderLine.ownerId`, `purchaseInvoiceLine.ownerId`, `supplierQuoteLine.ownerId`, `workflow.ownerId`
+ - **Excluded by policy**: all audit actors (`createdBy`, `updatedBy`, `closedBy`, `postedBy`), `workflowRun.ownerId` (historical record), `companyGroup.ownerId` (group-scoped, not company-scoped).
+
+---
+
+## Task 1: Migration — `ssoConnection` table + crash-free `create_public_user`
+
+**Depends on:** none
+**Files:**
+- Create: `packages/database/supabase/migrations/<timestamp>_sso-connection.sql` (via `pnpm db:migrate:new sso-connection`; verify HHMMSS ≠ `000000` and timestamp is newer than the newest existing migration)
+- Copy from (precedent): `packages/database/supabase/migrations/20260810100100_workflows-foundation.sql` (table + RLS block), `20260319000000_console-mode.sql` (trigger body being replaced)
+
+**Steps:**
+1. `pnpm db:migrate:new sso-connection`
+2. Write exactly:
+
+```sql
+CREATE TABLE IF NOT EXISTS "ssoConnection" (
+ "id" TEXT NOT NULL DEFAULT id('sso'),
+ "companyId" TEXT NOT NULL,
+ "providerId" TEXT NOT NULL,
+ "domains" TEXT[] NOT NULL,
+ "metadataUrl" TEXT,
+ "metadataXml" TEXT,
+ "active" BOOLEAN NOT NULL DEFAULT TRUE,
+ "createdBy" TEXT NOT NULL REFERENCES "user"("id"),
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ "updatedBy" TEXT REFERENCES "user"("id"),
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+ PRIMARY KEY ("id", "companyId"),
+ FOREIGN KEY ("companyId") REFERENCES "company"("id") ON DELETE CASCADE,
+ CONSTRAINT "ssoConnection_providerId_key" UNIQUE ("providerId"),
+ CONSTRAINT "ssoConnection_metadata_check" CHECK (num_nonnulls("metadataUrl", "metadataXml") = 1)
+);
+
+CREATE INDEX IF NOT EXISTS "ssoConnection_companyId_idx" ON "ssoConnection" ("companyId");
+CREATE INDEX IF NOT EXISTS "ssoConnection_createdBy_idx" ON "ssoConnection" ("createdBy");
+CREATE INDEX IF NOT EXISTS "ssoConnection_updatedBy_idx" ON "ssoConnection" ("updatedBy");
+CREATE INDEX IF NOT EXISTS "ssoConnection_domains_idx" ON "ssoConnection" USING GIN ("domains");
+
+ALTER TABLE "ssoConnection" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "SELECT" ON "public"."ssoConnection"
+FOR SELECT USING (
+ "companyId" = ANY ((SELECT get_companies_with_employee_role())::text[])
+);
+CREATE POLICY "INSERT" ON "public"."ssoConnection"
+FOR INSERT WITH CHECK (
+ "companyId" = ANY ((SELECT get_companies_with_employee_permission('settings_update'))::text[])
+);
+CREATE POLICY "UPDATE" ON "public"."ssoConnection"
+FOR UPDATE USING (
+ "companyId" = ANY ((SELECT get_companies_with_employee_permission('settings_update'))::text[])
+);
+CREATE POLICY "DELETE" ON "public"."ssoConnection"
+FOR DELETE USING (
+ "companyId" = ANY ((SELECT get_companies_with_employee_permission('settings_update'))::text[])
+);
+
+-- Crash-free public-user creation: an SSO signup whose email already belongs to a
+-- DIFFERENT public."user" row must not violate index_user_email_key inside GoTrue's
+-- transaction. The row is skipped here; the SSO callback's migration transaction owns
+-- creating it after domain + invite verification. The existing row is never mutated
+-- from this trigger (a rogue IdP must not be able to touch it).
+CREATE OR REPLACE FUNCTION public.create_public_user()
+RETURNS TRIGGER AS $$
+DECLARE
+ full_name TEXT;
+ name_parts TEXT[];
+ email_owner TEXT;
+BEGIN
+ SELECT "id" INTO email_owner FROM public."user" WHERE "email" = NEW.email;
+ IF email_owner IS NOT NULL AND email_owner <> NEW.id::text THEN
+ INSERT INTO public."userPermission" ("id") VALUES (NEW.id) ON CONFLICT DO NOTHING;
+ RETURN NEW;
+ END IF;
+
+ full_name := NEW.raw_user_meta_data->>'name';
+ IF full_name IS NOT NULL THEN
+ name_parts := regexp_split_to_array(full_name, '\s+');
+ INSERT INTO public."user" ("id","email","active","firstName","lastName","about")
+ VALUES (NEW.id, NEW.email, true,
+ COALESCE(name_parts[1], ''),
+ COALESCE(array_to_string(name_parts[2:], ' '), ''), '')
+ ON CONFLICT (id) DO UPDATE SET email = EXCLUDED.email;
+ ELSE
+ INSERT INTO public."user" ("id","email","active","firstName","lastName","about")
+ VALUES (NEW.id, NEW.email, true, '', '', '')
+ ON CONFLICT (id) DO UPDATE SET email = EXCLUDED.email;
+ END IF;
+ INSERT INTO public."userPermission" ("id") VALUES (NEW.id) ON CONFLICT DO NOTHING;
+ RETURN NEW;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
+```
+
+3. Keep the rest of the trigger definition identical to `20260319000000_console-mode.sql` (do not re-create the trigger itself — `CREATE OR REPLACE FUNCTION` suffices; the `on_auth_user_created` trigger already points at this function). If the console-mode migration's function body has drifted from what is shown above (compare before writing), STOP and report — do not merge blindly.
+
+**Verify:**
+```bash
+grep -c "CREATE POLICY" packages/database/supabase/migrations/*_sso-connection.sql
+# Expected: 4
+```
+
+**Out of scope:** No `companySettings` columns; no seed data; no RPCs (so no PostgREST reload concern).
+
+## Task 2: Apply migration + regenerate types
+
+**Depends on:** Task 1
+**Files:**
+- Modify: `packages/database/src/types.ts` — regenerated, never hand-edited
+
+**Steps:**
+1. `pnpm db:migrate` (applies pending migrations to the worktree's local DB and regenerates types + swagger). If the local DB at `127.0.0.1:$PORT_DB` is unreachable, STOP and report — do not attempt `db:build` (does not exist) and never rebuild the DB.
+
+**Verify:**
+```bash
+grep -n "ssoConnection" packages/database/src/types.ts | head -3
+# Expected: ssoConnection table types present (Row/Insert/Update entries)
+```
+
+**Out of scope:** any manual edit to `types.ts`.
+
+## Task 3: Add `"sso"` auth provider to env
+
+**Depends on:** none
+**Files:**
+- Modify: `packages/env/src/index.ts` — `AuthProvider` union (L116) gains `"sso"`; no change to the `AUTH_PROVIDERS` default string
+
+**Steps:**
+1. Change `export type AuthProvider = "email" | "google" | "azure" | "passkey";` to include `| "sso"`.
+2. Do NOT add `"sso"` to the default `"email,google,azure"` — it is opt-in via env.
+
+**Verify:**
+```bash
+pnpm exec turbo run typecheck --filter=@carbon/env
+# Expected: exit 0
+```
+
+**Out of scope:** browser-exposed env keys (`getBrowserEnv`) — `AUTH_PROVIDERS` is already exposed.
+
+## Task 4: `@carbon/auth/sso.server` — GoTrue admin wrappers + session helper
+
+**Depends on:** Tasks 2, 3
+**Files:**
+- Create: `packages/auth/src/services/sso.server.ts`
+- Modify: `packages/auth/package.json` — add `"./sso.server"` export subpath (mirror the existing `"./mfa.server"` entry exactly, including types/import/require shape)
+- Copy from (precedent): `packages/auth/src/services/mfa.server.ts` (server-only service file shape), `packages/auth/src/lib/supabase/client.server.ts` (env constant imports)
+
+**Steps:**
+1. Implement, using `SUPABASE_URL` + `SUPABASE_SERVICE_ROLE_KEY` from `@carbon/env` and plain `fetch` against GoTrue admin REST (`${SUPABASE_URL}/auth/v1/admin/sso/providers`), headers `{ apikey: SUPABASE_SERVICE_ROLE_KEY, Authorization: "Bearer " + SUPABASE_SERVICE_ROLE_KEY, "Content-Type": "application/json" }`. All functions return `{ data, error }`, never throw:
+ - `createGoTrueSsoProvider(args: { metadataUrl?: string; metadataXml?: string; domains: string[] })` → POST body `{ type: "saml", metadata_url?, metadata_xml?, domains }`; returns `{ data: { id: string }, error: null }` from the response's provider `id`.
+ - `updateGoTrueSsoProvider(providerId: string, args: same)` → PUT `/admin/sso/providers/{id}`.
+ - `deleteGoTrueSsoProvider(providerId: string)` → DELETE `/admin/sso/providers/{id}`.
+ - `getGoTrueSsoProvider(providerId: string)` → GET `/admin/sso/providers/{id}`.
+ - Non-2xx → `{ data: null, error: <message from body or statusText> }`.
+2. `getSsoProviderIdFromUser(user: User): string | null` — read the SSO provider id from the Supabase user object. In GoTrue v2.x SAML users carry an identity with `provider` = `"sso:<providerId>"` in `user.identities`, and `user.app_metadata.provider` similarly prefixed. Implement: scan `user.identities ?? []` for a `provider` starting with `"sso:"`, return the suffix; fall back to `user.app_metadata?.provider?.startsWith("sso:")`. **If a locally-run SAML login (Task 14) shows neither location carries the provider id, STOP and report the actual user JSON — do not guess a third location.**
+
+**Verify:**
+```bash
+pnpm exec turbo run typecheck --filter=@carbon/auth
+# Expected: exit 0
+```
+
+**Out of scope:** no calls from client code (server-only file); no retry/backoff logic.
+
+## Task 5: SSO connection validator + service functions (settings module)
+
+**Depends on:** Tasks 2, 4
+**Files:**
+- Modify: `apps/erp/app/modules/settings/settings.models.ts` — add `ssoConnectionValidator`
+- Modify: `apps/erp/app/modules/settings/settings.server.ts` (create this file if it does not exist; check `apps/erp/app/modules/settings/` first and follow the module's existing server-file pattern if present)
+- Modify: `apps/erp/app/modules/settings/index.ts` — barrel export if the module barrels server files (check first; if server files are not barreled, import routes directly from the file, matching how other `x+/settings+` routes import server helpers)
+- Copy from (precedent): `apps/erp/app/modules/settings/settings.models.ts` `apiKeyValidator` (L55) for validator shape; `apps/erp/app/modules/settings/settings.service.ts` for `{ data, error }` service shape
+
+**Steps:**
+1. `ssoConnectionValidator` (zod, used with `validator(...)` from `@carbon/form`):
+ - `metadataUrl`: `zfd.text(z.string().url().optional())`
+ - `metadataXml`: `zfd.text(z.string().optional())`
+ - `domains`: `zfd.text(z.string().min(1))` — comma-separated in the form; `.transform` split/trim/lowercase; `.refine` every entry matches `/^[a-z0-9.-]+\.[a-z]{2,}$/` and contains no `@`
+ - `.refine` exactly one of `metadataUrl`/`metadataXml` present.
+2. Service functions in `settings.server.ts` (service-role client first arg, return `{ data, error }`):
+ - `getSsoConnection(client, companyId)` — `client.from("ssoConnection").select("*").eq("companyId", companyId).eq("active", true).maybeSingle()`
+ - `getSsoConnectionByDomain(serviceRole, domain)` — `.contains("domains", [domain.toLowerCase()]).eq("active", true).maybeSingle()`
+ - `getSsoConnectionByProviderId(serviceRole, providerId)` — `.eq("providerId", providerId).eq("active", true).maybeSingle()`
+ - `upsertSsoConnection(serviceRole, { companyId, metadataUrl, metadataXml, domains, userId })`:
+ a. For each domain call `getSsoConnectionByDomain`; if a hit belongs to a DIFFERENT company → return `{ data: null, error: "Domain <d> is already registered to another company" }`.
+ b. Load existing connection for the company. If exists → `updateGoTrueSsoProvider(providerId, ...)` then update the row (`domains`, `metadataUrl`, `metadataXml`, `updatedBy: userId`, `updatedAt: now ISO`). If not → `createGoTrueSsoProvider(...)`, then insert the row (`companyId`, `providerId`, `domains`, `metadataUrl`, `metadataXml`, `createdBy: userId`); **on insert failure call `deleteGoTrueSsoProvider(providerId)` before returning the error** (compensating action — GoTrue is outside the DB transaction).
+ - `deactivateSsoConnection(serviceRole, { companyId, userId })` — load connection; `deleteGoTrueSsoProvider(providerId)`; update row `active: false, updatedBy, updatedAt`.
+3. Add the same `getSsoConnectionByDomain` to MES: `apps/mes/app/services/sso.service.ts` (MES layout keeps services flat; same function body).
+
+**Verify:**
+```bash
+pnpm exec turbo run typecheck --filter=erp --filter=mes
+# Expected: exit 0
+```
+
+**Out of scope:** no UI here; no callback logic; no Kysely (single-row writes).
+
+## Task 6: `reassignUserReferences` + `migrateUserToSso` transaction (users module)
+
+**Depends on:** Tasks 2, 5
+**Files:**
+- Create: `apps/erp/app/modules/users/users.sso.server.ts`
+- Copy from (precedent): grep `transaction().execute(` under `apps/erp/app` and follow the existing Kysely-transaction import pattern from the first service hit (e.g. how the module obtains the Kysely client). **If no ERP service uses a Kysely transaction, STOP and report** — do not invent a new DB client path.
+
+**Steps:**
+1. `REASSIGNABLE_USER_COLUMNS: { table: string; column: string }[]` — exactly the list in "Design refinements" §4 above (31 `assignee` tables + the 12 named columns). Include a comment block stating the inclusion contract: mutable forward-looking user references, company-scoped tables only; audit actors (`createdBy`/`updatedBy`/`closedBy`/`postedBy`), `workflowRun.ownerId`, `companyGroup.ownerId` are excluded by policy; new assignee-type columns must be added here.
+2. `reassignUserReferences(trx, { companyId, fromUserId, toUserId })` — for each entry: `UPDATE <table> SET <column> = toUserId WHERE <column> = fromUserId AND "companyId" = companyId`, via Kysely `trx.updateTable(...)`. Return per-table update counts for logging.
+3. `migrateUserToSso(serviceRole, { newUserId, email, companyId, invite })` — orchestrates:
+ a. Pre-checks OUTSIDE the transaction: load old user by email (`public."user"` where `email = <email> AND id <> newUserId AND active = true`, `.maybeSingle()`). If found, load its `userToCompany` rows; if any row has `companyId <> <companyId>` → return `{ data: null, error: "multi-company" }` (v1 limitation — caller flashes the support message).
+ b. Kysely transaction:
+ - Insert `public."user"` row for `newUserId` if absent (the trigger skipped it when the old row held the email): if an old user exists, FIRST update the old row `email = 'sso-archived+' || <oldId> || '+' || <email>`, `active = false`; THEN insert the new row (`id: newUserId`, `email`, `active: true`, `firstName`/`lastName` copied from the old row when present, else from the invite email local part, `about: ''`) with `ON CONFLICT (id) DO NOTHING` semantics (`onConflict` in Kysely: `.onConflict((oc) => oc.column("id").doNothing())`).
+ - Accept the invite for `newUserId` — replicate `acceptInvite` internals transactionally (do NOT call `acceptInvite`, which uses supabase-client writes): `UPDATE "employee" SET "active" = true WHERE "id" = newUserId AND "companyId" = ...` is wrong for a NEW user — instead RE-KEY the invite-time rows (CONFIRMED via `.claude/rules/user-employee-job-relationships.md`: the invite flow pre-creates `employee` — PK `(id, companyId)`, `id → user.id` — keyed to an auth user created at invite time, i.e. the OLD id): `UPDATE "employee" SET "id" = newUserId, "active" = true WHERE "id" = oldId AND "companyId" = <companyId>` (the new `public."user"` row must be inserted FIRST for the FK), and the same re-key for `employeeJob` if rows exist (instead of deleting them — they carry title/department/manager placement worth keeping). For a fresh SSO user with an invite but NO old user (possible only if the invite-time auth account was already deleted), insert the `employee` row following `createEmployeeAccount` (apps/erp/app/modules/users/users.server.ts:376). Insert `userToCompany` (`userId: newUserId, companyId, role: invite.role`), merge `invite.permissions` into `userPermission` for `newUserId` (follow `setUserPermissions` semantics from `apps/erp/app/modules/users/users.server.ts`), and set `invite.acceptedAt = now()` guarded by `acceptedAt IS NULL` (row-lock via `FOR UPDATE` select first to make concurrent accepts idempotent).
+ - If old user existed: `reassignUserReferences(trx, { companyId, fromUserId: oldId, toUserId: newUserId })`; delete old `userToCompany` row for this company; `UPDATE "employee" SET "active" = false WHERE "id" = oldId AND "companyId" = companyId`; delete old `employeeJob` rows (id + companyId); remove old group `membership` rows (mirror `deactivateEmployee` in `packages/auth/src/services/users.server.ts:199-295`).
+ c. Post-commit (idempotent, failure-tolerant — log, don't throw): `redis.del(getPermissionCacheKey(oldId))` and `redis.del(getPermissionCacheKey(newUserId))`; delete the old auth user via `serviceRole.auth.admin.deleteUser(oldId)` (revokes its sessions and frees the auth-level email).
+4. Export from the module barrel only if other `.server.ts` files are barreled (check `apps/erp/app/modules/users/index.ts`).
+
+**Verify:**
+```bash
+pnpm exec turbo run typecheck --filter=erp
+# Expected: exit 0
+```
+
+**Out of scope:** callback wiring (Task 7); no changes to `acceptInvite` itself; no reassignment of audit columns under any circumstance.
+
+> *(Superseded: this whole reassignment/deactivation design was later replaced by link-instead-of-archive; `reassignUserReferences` and `REASSIGNABLE_USER_COLUMNS` no longer exist. See the spec Changelog.)*
+
+## Task 7: Callback SSO branch (ERP + MES)
+
+**Depends on:** Tasks 4, 5, 6
+**Files:**
+- Modify: `apps/erp/app/routes/_public+/callback.tsx` — SSO branch in the action (before the existing company-resolution logic, after `refreshAccessToken`)
+- Modify: `apps/mes/app/routes/_public+/callback.tsx` — same branch; MES has no invite-accept flow, so on the invite path redirect to the ERP URL (`getAppUrl()`) with a flash instead of running the migration (SSO users onboard via ERP once, then use MES normally)
+- Copy from (precedent): the existing action structure in each file (service-role usage, `destroyAuthSession`, flash + redirect patterns)
+
+**Steps (ERP):**
+1. After the session is obtained, get the Supabase user for the token (the action already has `userId` + service role; fetch the auth user via `serviceRole.auth.admin.getUserById(userId)`), then `providerId = getSsoProviderIdFromUser(user)`. If null → existing non-SSO path unchanged (byte-identical behavior).
+2. SSO path:
+ a. `getSsoConnectionByProviderId(serviceRole, providerId)`. Miss/inactive → `destroyAuthSession` with flash "SSO connection is not active. Contact your administrator."
+ b. Domain check: `email.split("@")[1].toLowerCase()` ∈ `connection.domains`, else → cleanup + reject (step d's cleanup).
+ c. Membership check: `userToCompany` row for (userId, connection.companyId)? → proceed to the normal session-minting path, but scope company resolution to `connection.companyId` (set the company cookie to it).
+ d. No membership: load pending invite (`invite` where `email` = user email AND `companyId` = connection.companyId AND `acceptedAt IS NULL` AND `revokedAt IS NULL`). No invite → delete the orphan auth user IF it has zero `userToCompany` rows (`serviceRole.auth.admin.deleteUser(userId)`), `destroyAuthSession`, flash "SSO sign-in succeeded but no invite exists for {email}. Contact your administrator." With invite → `migrateUserToSso(...)`. On `error === "multi-company"` → flash "This account belongs to multiple companies and cannot be migrated automatically. Contact support." (do NOT delete the auth user in this case). On success → proceed to session minting with `companyId = connection.companyId`.
+3. Session minting for the SSO path sets `mfaVerified: true` in the `AuthSession` unless `CONTROLLED_ENVIRONMENT` is true (import both from `@carbon/auth`; the TOTP park-and-challenge check is skipped on this branch when not controlled).
+
+**Verify:**
+```bash
+pnpm exec turbo run typecheck --filter=erp --filter=mes
+# Expected: exit 0
+```
+
+**Out of scope:** magic-link/OAuth/passkey callback behavior — every non-SSO session must take the exact existing code path; no changes to the callback's default-export component.
+
+## Task 8: Login "Continue with SSO" (ERP + MES) + public domain-check API route
+
+**Depends on:** Tasks 3, 5
+**Files:**
+- Create: `apps/erp/app/routes/api+/sso.check.ts`
+- Modify: `apps/erp/app/routes/_public+/login.tsx` — loader boolean + button + handler
+- Modify: `apps/mes/app/routes/_public+/login.tsx` — same
+- Copy from (precedent): `apps/erp/app/routes/_public+/login.tsx:94-110` (IP rate limiting with `Ratelimit` from `@carbon/kv`), L388-417 (`onSignInWithGoogle`/`onSignInWithAzure` handler shape), L493-533 (gated button rendering)
+
+**Steps:**
+1. `api+/sso.check.ts` — public action (no `requirePermissions`): `assertIsPost`; IP rate limit `Ratelimit.slidingWindow(20, "1 h")` keyed `sso-check:{ip}`; body `{ email }`; extract domain; `getSsoConnectionByDomain(getCarbonServiceRole(), domain)`; return `data({ enabled: Boolean(connection) })` — boolean only, no connection details.
+2. ERP login loader: `const hasSsoAuth = isAuthProviderEnabled("sso") && CarbonEdition === Edition.Enterprise;` (both already imported or importable from `@carbon/auth`). Return it with the existing booleans.
+3. Button (rendered with the other provider buttons, same `Button` component + separator handling): label "Continue with SSO". Handler `onSignInWithSSO`: require the email field to be non-empty (inline form error "Enter your email first" if empty); POST to `path.to.api.ssoCheck` (add the path key — Task 9 step 4 covers `path.to`; add `ssoCheck` under the api section here if Task 9 hasn't run: `ssoCheck: \`${api}/sso/check\``); if `{ enabled: false }` → inline error "SSO is not configured for your email domain."; else `const { data, error } = await carbonClient.auth.signInWithSSO({ domain, options: { redirectTo: \`${window.location.origin}/callback\` } })` and on success `window.location.href = data.url`.
+4. MES login: same loader boolean + button; the check endpoint is the ERP one — MES calls its own copy: create `apps/mes/app/routes/api+/sso.check.ts` with the same body using the MES service from Task 5 step 3 (MES routes/services are separate apps; do not cross-import ERP modules).
+
+**Verify:**
+```bash
+pnpm exec turbo run typecheck --filter=erp --filter=mes
+# Expected: exit 0
+```
+
+**Out of scope:** academy/starter login pages; no domain enumeration beyond the boolean; existing provider buttons untouched.
+
+## Task 9: Settings → SSO screen + nav + paths
+
+**Depends on:** Tasks 4, 5
+**Files:**
+- Create: `apps/erp/app/routes/x+/settings+/sso.tsx`
+- Modify: `apps/erp/app/utils/path.ts` — add `sso: \`${x}/settings/sso\`` beside `security` (L1967) and `api.ssoCheck` if not added in Task 8
+- Modify: `apps/erp/app/modules/settings/ui/useSettingsSubmodules.tsx` — add the entry to the System group next to Security (L200-205)
+- Copy from (precedent): `apps/erp/app/routes/x+/settings+/sequences.$tableId.tsx` (loader/action/validator/flash/redirect shape), `apps/erp/app/routes/x+/settings+/accounting.tsx` (ValidatedForm layout with Card sections), `apps/erp/app/routes/x+/settings+/security.tsx` (permission pattern + CONTROLLED_ENVIRONMENT read)
+
+**Steps:**
+1. Loader: `requirePermissions(request, { view: "settings", role: "employee" })`; if `CarbonEdition !== Edition.Enterprise` → `throw redirect(path.to.settings)` (spec: route hidden outside Enterprise). Return `getSsoConnection(client, companyId)` plus the SP URLs: `acsUrl: \`${SUPABASE_URL}/auth/v1/sso/saml/acs\``, `metadataUrl: \`${SUPABASE_URL}/auth/v1/sso/saml/metadata\`` (import `SUPABASE_URL` from `@carbon/auth`).
+2. Action: `assertIsPost`; `requirePermissions(request, { update: "settings" })`; branch on a `intent` form field:
+ - `intent === "upsert"` → `validator(ssoConnectionValidator).validate(formData)` → `validationError` on error → `upsertSsoConnection(getCarbonServiceRole(), { ...parsed, companyId, userId })` → error: `data({}, await flash(request, error(...)))`; success: `throw redirect(path.to.sso, await flash(request, success("SSO connection saved")))`.
+ - `intent === "deactivate"` → `deactivateSsoConnection(...)` with the same flash/redirect pattern.
+3. Component: Card "Service provider details" with the two read-only URLs and copy buttons (grep `packages/react/src/` for an existing copy-button component — use `Copy` from `@carbon/react` if present; if no copy component exists, render the URLs in `<Input isReadOnly>` fields without a copy button — do not build a new component); Card "Identity provider" with the `ValidatedForm` (fields: `Input` name `metadataUrl`, `TextArea` name `metadataXml`, `Input` name `domains` comma-separated with helper text, `Submit`); when a connection exists show registered domains + active state + a deactivate button inside a confirm `Modal` (precedent: any settings delete modal, e.g. `api-keys.delete.$id.tsx`).
+4. Nav entry in `useSettingsSubmodules.tsx` System group: `{ name: t\`Single Sign-On\`, to: path.to.sso, role: "employee", icon: <LuKeyRound /> }` (import `LuKeyRound` from `react-icons/lu`). Nav has no per-edition flag — the route's loader redirect handles non-Enterprise access; ALSO hide the entry by adding it to the component's existing gating only if an edition gate exists in `isRouteVisible` — it does not, so instead conditionally include the route object using `useFlags().isEnterprise` (hook at `apps/erp/app/hooks/useFlags.tsx:15`) inside the `useSettingsSubmodules` body.
+5. *(Superseded: this card shipped, was renamed "Covered Users", and was later removed entirely.)* The "Users to re-invite" migration-aid list from the spec: render a third Card listing active company users whose email domain ∈ `domains` (loader: query `employees` view via existing people/employees service — grep `getEmployees` in `apps/erp/app/modules/people` or `users` and reuse; select email + name only) with a note "These users will be migrated on their first SSO sign-in. Re-invite them to enable SSO access." and a Link to the existing employees page (`path.to.employeeAccounts` or equivalent — confirm the key exists in path.ts; bulk re-invite itself is the existing resend-invite flow, not rebuilt here).
+
+**Verify:**
+```bash
+pnpm exec turbo run typecheck --filter=erp
+# Expected: exit 0
+```
+
+**Out of scope:** no new bulk-invite machinery; no MES settings surface; no i18n catalog fill (handled by /translate at commit time).
+
+## Task 10: MFA exemption for SSO sessions
+
+**Depends on:** Task 7
+**Files:**
+- Modify: `apps/erp/app/routes/x+/_layout.tsx` + `apps/mes/app/routes/x+/_layout.tsx` — the `MfaEnrollmentRequired` blocking-screen condition
+- Copy from (precedent): the existing `requireMfa` gate logic in those loaders (grep `MfaEnrollmentRequired` for exact locations)
+
+**Steps:**
+1. Task 7 already mints SSO sessions with `mfaVerified: true` (non-controlled), which satisfies `requireAuthSession`'s re-check — no session.server.ts change needed. Verify this by reading `requireAuthSession`'s MFA bounce condition in `packages/auth/src/services/session.server.ts`; if it re-derives from `userHasVerifiedTotpFactor` REGARDLESS of `mfaVerified`, STOP and report.
+2. *(Superseded: the `!CONTROLLED_ENVIRONMENT` condition below was later removed — SSO sessions are exempt in every environment.)* The `requireMfa` company-enforcement blocking screen: where the shell loader computes the gate (grep `requireMfa` in both `_layout.tsx` files), exempt sessions whose auth user is SSO-sourced when `!CONTROLLED_ENVIRONMENT`: the loader has the auth session — carry an `isSso` boolean on the `AuthSession` (add optional field `ssoProviderId?: string` to the `AuthSession` type in `packages/auth/src/types.ts` or wherever `AuthSession` is defined — grep `mfaVerified` in `packages/auth/src` to find it — set in Task 7's minting, preserved by `refreshAuthSession` exactly like `mfaVerified` — grep `mfaVerified` in `session.server.ts` and mirror every propagation site). Gate becomes: `requireMfa && !mfaVerified-satisfying-enrollment && !(authSession.ssoProviderId && !CONTROLLED_ENVIRONMENT)`.
+
+**Verify:**
+```bash
+pnpm exec turbo run typecheck --filter=@carbon/auth --filter=erp --filter=mes
+# Expected: exit 0
+```
+
+**Out of scope:** TOTP enrollment UI; `/mfa` routes; API-key/OAuth machine paths (never challenged today).
+
+## Task 11: SSO-aware invite emails
+
+**Depends on:** Task 5
+**Files:**
+- Modify: `apps/erp/app/routes/x+/users+/employees.new.tsx` (invite email block L124-144), `customers.new.tsx` (L89-95), `suppliers.new.tsx` (L89-95), `resend-invite.tsx` (L72-121)
+- Modify: `packages/jobs/src/inngest/functions/tasks/user-admin.ts` (bulk resend, L100-114)
+- Copy from (precedent): the existing `sendEmail(... InviteEmail({ inviteLink }))` blocks in those files
+
+**Steps:**
+1. Add a tiny helper in the ERP users module (`apps/erp/app/modules/users/users.server.ts`): `getInviteLink(serviceRole, email, code): Promise<string>` — if `getSsoConnectionByDomain` (import from the settings server file) hits an active connection for the email's domain, return `${getAppUrl()}/login?email=${encodeURIComponent(email)}` (login page prefill; the SSO callback consumes the pending invite — the code is not needed in the URL); else return the existing `${getAppUrl()}/invite/${code}`.
+2. Replace the hardcoded `inviteLink` in the three route actions and `resend-invite.tsx` with the helper.
+3. `user-admin.ts` (jobs package cannot import ERP modules): inline the same two-step lookup there using its existing service-role client — query `ssoConnection` `.contains("domains", [domain]).eq("active", true).maybeSingle()` directly, then pick the URL. Keep the existing link as the fallback.
+4. Login page: read `?email=` from the URL and prefill the email field if not already supported (check `login.tsx` for an existing `redirectTo`/searchParams pattern; if prefill via `?email=` doesn't exist, add `defaultValue` from `searchParams.get("email")`).
+
+**Verify:**
+```bash
+pnpm exec turbo run typecheck --filter=erp --filter=@carbon/jobs
+# Expected: exit 0
+```
+
+**Out of scope:** `invite.$code.tsx` route behavior (still works for already-authenticated SSO users); InviteEmail template content.
+
+## Task 12: GoTrue SAML config (dev + prod compose, .env.example)
+
+**Depends on:** none
+**Files:**
+- Modify: `packages/dev/docker/docker-compose.dev.yml` — GoTrue service env (L79-113 region)
+- Modify: `contrib/deploying/simple-docker-caddy/docker-compose.prod.yml` — GoTrue service env (L252-292 region)
+- Modify: `.env.example` and `contrib/deploying/simple-docker-caddy/.env.example` — document the new vars
+
+**Steps:**
+1. Both compose files, in the GoTrue service `environment` block:
+ ```yaml
+ GOTRUE_SAML_ENABLED: ${SAML_ENABLED:-false}
+ GOTRUE_SAML_PRIVATE_KEY: ${SAML_PRIVATE_KEY:-}
+ ```
+2. `.env.example` entries:
+ ```bash
+ # Enterprise SAML SSO (Enterprise edition). Generate the key with:
+ # openssl genpkey -algorithm RSA -out /tmp/pk.pem -quiet && \
+ # openssl pkey -in /tmp/pk.pem -out /tmp/pk.der -outform DER -traditional && \
+ # base64 -i /tmp/pk.der # (-w 0 on Linux)
+ # The key MUST be base64-encoded PKCS#1 DER (the -traditional flag), min 2048-bit.
+ SAML_ENABLED=false
+ SAML_PRIVATE_KEY=
+ ```
+3. Check how the dev proxy / prod Caddy route `/auth/v1/*`: grep the Caddyfile in `contrib/deploying/simple-docker-caddy/` and the dev proxy config in `packages/dev/` for auth routing. If `/auth/v1/` is already proxied wholesale to GoTrue with no per-path auth plugin, no change is needed (note this in the task's completion evidence). If SSO paths are excluded or an auth gate exists on them, add explicit pass-through for `/auth/v1/sso/saml/acs` and `/auth/v1/sso/saml/metadata`. If the routing cannot be determined from the files, STOP and report what was found.
+
+**Verify:**
+```bash
+grep -n "GOTRUE_SAML" packages/dev/docker/docker-compose.dev.yml contrib/deploying/simple-docker-caddy/docker-compose.prod.yml
+# Expected: 2 lines per file (ENABLED + PRIVATE_KEY)
+```
+
+**Out of scope:** `config.toml` (local runtime is docker-compose; hosted parity is a doc comment only if a natural place exists); no MockSAML container in this task (Task 14 decides if needed).
+
+## Task 13: Unit tests — migration transaction, domain enforcement, trigger behavior
+
+**Depends on:** Tasks 6, 7
+**Files:**
+- Create: `apps/erp/app/modules/users/users.sso.server.test.ts` (vitest; follow the existing test setup — grep `*.test.ts` under `apps/erp/app` for the closest service-test precedent and mirror its mocking approach; if ERP has no service-level test precedent and tests live only in packages, put the pure-logic tests in `packages/auth` instead and note it)
+
+**Steps:**
+1. Test the pure decision logic (extract as pure functions in Task 6/7 code where needed so they are testable without a DB):
+ - domain-enforcement: provider→connection mismatch rejected; email domain not in `domains` rejected; case-insensitivity.
+ - multi-company detection: old user with membership in another company → `"multi-company"` error.
+ - `REASSIGNABLE_USER_COLUMNS` contains no audit columns: assert none of `createdBy`, `updatedBy`, `closedBy`, `postedBy`, and not `workflowRun`/`companyGroup` tables.
+ - archived-email format is deterministic and preserves the original email as a suffix.
+2. If the codebase has a DB-backed test harness for Kysely (grep `harness` package usage in tests), add one transactional test: forced failure mid-transaction leaves invite unaccepted and old user untouched. If no such harness exists, skip DB-backed tests and note it — do not build a test DB harness in this task.
+
+**Verify:**
+```bash
+pnpm --filter erp test -- users.sso
+# Expected: all new tests pass (adjust the filter invocation to the app's vitest config if `--` filtering differs; expected output contains "passed")
+```
+
+**Out of scope:** e2e/browser tests (Task 14); testing GoTrue itself.
+
+## Task 14: Full gates + browser verification
+
+**Depends on:** all
+**Files:** none (verification only)
+
+**Steps:**
+1. `pnpm exec turbo run typecheck --filter=@carbon/env --filter=@carbon/auth --filter=@carbon/jobs --filter=erp --filter=mes`
+2. `pnpm run lint`
+3. `pnpm --filter erp test` (scoped to changed areas if the suite is slow)
+4. Browser verification via `/test` (with the user's permission, per repo policy): requires the dev stack with `SAML_ENABLED=true`, a generated dev key, and an IdP. Register mocksaml.com (public mock IdP, metadata at `https://mocksaml.com/api/saml/metadata`) via the new settings screen against a dev company + a test domain, then walk: settings screen save → login button → IdP → callback → invited-user attach. If mocksaml.com is unusable from the dev environment, STOP and report; adding a local MockSAML container is a follow-up decision, not improvised here.
+5. Spec bookkeeping: check acceptance criteria in the spec, add changelog entry (including the three design refinements from this plan's header), and record the v1 multi-company limitation.
+
+**Verify:**
+```bash
+pnpm exec turbo run typecheck --filter=erp --filter=mes
+# Expected: exit 0 (final green)
+```
+
+**Out of scope:** committing — commits happen only via /check-and-commit on the user's explicit ask; moving the spec to implemented/ (needs deployment evidence).
diff --git a/.ai/plans/2026-08-27-sso-domain-verification.md b/.ai/plans/2026-08-27-sso-domain-verification.md
new file mode 100644
index 0000000000..33a1cf5b72
--- /dev/null
+++ b/.ai/plans/2026-08-27-sso-domain-verification.md
@@ -0,0 +1,64 @@
+# Implementation Plan: SSO Domain Verification (DNS TXT)
+
+Spec: `.ai/specs/2026-08-27-sso-domain-verification.md`
+Branch: `sso-implementation-research` (feature branch, unmerged — migration edited in place)
+
+Key design point discovered during grounding: the connection lookups
+(`getSsoConnection`, `getSsoConnectionByDomain`, `getSsoConnectionByProviderId`)
+will attach a computed `domains: string[]` (VERIFIED domains only) to their
+returned row, so every downstream consumer — ERP/MES callback `.includes`
+check, `uncoveredSsoDomainError`, `getSsoInviteDomainError` — keeps its exact
+shape and needs no change.
+
+## Tasks
+
+- [x] 1. Edit `packages/database/supabase/migrations/20260820215433_sso-connection.sql`:
+ drop `domains TEXT[]` + GIN index from `ssoConnection`; add `ssoDomain`
+ table (id('ssod'), companyId, connectionId, domain, verificationToken,
+ status pending|verified CHECK, verifiedAt, audit cols, composite PK,
+ composite FK → ssoConnection ON DELETE CASCADE, global UNIQUE(domain),
+ indexes, 4 RLS policies mirroring ssoConnection).
+ Verify: SQL reviewed; applied to dev DB via user-run delta (end of plan).
+- [x] 2. `packages/ee/src/sso/verification.server.ts` (new): token generation,
+ `getTxtRecord`, `checkDomainVerification` (pinned resolvers, discriminated
+ result, never throws). + `verification.server.test.ts` (mock `node:dns/promises`).
+ Verify: `pnpm --filter @carbon/ee test`.
+- [x] 3. Rework `packages/ee/src/sso/connections.server.ts`:
+ lookups embed `ssoDomain` and attach verified `domains`;
+ `upsertSsoConnection` drops domains handling (steal check deleted — DB
+ UNIQUE owns it); new `getSsoDomains`, `addSsoDomain`, `verifySsoDomain`,
+ `removeSsoDomain` + internal `syncGoTrueDomains`. Export via
+ `index.server.ts`. Update `sso.server.test.ts`.
+ Verify: `pnpm --filter @carbon/ee test` + typecheck.
+- [x] 4. `apps/erp/app/modules/settings/settings.models.ts`: remove `domains`
+ from `ssoConnectionValidator`; add `ssoDomainValidator` +
+ `PUBLIC_EMAIL_DOMAINS`; update `settings.models.sso.test.ts`.
+ Verify: `pnpm --filter erp test -- settings.models.sso` (or vitest path run).
+- [x] 5. `apps/erp/app/routes/x+/settings+/sso.tsx`: `addDomain` /
+ `verifyDomain` / `removeDomain` intents (reason-specific verify errors).
+- [x] 6. `apps/erp/app/routes/x+/settings+/security.tsx`: remove domains input
+ from IdP form; add Email Domains card (list + status badge + TXT
+ instructions + Verify/Remove + add form); requireSso hint when zero verified.
+- [x] 7. Callbacks + invite paths: no code change needed (shape preserved) —
+ re-read to confirm; MES same.
+- [x] 8. Docs + docs-sync: `docs/content/docs/platform/single-sign-on.mdx` +
+ agent-KB mirror; `.claude/rules/authentication-system.md` SSO section;
+ `packages/ee/AGENTS.md`; spec changelog.
+- [x] 9. Validation: regenerate types after user applies DB delta;
+ `pnpm exec turbo run typecheck --filter=@carbon/ee --filter=erp --filter=mes`;
+ `pnpm run lint`; `pnpm --filter @carbon/ee test`.
+
+## DB delta for already-applied dev DBs (user-run)
+
+```sql
+DROP INDEX IF EXISTS "ssoConnection_domains_idx";
+ALTER TABLE "ssoConnection" DROP COLUMN IF EXISTS "domains";
+-- then the ssoDomain CREATE TABLE + indexes + RLS block from the edited migration
+```
+
+## Build-time verifications
+
+- GoTrue admin API accepts `domains: []` on create (assumed from GoTrue source;
+ runtime-verified by the user's carbon.ms test). Fallback if refused: create
+ provider lazily at first verification (providerId nullable) — NOT implemented
+ unless needed.
diff --git a/.ai/plans/2026-08-28-unified-sso-login-fork.md b/.ai/plans/2026-08-28-unified-sso-login-fork.md
new file mode 100644
index 0000000000..080bdf3279
--- /dev/null
+++ b/.ai/plans/2026-08-28-unified-sso-login-fork.md
@@ -0,0 +1,156 @@
+# Plan: Unified Email-First Login (invisible SSO fork)
+
+> Spec: [.ai/specs/2026-08-28-unified-sso-login-fork.md](../specs/2026-08-28-unified-sso-login-fork.md)
+> Date: 2026-08-28
+> Branch: `sso-implementation-research`
+
+Small, UI-only change across two near-identical login routes plus a copy reword in
+three server auth paths. No data model, no new endpoint, no service change.
+
+## Task 1 — ERP login: fold SSO into the email submit
+
+File: `apps/erp/app/routes/_public+/login.tsx`
+
+1. **Remove** the `hasSsoAuth`-gated "SAML SSO" `<Button>` block (currently ~L619-632).
+2. **Remove** the `onSignInWithSSO` handler (~L444-498).
+3. **Add** a local loading flag: keep `ssoError` state; keep/rename `ssoLoading`
+ state (reuse the existing `const [ssoLoading, setSsoLoading] = useState(false)`).
+4. **Add** an `onSubmit` to the `<ValidatedForm>` (the one with `action="/login"`).
+ Implement the fork:
+
+ ```tsx
+ onSubmit={async (formData, event) => {
+ // formData is validated { email, redirectTo?, turnstileToken? }
+ if (!hasSsoAuth) return; // SSO off → normal magic-link submit
+ setSsoError(null);
+ const email = String(formData.email ?? "").trim().toLowerCase();
+ const domain = email.split("@")[1];
+ if (!domain) return; // let the server validate
+
+ let enabled = false;
+ try {
+ const body = new FormData();
+ body.append("email", email);
+ const res = await fetch(path.to.api.ssoCheck, { method: "POST", body });
+ enabled = res.ok ? Boolean((await res.json()).enabled) : false;
+ } catch {
+ enabled = false; // fall through to magic link; server gate is defense-in-depth
+ }
+ if (!enabled) return; // not an SSO domain → magic-link submit proceeds
+
+ event.preventDefault(); // SSO domain → suppress the magic-link POST
+ setSsoLoading(true);
+ const { data: sso, error } = await carbonClient.auth.signInWithSSO({
+ domain,
+ options: {
+ redirectTo: `${window.location.origin}/callback${
+ redirectTo ? `?redirectTo=${redirectTo}` : ""
+ }`,
+ },
+ });
+ if (error) {
+ setSsoError(error.message);
+ setSsoLoading(false);
+ return;
+ }
+ if (sso?.url) window.location.href = sso.url; // navigate away (leave loading on)
+ }}
+ ```
+
+5. **Update** the `<Submit>` to reflect the SSO loading state:
+ - `isDisabled={fetcher.state !== "idle" || ssoLoading || (!!CLOUDFLARE_TURNSTILE_SITE_KEY && !turnstileToken)}`
+ - `isLoading={fetcher.state === "submitting" || ssoLoading}`
+6. **Update** the separator gate: drop `hasSsoAuth` from the
+ `(hasGoogleAuth || hasOutlookAuth || hasPasskeyAuth || hasSsoAuth)` expression
+ → `(hasGoogleAuth || hasOutlookAuth || hasPasskeyAuth)`.
+7. **Remove** now-unused imports if any (`LuKeyRound` if only the SSO button used
+ it — verify with grep before removing). Keep `carbonClient`, `path`, `ssoError`.
+8. Keep the `ssoError` feed into the existing `<Alert>` (already
+ `ssoError ?? fetcher.data?.message`).
+
+Verify: `grep -n "SAML SSO\|onSignInWithSSO\|hasSsoAuth" apps/erp/app/routes/_public+/login.tsx`
+→ only `hasSsoAuth` in the loader/`onSubmit` remain; no button, no handler.
+
+## Task 2 — MES login: same fold
+
+File: `apps/mes/app/routes/_public+/login.tsx`
+
+Mirror Task 1. MES differences to respect:
+- No Turnstile, no `DEV_BYPASS_EMAIL`, no signup/verify — the `onSubmit` body is
+ identical (it only reads `email` + `redirectTo`).
+- The `<Submit>` has no turnstile clause: `isDisabled={fetcher.state !== "idle" || ssoLoading}`,
+ `isLoading={fetcher.state === "submitting" || ssoLoading}`.
+- MES `ValidatedForm` has no `action` prop (posts to self) — leave that as-is; add
+ only `onSubmit`.
+- Same separator-gate edit and same import cleanup.
+
+Verify: `grep -n "SAML SSO\|onSignInWithSSO\|hasSsoAuth" apps/mes/app/routes/_public+/login.tsx`.
+
+## Task 3 — Reword the require-SSO copy (remove the dead button reference)
+
+Replace the three literals
+`'Your organization requires single sign-on. Use "SAML SSO".'` with button-free copy:
+
+`'Your organization requires single sign-on. Sign in with your work email to continue.'`
+
+Files / sites:
+1. `apps/erp/app/routes/_public+/login.tsx` — `SSO_REQUIRED_MESSAGE` (~L222-223).
+2. `apps/mes/app/routes/_public+/login.tsx` — `SSO_REQUIRED_MESSAGE` (~L151-152).
+3. `apps/erp/app/routes/_public+/callback.tsx` — non-SSO branch require-SSO refusal.
+4. `apps/mes/app/routes/_public+/callback.tsx` — non-SSO branch require-SSO refusal.
+5. `apps/erp/app/routes/api+/passkey.authenticate.verify.ts` — 403 message.
+6. `apps/mes/app/routes/api+/passkey.authenticate.verify.ts` — 403 message (if present).
+
+Find them all first:
+`grep -rn 'requires single sign-on' apps/erp apps/mes`
+Replace every occurrence with the identical new string (these are server-side
+strings, not `<Trans>`; no extraction needed, but keep them identical across sites).
+
+## Task 4 — Typecheck, lint, translate
+
+```bash
+pnpm exec turbo run typecheck --filter=erp --filter=mes
+pnpm run lint
+```
+
+If the button label or any `<Trans>`/`` t`` `` string changed (it should not —
+label kept), run `/translate`. The require-SSO strings are plain server strings,
+not catalog entries, so no extraction is expected. Confirm with:
+`pnpm lingui:extract` → `git status packages/locale` (expect no changes unless a
+`<Trans>` was touched).
+
+## Task 5 — Browser verification (mandatory, per repo rules)
+
+Boot the stack and verify both apps with agent-browser (`/auth` + `/test`):
+
+Preconditions: SSO requires Enterprise edition + `sso` in `AUTH_PROVIDERS` + a
+verified `ssoDomain`. If the local stack isn't Enterprise/SSO-provisioned, at
+minimum verify the **non-SSO path is unchanged** (magic link still sends; no
+`/api/sso/check` call in the network tab when SSO is off) and that the SAML SSO
+button is gone. Note in the run log which paths were exercised vs blocked by
+environment.
+
+Checks:
+- [ ] Login card renders without a "SAML SSO" button (ERP + MES).
+- [ ] SSO off: submit an email → magic-link "Check your email" state; no
+ `/api/sso/check` request fired.
+- [ ] (If SSO provisioned) submit a verified-domain email → redirect to IdP;
+ submit a normal email → magic link.
+- [ ] Screenshot the new single-button login card for the PR (per repo rule:
+ net-new/visible UI changes ship with agent-browser screenshots).
+
+## Task 6 — Commit
+
+Per repo rules, only commit when the user asks. If asked, use `/check-and-commit`.
+Conventional message, e.g.:
+`feat(auth): unify login — auto-route SSO domains from the email field, drop the SAML SSO button`
+Add `Tracking spec: .ai/specs/2026-08-28-unified-sso-login-fork.md`.
+
+## Notes / guardrails
+
+- Do NOT change `/api/sso/check`, `getSsoConnectionByDomain`, `isSsoRequiredForEmail`,
+ the callbacks' SSO branch, or session/MFA logic.
+- Keep the magic-link path byte-identical for non-SSO domains — the `onSubmit`
+ returns early (no `preventDefault`) so `ValidatedForm` submits normally.
+- The server `isSsoRequiredForEmail` gate stays — it is the reason the client can
+ safely fail open to magic link on a check error.
diff --git a/.ai/research/sso-domain-verification.md b/.ai/research/sso-domain-verification.md
new file mode 100644
index 0000000000..fd25537bb8
--- /dev/null
+++ b/.ai/research/sso-domain-verification.md
@@ -0,0 +1,217 @@
+# SSO Domain Verification Research: Best Practices Survey
+
+## Summary
+
+Surveyed how Google Workspace, Microsoft 365/Entra ID, Atlassian, Slack, Stripe,
+Dropbox, and WorkOS prove a customer owns an email domain before SSO (or account
+capture) can be enabled for it, plus the implementation mechanics (Node.js DNS, the
+IETF domain-verification BCP draft, ACME prior art) and Carbon's current state. The
+industry answer is unanimous: **a DNS TXT record containing a high-entropy,
+per-tenant token**, added by the customer's IT admin and checked by the vendor —
+user-clicked "Verify" plus background polling, with a bounded pending window
+(WorkOS: 30 days → failed). Vendors that gate *ongoing* SSO enforcement on the
+domain (Atlassian, Stripe) keep the record permanently and re-check it periodically,
+with Atlassian's warn → grace period → revoke flow being the humane model. Carbon
+today has **no ownership proof at all**: `ssoConnection.domains TEXT[]` accepts any
+regex-valid hostname, the connection goes active immediately, cross-company
+uniqueness is a non-transactional app-side check, and no DNS-verification code
+exists anywhere in the repo. Everything needed to add it exists: service-role
+server code in `packages/ee/src/sso/`, Inngest for background polling/re-checks,
+Redis for rate limiting, and the security-email pattern for notifications.
+
+## Competitors Surveyed
+
+- **WorkOS** — the B2B SSO-as-a-service reference; has a dedicated domain-verification API
+- **Atlassian** — the best-documented *lifecycle* (periodic re-check, grace period, revoke)
+- **Stripe** — domain verification specifically as the gate to SAML SSO enforcement
+- **Google Workspace / Microsoft 365** — the giants; takeover/dispute processes
+- **Slack / Dropbox** — domain claiming for invite enforcement and account capture
+- **IETF `draft-ietf-dnsop-domain-verification-techniques`** (BCP, draft-13) + **RFC 8552/8555** — the standards floor
+
+## Key Consensus Patterns
+
+### 1. DNS TXT record is the method
+All seven vendors use it; for Slack, Stripe, and WorkOS it is the *only* method.
+Alternatives (HTML file upload, meta tag — Atlassian/Dropbox; MX record — Microsoft
+fallback) exist for customers without DNS access, but TXT is always primary.
+Email-to-admin@ verification is not offered by any surveyed SaaS vendor.
+
+### 2. Record shape: dedicated underscore host + prefixed high-entropy token
+- Value format: `<vendor>-verification=<token>` (Stripe: `stripe-verification=…`,
+ Atlassian: `atlassian-domain-verification=…`, Google: `google-site-verification=…`).
+- Host: older vendors use the domain apex; the modern/recommended practice (WorkOS
+ guide, Slack wildcard flow `_slack-challenge`, ACME `_acme-challenge`, and the IETF
+ draft's RECOMMENDED form) is a **dedicated underscore-prefixed hostname** like
+ `_carbon-challenge.example.com` — avoids polluting the apex TXT set, can't collide
+ with a real hostname (RFC 8552), and lets the customer delegate just that label.
+- Token: ≥128 bits CSPRNG (ACME RFC 8555 §11.3 and the WorkOS guide both say 128),
+ base32/hex/base64url-encoded, **unique per (tenant, domain)** — a global or
+ domain-only token lets a hosting provider replay one customer's record to claim
+ the domain for another account (GitHub Pages scopes by username, Azure by
+ subscription ID, ACME hashes the account key into the record for this reason).
+
+### 3. Verification trigger: user-click "Verify" AND background polling
+Google/Microsoft/Atlassian/Slack/Stripe are click-to-verify; Dropbox and WorkOS
+poll vendor-side and notify on success (better UX — DNS propagation takes minutes
+to 72 h and users otherwise mash the button). WorkOS bounds the poll set with a
+**30-day pending → failed expiry**, re-triggerable. Best practice is both: button
+for immediate feedback (with distinct errors: domain doesn't exist / no record yet /
+wrong token), polling for eventual success.
+
+### 4. If verification gates SSO, the record is permanent and re-checked
+- **Atlassian**: periodically re-checks; if the record disappears → email warning
+ with a grace period → then the domain drops to unverified and **SAML SSO policies
+ stop applying**. Holding a second method prevents this.
+- **Stripe**: "don't delete the TXT record… Stripe frequently checks" — removal can
+ cost Dashboard access.
+- **Microsoft/Google**: record may be deleted after one-shot verification (their
+ verification gates domain *addition*, not ongoing SSO).
+- The IETF draft's frame: for persistent validations, **removal of the record is the
+ revocation mechanism**, and providers must document the re-check frequency. This
+ also mitigates the domain-resale/dangling problem (domain expires, is
+ re-registered, old tenant still shows "verified").
+- Practical cadence: daily-to-weekly scheduled job, N consecutive failures + admin
+ notification + grace window before revoking — never a silent instant revoke
+ (transient DNS outage must not kill a company's login).
+
+### 5. One domain = one tenant, with a DNS-proof dispute path
+Microsoft: exactly one tenant; disputes resolved by removing it in the owning
+tenant or a support case (and "admin takeover" of unmanaged tenants via the same
+TXT proof). Atlassian: one org; if a squatter holds your domain, **delete their
+token from your DNS and the claim releases after 30 days** — DNS control is the
+arbiter. Google: 24 h cooldown after removal; support-mediated disputes re-verified
+via DNS. (Stripe is the deliberate exception, allowing one domain across multiple
+accounts.) Carbon's existing first-come-first-served rule becomes *safe* once
+claiming requires DNS proof — a squatter can no longer hold a domain they don't own.
+
+### 6. Scope rules decided explicitly
+- Subdomains: Microsoft auto-verifies subdomains of a verified root; Atlassian
+ never inherits; Dropbox makes it a checkbox. (Carbon's callback does exact-match
+ on the email domain, so exact-match verification per listed domain is the
+ consistent choice.)
+- Public email domains (gmail.com, outlook.com): Atlassian explicitly blocks them;
+ the IETF draft says providers SHOULD NOT allow verifying public suffixes — use
+ the Public Suffix List, or at minimum a consumer-domain denylist.
+- Homograph/IDN: normalize to punycode (`xn--`) before storing/comparing;
+ verification proves *control*, not legitimacy of a lookalike domain.
+
+## Answers to Research Questions
+
+1. **How do you do domain verification?** Issue a per-(company, domain) random
+ token → show the admin a TXT record to add (`_carbon-challenge.<domain>` →
+ `carbon-domain-verification=<token>`) → check DNS on demand + in the background →
+ mark verified → only then let the domain participate in SSO.
+2. **How is DNS checked from Node?** `node:dns/promises` `resolveTxt()` via an
+ explicit `Resolver` with pinned public servers (1.1.1.1/8.8.8.8) and explicit
+ `{timeout, tries}` (default c-ares backoff can hang ~75 s); TXT answers arrive
+ as `string[][]` — join each record's chunks before comparing. Branch on
+ `ENOTFOUND` (domain doesn't exist) vs `ENODATA` (no record yet). Alternative
+ (and required in edge runtimes): DNS-over-HTTPS JSON APIs
+ (`cloudflare-dns.com/dns-query`, `dns.google/resolve`) — fixed resolver, easy
+ `AbortController` timeout; querying two independent resolvers and requiring
+ agreement is a cheap spoofing mitigation. Plain single-vantage lookup is what
+ virtually all SaaS vendors do; DNSSEC is not required of customers anywhere.
+3. **Pending lifecycle?** WorkOS: `pending → verified | failed`, 30-day pending
+ expiry, re-triggerable; verification success fires a webhook/event. Copy those
+ states and the 30-day bound.
+4. **Does the record stay?** Yes, for SSO: permanent record + periodic re-check +
+ warn/grace/revoke (Atlassian model). One-shot deletion is only appropriate when
+ verification gates a one-time action.
+5. **Standards?** No RFC yet — `draft-ietf-dnsop-domain-verification-techniques`
+ (BCP track, draft-13) is the reference; RFC 8552 (underscored names) and
+ RFC 8555 (ACME DNS-01) are the published underpinnings.
+
+## Carbon Current State (what the feature changes)
+
+- `ssoConnection` (`20260820215433_sso-connection.sql`): `domains TEXT[] NOT NULL`,
+ **no verification columns**, connection `active = TRUE` immediately on save.
+- Validation is a hostname regex only (`settings.models.ts:69` —
+ `/^[a-z0-9.-]+\.[a-z]{2,}$/`); `gmail.com` or a competitor's domain passes.
+- Cross-company uniqueness: app-side `.overlaps("domains", …)` check in
+ `upsertSsoConnection` (`packages/ee/src/sso/connections.server.ts:123-140`) —
+ non-transactional, no DB constraint; GoTrue's project-wide domain uniqueness is
+ the real backstop. First to claim owns the domain forever.
+- Domains are pushed to GoTrue via the admin API (`provider.server.ts`) at save
+ time; GoTrue's `auth.sso_domains` routes `signInWithSSO({domain})`.
+- Enforcement reads: `sso.check` (public, rate-limited), `isSsoRequiredForEmail`
+ (login/callback/passkey in ERP+MES), callback's exact `domains.includes(emailDomain)`.
+- **No DNS/verification code in the repo** (only an SSRF `dns.lookup` guard in
+ `packages/jobs/src/workflows/actions/url-guard.ts`). Available building blocks:
+ Inngest scheduled jobs (retention pattern), `@carbon/kv` Ratelimit, security-email
+ pattern (`mfa-email.server.ts`), `.ai/specs/2026-08-21-enterprise-saml-sso.md`
+ (which never mentions ownership verification — this is a new requirement, and its
+ risk table's "rogue IdP asserting another company's domain" item is exactly what
+ verification mitigates at claim time).
+
+## Recommended Approach for Carbon
+
+1. **Record shape** (WorkOS/IETF-draft pattern): TXT at
+ `_carbon-challenge.<domain>` with value `carbon-domain-verification=<token>`;
+ token = 32 hex chars from `crypto.randomBytes(16)`, generated per
+ (companyId, domain), stored server-side.
+2. **Data model**: promote domains out of the `TEXT[]` into an `ssoDomain` table —
+ one row per domain: `id, companyId, connectionId, domain (stored punycode,
+ lowercase), verificationToken, status ('pending'|'verified'|'failed'),
+ verifiedAt, lastCheckedAt, failedCheckCount, audit columns` — with a real
+ **UNIQUE constraint on domain among non-failed rows**, closing the current
+ race. (Alternative if the array must stay: parallel verification table keyed by
+ (companyId, domain); the per-row table is cleaner and is what the read paths
+ want anyway.)
+3. **Flow**: admin adds domain → row created `pending`, UI card shows the exact
+ TXT host/value with copy buttons → "Verify" button runs the DNS check
+ server-side (Resolver with pinned public resolvers + timeouts, or DoH; distinct
+ error messaging for NXDOMAIN / no-record / token-mismatch) → an Inngest
+ scheduled job also polls pending domains (e.g. hourly) until a **30-day
+ pending → failed** expiry → on success: mark verified, notify, and only then
+ include the domain in the GoTrue provider registration. **Only verified domains
+ are ever pushed to GoTrue** — an unverified domain can't capture logins.
+4. **Ongoing re-verification** (Atlassian model): nightly Inngest job re-resolves
+ verified domains; on missing/mismatched record increment `failedCheckCount`,
+ email company admins at first failure (security-email pattern, bypasses
+ notification prefs), and after N consecutive daily failures (e.g. 7) drop the
+ domain to `pending` and remove it from GoTrue. Never revoke on a single failed
+ check. This also gives squatter-dispute resolution for free: whoever controls
+ DNS can starve out a stale claim, per Atlassian's 30-day release.
+5. **Input hardening while at it**: normalize to punycode; reject public suffixes
+ (Public Suffix List) and a consumer-email-domain denylist (gmail.com,
+ outlook.com, yahoo.com, …); keep exact-match semantics (no subdomain
+ inheritance — matches the callback's `includes` check; Atlassian's choice).
+6. **Migration/grandfathering**: existing active connections' domains (if any
+ production data exists by then) either grandfather as `verified` with a
+ re-verification deadline, or force through verification with `requireSso`
+ suspended until verified — decide in the spec. Since this branch is unmerged,
+ the schema change may be foldable into the existing SSO PR.
+
+### Open questions for the spec
+- Re-verification in v1, or ship claim-time verification first and add the nightly
+ re-check as a fast-follow? (Recommend: include it — it's one Inngest scheduled
+ job, and the dangling-domain hole is real.)
+- Grace parameters (N failures, notification cadence).
+- Fold into the current SSO PR vs separate follow-up PR.
+- DoH vs `node:dns` Resolver (decide by deploy target; Vercel Node runtime supports
+ both — DoH with two-resolver agreement is the more robust choice).
+- Whether `sso.check` / login enforcement should treat a connection with zero
+ verified domains as inactive (recommend yes — `active` should imply ≥1 verified
+ domain).
+
+## Sources
+
+- https://workos.com/docs/domain-verification
+- https://workos.com/docs/domain-verification/api
+- https://workos.com/guide/the-developers-guide-to-domain-verification
+- https://support.atlassian.com/user-management/docs/verify-a-domain-to-manage-accounts/
+- https://docs.stripe.com/get-started/account/sso/other
+- https://knowledge.workspace.google.com/admin/domains/verify-your-domain-with-a-txt-record
+- https://learn.microsoft.com/en-us/entra/identity/users/domains-manage
+- https://learn.microsoft.com/en-us/entra/identity/users/domains-admin-takeover
+- https://slack.com/help/articles/5513043606547-Claim-and-verify-email-domains
+- https://help.dropbox.com/account-access/domain-verification-invite-enforcement
+- https://www.ietf.org/archive/id/draft-ietf-dnsop-domain-verification-techniques-12.html
+- https://datatracker.ietf.org/doc/draft-ietf-dnsop-domain-verification-techniques/
+- https://datatracker.ietf.org/doc/html/rfc8555
+- https://nodejs.org/api/dns.html
+- https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-https/make-api-requests/dns-json/
+- https://developers.google.com/speed/public-dns/docs/doh/json
+- https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/verifying-your-custom-domain-for-github-pages
+- https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/app-service/reference-dangling-subdomain-prevention.md
+- https://letsencrypt.org/2026/02/18/dns-persist-01
diff --git a/.ai/research/sso.md b/.ai/research/sso.md
new file mode 100644
index 0000000000..3317322388
--- /dev/null
+++ b/.ai/research/sso.md
@@ -0,0 +1,66 @@
+# Enterprise SSO for Carbon — Research Findings
+
+Date: 2026-08-21. Researched: current Carbon auth integration points (code-verified) + Supabase/GoTrue SSO capabilities (web-verified, sources at bottom).
+
+## Current state in Carbon
+
+- **No SSO/SAML/OIDC scaffolding exists** — zero matches for `signInWithSSO`, `saml`, `sso_provider`, `workos` in app code.
+- Auth is Supabase GoTrue (`supabase/gotrue:v2.189.0` in both dev and prod compose) with magic link, Google + Azure OAuth (`signInWithOAuth`), passkeys, TOTP MFA, cookie sessions.
+- The **callback flow is provider-agnostic**: `_public+/callback.tsx` consumes any Supabase session (refresh token POSTed to the action → `refreshAccessToken` → `carbon` cookie, with the MFA park-and-challenge gate). A new SSO method that yields a GoTrue session needs **no callback changes**.
+- Provider gating: `AuthProvider` type (`packages/env/src/index.ts:116` — `"email" | "google" | "azure" | "passkey"`) + `AUTH_PROVIDERS` env + `isAuthProviderEnabled()`, consumed by ERP/MES login pages, unlock, `x+/_layout`, account security.
+- Provisioning: `create_public_user()` trigger creates `public.user` + `userPermission` for any new `auth.users` row, but **not** `userToCompany`. Company attachment happens via invite (`acceptInvite` → `addUserToCompany` + permissions) or self-serve verify → onboarding (blocked entirely in Enterprise edition, `login.tsx:229`). A zero-company user gets forced into onboarding by `x+/_layout.tsx`.
+- Per-company config pattern available: `integration` catalog + `companyIntegration.metadata` (jsonschema-validated), secrets in Supabase vault (post-NIST migration `20260817123719`).
+
+## Supabase options (Aug 2026)
+
+1. **Native SAML 2.0** (recommended): `supabase.auth.signInWithSSO({ domain })` → redirect URL → IdP → GoTrue session → existing `/callback`. Providers registered per-IdP with a `domains` array via CLI (`supabase sso add`) / Management API (hosted) or GoTrue admin REST `POST /auth/v1/admin/sso/providers` with service-role key (self-hosted, no restart needed). Hosted: **Pro plan+**, 50 SSO MAU included then $0.015/MAU. Self-hosted: `GOTRUE_SAML_ENABLED=true` + `GOTRUE_SAML_PRIVATE_KEY` (**base64 PKCS#1 DER**, not PKCS#8 — the #1 gotcha), SP metadata at `/sso/saml/metadata`, ACS at `/sso/saml/acs` (gateway routes must be open/no key-auth). Attribute mapping JSON → JWT claims + `identity_data`; assertion must contain email. `sso_provider_id` lands in the JWT (usable in RLS). SSO identities are deliberately never linked to existing accounts.
+2. **Custom OIDC providers** (launched Apr 2026): `signInWithOAuth({ provider: "custom:okta-acme" })`, issuer-URL discovery, dashboard/admin-API config. Free = 3 providers, Pro+ = unlimited. **Self-hosted support unverified** — self-hosted docs still only document `GOTRUE_EXTERNAL_<PROVIDER>_*` env vars; verify against supabase/auth release notes before relying on it.
+3. **Azure single-tenant**: existing `azure` provider accepts a tenant-specific URL (`https://login.microsoftonline.com/<tenant-id>`) — cheapest path if the only ask is "log in with our Entra". Watch the `xms_edov` unverified-email-domain claim.
+4. **Brokers**: WorkOS (first-party Supabase docs but replaces GoTrue session issuance — clashes with Carbon's cookie/MFA/passkey stack), Ory Polis (ex-BoxyHQ Jackson; self-hostable SAML→OIDC bridge + SCIM 2.0), SSOReady (API middleware, you mint sessions yourself). Only needed if SCIM is a requirement — **Supabase Auth has no SCIM** as of mid-2026.
+
+## Recommended approach: native GoTrue SAML
+
+Works identically on self-hosted Docker and hosted Supabase (same GoTrue code), keeps one session system (cookie, MFA gate, claims cache all untouched).
+
+Change points:
+
+1. **GoTrue config**: `packages/dev/docker/docker-compose.dev.yml` + `contrib/deploying/simple-docker-caddy/docker-compose.prod.yml` — add `GOTRUE_SAML_ENABLED` + `GOTRUE_SAML_PRIVATE_KEY` (per-env secret); mirror in `config.toml` for hosted parity; SST/managed path configures the Supabase project instead. Verify the dev/prod gateway exposes `/auth/v1/sso/saml/{metadata,acs}` unauthenticated.
+2. **`packages/env/src/index.ts`**: add `"sso"` to `AuthProvider` (L116); include in `AUTH_PROVIDERS`.
+3. **Login pages** (ERP `_public+/login.tsx`, MES mirror): gated "Continue with SSO" — take the already-entered email, call `carbonClient.auth.signInWithSSO({ domain, options: { redirectTo: /callback } })`, redirect to the returned URL. Callback: no changes.
+4. **Provider registration**: per-customer-IdP via GoTrue admin API. Optionally an admin settings UI storing non-secret IdP metadata via the `integration`/`companyIntegration` + vault pattern; note providers are **global to the GoTrue project** — the `domains` array is the actual tenant router, and a domain can belong to only one provider.
+5. **Provisioning decision (the real design question)**: SAML JIT-creates `auth.users` (trigger gives identity, not membership). Options: (a) invite-first — SSO user must have a pending/accepted invite, else "User not found" at callback; (b) JIT-attach — map SSO domain → companyId and auto-`addUserToCompany` with default permissions. Enterprise edition currently blocks unknown users only on the magic-link path — SAML bypasses that check, so the chosen policy must be enforced at callback or via a before-user-created Auth Hook.
+6. **Optional domain enforcement**: block magic link/OAuth for SSO-managed domains via an app-side check in the login action (no native GoTrue enforcement exists).
+
+## Key challenges (assessed 2026-08-21)
+
+1. **Existing-user migration**: SSO identities never link to existing accounts — an existing user signing in via SAML gets a NEW `auth.users` id; `userToCompany`/permissions/audit keyed to the old id, and `create_public_user` will collide on the duplicate email. Needs a designed reconciliation or re-invite contract.
+2. **Enterprise bypass**: the "reject unknown users" check lives only on the magic-link login path; SAML JIT-creation bypasses it. Enforce invite-first/JIT policy at callback or via an Auth Hook, else registered-IdP users get orphaned Carbon accounts.
+3. **Asserted-email trust (VERIFY)**: unconfirmed whether GoTrue restricts assertion emails to the provider's registered domains. If not, a customer IdP could assert another company's domain — dangerous combined with any email-based reconciliation for #1.
+4. **Tenancy mismatch**: providers are project-global; `domains` is the only router and a domain maps to one provider. Shared parent-org domains, contractors, multi-company users need an explicit domain→provider→company mapping table.
+5. **Hosted vs self-hosted ops split**: self-hosted registers providers via GoTrue admin REST (automatable in-app); hosted goes through the Supabase Management API/CLI (personal access token, Pro plan) — an in-app SSO settings screen behaves differently per mode.
+6. **MFA interplay**: SSO users get double-MFA'd by Carbon TOTP; `CONTROLLED_ENVIRONMENT` *forces* requireMfa (NIST 3.5.3), so any SSO exemption there needs a compliance rationale.
+7. **No SCIM / no SLO**: IdP offboarding doesn't propagate; 7-day cookie keeps refreshing. v1 answer is manual deactivation (existing flows); Ory Polis/SSOReady are the later SCIM path.
+8. **Dev/test story**: IdP must POST to the ACS URL — needs a mock SAML IdP container in dev compose; verify gateways expose `/auth/v1/sso/saml/{acs,metadata}` unauthenticated (prod Caddy compose was not configured for this).
+9. **Smaller**: domain enforcement must also cover Google/Azure/passkey buttons; invite flow sends magic links (contradicts SSO-only domains); attribute mapping must satisfy `create_public_user` name-splitting; PKCS#1 key in Swarm secrets; IdP cert rotation; academy/starter hardcode login buttons.
+
+## Decisions (Naveen, 2026-08-21)
+
+- **Scope**: full SAML SSO *in addition to* the existing Google/Azure buttons — they coexist; SSO activates per registered email domain.
+- **Deployment target**: self-hosted first — provider registration via GoTrue admin REST with the service-role key (no Supabase plan/Management API dependency).
+- **Provisioning**: invite-first for v1 (reuses `acceptInvite` machinery, closes the Enterprise JIT bypass, no default-permissions design). JIT-attach deferred as a possible per-company toggle.
+- **Migration contract**: "enabling SSO means your users get re-invited" — new SSO identity attached via invite. No id-remap migration in v1.
+- **First-SSO-login migration (one atomic transaction)**: on a migrated user's first SSO login — (1) invite attaches new account with permissions, (2) all *assignable/mutable* references (assignees on open tasks, work orders, jobs, approvals) are automatically re-pointed from the old account (matched by email + company) to the new one, (3) old account deactivated in the same transaction (sessions invalidated, magic link dead, TOTP moot). Immutable audit fields (`createdBy` etc.) deliberately stay on the deactivated old account — same name/email so display is unchanged; audit trails are never rewritten. Deactivating-before-settling also gives the duplicate-email trigger collision a defined ordering.
+- **Edition gating**: SSO is Enterprise-only (`CarbonEdition === Edition.Enterprise` gates the login button + settings screen).
+- **MFA policy**: trust the IdP — skip Carbon TOTP for sessions bearing `sso_provider_id`, EXCEPT under `CONTROLLED_ENVIRONMENT=true`, where forced TOTP remains (NIST 800-171 3.5.3 needs attestable MFA).
+- **Admin UX**: in-app Settings → SSO screen (Enterprise-gated): IdP metadata URL/XML + domains in, ACS + SP metadata URLs displayed out; server calls GoTrue admin API. Largest UI chunk of the project.
+
+## Remaining open items
+
+- Verify whether GoTrue restricts SAML-asserted emails to the provider's registered domains (challenge #3) — check supabase/auth source.
+- Mock SAML IdP container for dev compose + gateway routes for `/auth/v1/sso/saml/{acs,metadata}`.
+- Invite flow for SSO-managed domains currently sends magic links — needs an SSO-aware invite path.
+- Whether to enforce SSO-only (block magic link/OAuth/passkey) for managed domains in v1.
+
+## Sources
+
+[Supabase SAML SSO](https://supabase.com/docs/guides/auth/enterprise-sso/auth-sso-saml) · [Self-hosted SAML](https://supabase.com/docs/guides/self-hosting/self-hosted-saml-sso) · [Pricing](https://supabase.com/pricing) · [Custom OAuth/OIDC](https://supabase.com/docs/guides/auth/custom-oauth-providers) · [Custom OIDC blog](https://supabase.com/blog/custom-oauth-oidc-providers) · [Azure provider](https://supabase.com/docs/guides/auth/social-login/auth-azure) · [WorkOS third-party](https://supabase.com/docs/guides/auth/third-party/workos) · [Ory Polis](https://github.com/ory/polis) · [SSOReady](https://github.com/ssoready/ssoready) · [Self-hosted walkthrough](https://calvincchan.com/blog/self-hosted-supabase-enable-sso)
diff --git a/.ai/specs/2026-08-21-enterprise-saml-sso.md b/.ai/specs/2026-08-21-enterprise-saml-sso.md
new file mode 100644
index 0000000000..411fb9b014
--- /dev/null
+++ b/.ai/specs/2026-08-21-enterprise-saml-sso.md
@@ -0,0 +1,204 @@
+# Enterprise SAML SSO
+
+> Status: draft
+> Author: naveen + Claude
+> Date: 2026-08-21
+> Research: [.ai/research/sso.md](../research/sso.md)
+
+## TLDR
+
+Add enterprise SAML 2.0 SSO to Carbon using GoTrue's native SAML engine — no broker, no new session system. A company admin configures their IdP (Okta/Entra/etc.) on a new Settings → SSO screen; users on registered email domains sign in via a "Continue with SSO" button that flows through the existing `/callback` session machinery. Enterprise edition + **self-hosted Supabase only** (hosted supabase.com is not supported). Provisioning is invite-first for new users; an existing ACTIVE account's first SSO login LINKS the SAML identity onto that account (nothing archived, magic link keeps working). An inactive same-email holder has its email freed (archived form) before the invited user's row is inserted. SSO sessions skip Carbon TOTP unconditionally (the IdP owns MFA, including under `CONTROLLED_ENVIRONMENT`).
+
+## Problem Statement
+
+Enterprise customers require login through their corporate identity provider (Okta, Microsoft Entra, Google Workspace) for security policy, onboarding/offboarding, and compliance reasons. Carbon today offers magic link, Google/Azure OAuth (project-global, not per-tenant), and passkeys — there is no way for a customer to route their whole workforce through their own IdP. This blocks enterprise deals and forces per-user credential management that enterprise IT explicitly forbids.
+
+Concretely: Acme Corp (self-hosted Enterprise) wants `*@acme.com` users to authenticate via their Okta, with access revocable centrally by their IT, and without Carbon-side passwords or second MFA prompts.
+
+## Proposed Solution
+
+Enable GoTrue's built-in SAML SP (`GOTRUE_SAML_ENABLED` + `GOTRUE_SAML_PRIVATE_KEY` — the same enable-the-primitive-then-wire-it pattern used for TOTP MFA). Carbon adds:
+
+1. **`ssoConnection` table** — the app-side record mapping a GoTrue SSO provider to a `companyId`, with its registered email domains. This is the tenant router and the security anchor (GoTrue providers are project-global; this table makes them company-scoped).
+2. **`@carbon/auth/sso.server`** — thin server-only wrappers over GoTrue's admin REST API (`/auth/v1/admin/sso/providers`) for provider create/update/delete, called with the service-role key. *(Superseded: the SSO core now lives at `@carbon/ee/sso.server` behind the enterprise flag — see Changelog 2026-08-26.)*
+3. **Settings → SSO screen** (ERP, Enterprise-gated, `settings` permission) — admin enters IdP metadata URL/XML + domains; screen displays Carbon's ACS URL and SP metadata URL for the IdP side; registration + `ssoConnection` row written together.
+4. **Login button** (ERP + MES) — gated by `isAuthProviderEnabled("sso")` && Enterprise edition; takes the entered email, calls `carbonClient.auth.signInWithSSO({ domain })`, redirects to the returned IdP URL.
+5. **Callback SSO branch** — the existing `/callback` action detects an SSO session (JWT `sso_provider_id` claim) and enforces the provisioning policy + migration transaction (below) before minting the `carbon` cookie. Non-SSO logins are untouched.
+6. **First-SSO-login migration** — one Kysely transaction: accept pending invite (attach + permissions). *(Superseded: the original re-point-references-and-deactivate design was replaced by **link-instead-of-archive** — an ACTIVE same-email account gets the SAML identity linked onto it and nothing is deactivated; only an INACTIVE holder's email is freed via `buildArchivedEmail`. See Changelog 2026-08-21 "Link-instead-of-archive".)*
+
+### Design Decisions
+
+| Decision | Choice | Rationale |
+|----------|--------|-----------|
+| SSO mechanism | Native GoTrue SAML (`signInWithSSO`), not WorkOS/Polis/OIDC brokers | One session system (cookie/MFA/claims untouched); works self-hosted with the `supabase/gotrue:v2.189.0` image already deployed; brokers add a second service or replace GoTrue sessions (research §4) |
+| Deployment target | Self-hosted ONLY (final — hosted supabase.com support was added, then removed by user decision) | User decision. Provider registration via GoTrue admin REST with existing service-role key — no Supabase plan/Management API dependency. Linking requires direct `auth.identities` writes, which hosted forbids |
+| Edition gating | Enterprise only (`CarbonEdition === Edition.Enterprise` gates button + settings screen) | User decision. Aligns with self-hosted; matches Enterprise's existing reject-unknown-users posture |
+| Provisioning | Invite-first; JIT deferred | User decision. Reuses `acceptInvite` machinery, closes the JIT bypass of Enterprise's unknown-user rejection, avoids designing default permissions. JIT + IdP group→role mapping is a future per-company toggle |
+| Existing users | LINKED, never archived (final — supersedes the re-invite/archival contract) | User decision. The callback moves the SAML identity onto the existing ACTIVE account (`linkSsoIdentityToUser`, direct `auth.identities` UPDATE — safe because SSO is self-hosted-only) after the domain check. Same account, same id — no reassignment, no archival, magic link keeps working |
+| First-login migration | Invite-accept transaction only: insert user row → activate the invite's account row (`employee` / `customerAccount` / `supplierAccount`, keyed by `invite.role`) → membership → merge permissions → accept invite | The archival machinery (reassign references, strip permissions, delete old auth user) was deleted with hosted support — linking makes it dead code. An INACTIVE same-email holder gets its email rewritten to the archived form (`buildArchivedEmail`) inside the transaction to free the unique email index; an ACTIVE holder is a defensive refusal (linking should have absorbed it) |
+| MFA policy | SSO sessions mint `mfaVerified: true` (skip Carbon TOTP) unconditionally — including `CONTROLLED_ENVIRONMENT=true` | User decision. The IdP owns MFA (usually stronger than TOTP); double-challenging is friction theater. In controlled environments, MFA attestation is delegated to the IdP policy (superseding the earlier forced-TOTP exception) |
+| Admin UX | In-app Settings → SSO screen | User decision. Feasible because self-hosted = GoTrue admin REST + service-role key server-side; no CLI/operator step per customer |
+| Tenant routing / security anchor | `ssoConnection` table (providerId UNIQUE, companyId, domains[]) + callback enforcement | GoTrue providers are project-global; domains route the login but nothing natively binds a provider to a company. Callback MUST verify: session's `sso_provider_id` → `ssoConnection` → its `companyId` is the company being attached, AND the asserted email's domain ∈ connection domains. Closes the rogue-IdP asserted-email attack (research challenge #3) regardless of GoTrue's own behavior |
+| Where SSO settings code lives | `settings` module (`settings.service.ts`/`settings.server.ts`) + `@carbon/auth/sso.server` for GoTrue calls | Lesson: "Features live inside existing permission modules." Screen gates on existing `settings_view`/`settings_update` — no new permission module |
+| Orphan auth users | SSO login with no invite and no membership → sign out, flash "Contact your administrator", delete the JIT-created auth user (admin API) | Enterprise posture: no self-serve. Deleting the orphan keeps `auth.users` clean and makes retries idempotent |
+| Reassignment mechanism | `reassignUserReferences(trx, { companyId, fromUserId, toUserId })` driven by an explicit maintained list of `{table, column}` pairs (assignee-type columns only) | Explicit list over information_schema magic: auditable, excludes audit columns by construction. Enumerated during planning via a schema sweep |
+| Invite email for SSO domains | Invite creation/acceptance detects an active `ssoConnection` domain match and routes the recipient to the login page (SSO path) instead of generating a magic link | Follows from invite-first: a magic link for an SSO-managed domain would bypass the IdP on day one |
+| Multi-tenancy (heuristic 1) | `ssoConnection`: `companyId`, composite PK `("id","companyId")`, `id('sso')` default, audit columns | Convention |
+| Service shape (heuristic 2) | All new service fns take `client` first, return `{ data, error }` | Convention |
+| RLS (heuristic 3) | Standard SELECT/INSERT/UPDATE/DELETE policies on `ssoConnection`; writes require `settings_update` scope | Convention (`conventions-database.md`) |
+| Permissions (heuristic 4) | Screen: `view: "settings"` / `update: "settings"` (mirrors `x+/settings+/security.tsx`); callback runs pre-session via service role like today | Convention |
+| Forms (heuristic 5) | `ValidatedForm` + zod validator in `settings.models.ts` + route action | Convention |
+| Module layout (heuristic 6) | No new module; settings module + `@carbon/auth` subpath export | Convention + lesson |
+| Backward compatibility (heuristic 7) | Login/callback changes are purely additive branches; non-SSO flows byte-identical. New env vars optional (SAML off by default everywhere) | Preserve behavior |
+
+## Data Model Changes
+
+One new table + no changes to existing tables.
+
+```sql
+-- pnpm db:migrate:new sso-connection (never backdate the timestamp — lesson)
+CREATE TABLE "ssoConnection" (
+ "id" TEXT NOT NULL DEFAULT id('sso'),
+ "companyId" TEXT NOT NULL,
+ -- GoTrue linkage
+ "providerId" TEXT NOT NULL, -- auth.sso_providers uuid; UNIQUE project-wide
+ "domains" TEXT[] NOT NULL, -- registered email domains (written atomically with GoTrue registration)
+ "metadataUrl" TEXT, -- one of metadataUrl/metadataXml set (IdP metadata is public, not secret)
+ "metadataXml" TEXT,
+ "active" BOOLEAN NOT NULL DEFAULT TRUE,
+ "requireSso" BOOLEAN NOT NULL DEFAULT FALSE, -- per-connection enforcement toggle (Changelog 2026-08-21)
+ -- Audit
+ "createdBy" TEXT NOT NULL REFERENCES "user"("id"),
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ "updatedBy" TEXT REFERENCES "user"("id"),
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+ CONSTRAINT "ssoConnection_pkey" PRIMARY KEY ("id", "companyId"),
+ CONSTRAINT "ssoConnection_companyId_fkey" FOREIGN KEY ("companyId") REFERENCES "company"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "ssoConnection_providerId_key" UNIQUE ("providerId")
+);
+CREATE INDEX "ssoConnection_companyId_idx" ON "ssoConnection" ("companyId");
+
+ALTER TABLE "ssoConnection" ENABLE ROW LEVEL SECURITY;
+-- Standard policy names per conventions-database.md:
+-- SELECT: any employee of the company; INSERT/UPDATE/DELETE: settings_update permission.
+```
+
+Notes:
+- GoTrue's `auth.sso_providers` / `auth.sso_domains` remain the runtime source of truth for the SAML handshake; `ssoConnection` is the app-side company binding + display record. The settings action writes both in one flow (GoTrue admin call first, DB row second; on DB failure the GoTrue provider is deleted — compensating action, since GoTrue is outside the Kysely transaction).
+- Domain lookup for the login button uses `ssoConnection.domains` (service role, pre-auth) — one domain may appear in at most one active connection (enforced in the service, since Postgres can't UNIQUE across array elements cheaply; GoTrue also rejects duplicate domains project-wide).
+- No `companySettings` column needed: MFA-trust is code policy, not per-company data, in v1.
+- After migration: `pnpm run generate:types` before typecheck; remember PostgREST schema reload applies to migrations adding RPCs (none here).
+
+## API / Service Changes
+
+**`packages/auth/src/services/sso.server.ts`** (new, exported as `@carbon/auth/sso.server`) — GoTrue admin REST wrappers using `SUPABASE_URL` + `SUPABASE_SERVICE_ROLE_KEY`:
+- `createGoTrueSsoProvider({ metadataUrl?, metadataXml?, domains })` → `{ data: { id }, error }`
+- `updateGoTrueSsoProvider(providerId, { metadataUrl?, metadataXml?, domains })`
+- `deleteGoTrueSsoProvider(providerId)`
+- `getSsoProviderIdFromSession(accessToken, user)` — decodes the session's own access token and requires an `amr` entry with `method: "sso/saml"` before resolving the provider id from the identity list; fails CLOSED to the non-SSO path on an undecodable token or missing `amr`. *(The original user-identities-only contract was a misclassification bug — see Changelog 2026-08-21 "security fix, session classification". Lives in `@carbon/ee/sso.server` `session.server.ts`.)*
+
+**`apps/erp/app/modules/settings/settings.service.ts` / `settings.server.ts`:**
+- `getSsoConnection(client, companyId)` — the company's connection (0 or 1 in v1 UI; table supports N)
+- `getSsoConnectionByDomain(serviceRole, domain)` — pre-auth login lookup (also used by MES via shared query or duplicated MES service per its lighter layout)
+- `getSsoConnectionByProviderId(serviceRole, providerId)` — callback enforcement
+- `upsertSsoConnection(serviceRole, { companyId, metadataUrl?, metadataXml?, domains, userId })` — validates domains unclaimed → GoTrue create/update → row write; compensating delete on failure
+- `deactivateSsoConnection(serviceRole, { companyId, userId })` — GoTrue delete + `active = false`
+
+**`packages/auth`:**
+- `packages/env/src/index.ts` — `AuthProvider` union gains `"sso"`; `AUTH_PROVIDERS` docs updated.
+- `session.server.ts` — no structural change; SSO callback path mints `AuthSession` with `mfaVerified: true` unconditionally, which the existing `requireAuthSession` re-check already honors.
+- MFA blocking screen (`MfaEnrollmentRequired` in shell loaders): exempt sessions whose auth user is SSO-sourced in all environments, including `CONTROLLED_ENVIRONMENT` (IdP owns MFA; a `requireMfa` company would otherwise force TOTP enrollment on SSO users).
+
+**Callback (`apps/erp/app/routes/_public+/callback.tsx` action + MES mirror)** — new SSO branch when the session carries `sso_provider_id`:
+1. Resolve `ssoConnection` by `providerId` (service role). Missing/inactive → destroy session, flash error.
+2. Enforce `email.domain ∈ connection.domains`. Fail → destroy session + delete orphan auth user (if membershipless), flash error.
+3. Existing `userToCompany` for (user, connection.companyId) → proceed as today (repeat login).
+4. Else pending un-accepted `invite` matching email + `connection.companyId` → run the migration transaction (below) → proceed.
+5. Else → destroy session, delete the JIT-created membershipless auth user, flash "SSO sign-in succeeded but no invite exists for {email}. Contact your administrator."
+
+**Migration transaction** — `migrateUserToSso(trx, ...)`, called from callback step 4, single Kysely transaction. *(Steps 2a/2b below are superseded: linking runs FIRST for an active same-email holder, so reassignment/deactivation never happens; an inactive holder only has its email freed via `buildArchivedEmail`. Kept for history — see Changelog 2026-08-21 "Link-instead-of-archive". The code now lives in `@carbon/ee/sso.server` `provisioning.server.ts`.)*
+1. Accept the invite for the NEW auth user (reuse `acceptInvite` internals: activate + `addUserToCompany` + `setUserPermissions` + mark accepted).
+2. Find old ACTIVE user with same email attached to the same company, different id. If found:
+ a. `reassignUserReferences(trx, { companyId, fromUserId: old, toUserId: new })` — explicit `{table, column}` list of assignee-type columns (enumerated at plan time). Audit columns (`createdBy`, `updatedBy`, ledger/audit tables) are excluded by policy.
+ b. Deactivate old user (existing deactivate flow semantics: `active = false`, remove `userToCompany` for this company, invalidate permission cache `redis.del(getPermissionCacheKey(oldUserId))`, revoke sessions via admin sign-out).
+3. Post-transaction: invalidate new user's permission cache.
+
+**Invite flow** — `acceptInvite` / invite email generation: when the invitee's domain matches an active `ssoConnection`, the invite email links to the login page (`?email=` prefilled) instead of a magic link, and the invite is consumed by the SSO callback path rather than `invite.$code` magic-link redemption (the `invite.$code` route still works if the user is already SSO-authenticated).
+
+**Config (no code):**
+- `packages/dev/docker/docker-compose.dev.yml` + `contrib/deploying/simple-docker-caddy/docker-compose.prod.yml`: `GOTRUE_SAML_ENABLED: ${SAML_ENABLED:-false}`, `GOTRUE_SAML_PRIVATE_KEY: ${SAML_PRIVATE_KEY:-}` (base64 PKCS#1 DER; generation command documented in `.env.example`). Verify/route `/auth/v1/sso/saml/{metadata,acs}` publicly through the dev proxy and prod Caddy.
+- `packages/database/supabase/config.toml`: hosted-parity comment (no `[auth.saml]` block exists in config.toml format for local; runtime is docker-compose).
+- Dev: optional MockSAML container or mocksaml.com for e2e testing.
+
+## UI Changes
+
+**Settings → SSO (`apps/erp/app/routes/x+/settings+/sso.tsx`, new):**
+- Gated: `view: "settings"` (loader) / `update: "settings"` (action); rendered only when `CarbonEdition === Edition.Enterprise` (route returns 404/redirect otherwise); nav entry beside Security.
+- Read panel: Carbon's SP details to copy — ACS URL (`{SUPABASE_URL}/auth/v1/sso/saml/acs`) and SP metadata URL — with copy buttons.
+- Form (`ValidatedForm` + `ssoConnectionValidator` in `settings.models.ts`): metadata URL **or** XML upload (exactly one), domains (tag input, lowercase, no `@`), active toggle. Zod refines: valid domains, at least one, URL xor XML.
+- Status: connection active/inactive, registered domains, last updated; deactivate button (confirm dialog).
+- Migration aid: "Users to re-invite" list — active company users whose email domain is in `domains` and whose auth identity is not SSO — with a bulk re-invite action (reuses existing invite creation).
+
+**Login (ERP `_public+/login.tsx` + MES mirror):**
+- "Continue with SSO" button rendered when `isAuthProviderEnabled("sso")` && Enterprise (loader booleans, same pattern as `hasGoogleAuth`).
+- Click: validates entered email present → server resolves domain → `signInWithSSO` — implemented as the existing client-side pattern: fetch provider existence via a tiny public API route (`api+/sso.check.ts`, rate-limited, returns only boolean to avoid domain enumeration beyond what the button UX requires), then `carbonClient.auth.signInWithSSO({ domain, options: { redirectTo: /callback } })` and `window.location = data.url`. Unknown domain → inline "SSO is not configured for your email domain."
+
+**No UI changes** to: `/callback` component, `/mfa`, academy/starter apps (out of scope — their logins are hardcoded and non-Enterprise).
+
+## Acceptance Criteria
+
+- [ ] With `AUTH_PROVIDERS=...,sso` and Enterprise edition, the ERP and MES login pages show "Continue with SSO"; with either condition false, the button is absent and all existing login methods behave byte-identically.
+- [ ] Admin with `settings_update` registers an IdP via Settings → SSO using a metadata URL and domain `acme.com`; the screen then shows the ACS + SP metadata URLs and the active connection; a `ssoConnection` row and a GoTrue provider exist; registering `acme.com` under a second company fails with a clear error.
+- [ ] A user with a pending invite for `[email protected]` completes IdP login and lands authenticated in the correct company with exactly the invite's permissions; the invite is marked accepted.
+- [ ] First SSO login of a pre-existing `[email protected]`: the SAML identity is linked onto her EXISTING account, nothing is deactivated, magic link keeps working, and both login methods hit one account. *(Original criterion — reassign references + deactivate old account — superseded by link-instead-of-archive; see Changelog 2026-08-21.)*
+- [ ] SSO login with no invite and no membership is rejected with "contact your administrator", no `userToCompany` row exists afterward, and the orphan auth user is removed; retrying after an invite is created succeeds.
+- [ ] A SAML assertion whose email domain is NOT in the provider's registered `ssoConnection.domains` is rejected at callback even when a matching invite exists in another company.
+- [ ] SSO session skips the TOTP challenge and the `requireMfa` blocking screen in every environment, including `CONTROLLED_ENVIRONMENT=true` (magic-link users are still challenged/gated).
+- [ ] Inviting `[email protected]` (SSO-managed domain) sends an invite email that routes to the SSO login, not a magic link.
+- [ ] `pnpm exec turbo run typecheck --filter=@carbon/auth --filter=erp --filter=mes`, `pnpm run lint`, and unit tests for the callback SSO branch + migration transaction + domain enforcement pass.
+
+## Risks
+
+| Risk | Severity | Mitigation |
+|------|----------|------------|
+| Rogue/misconfigured customer IdP asserts an email at another company's domain | High | Callback enforces `providerId → ssoConnection → companyId` binding AND email-domain ∈ registered domains, independent of GoTrue behavior; invites only match within the connection's company |
+| Migration transaction partially applied (reassign done, deactivate failed) | High | Single Kysely transaction; GoTrue admin sign-out + cache invalidation are post-commit and idempotent-retryable |
+| Duplicate-email collision between old `public.user` row and trigger-created new row | Med | `create_public_user` uses `ON CONFLICT (id)`; verify `user.email` unique constraint behavior in implementation — if unique, the trigger insert for the new auth user must tolerate the old row until deactivation renames/frees it; covered by a dedicated test before shipping |
+| GoTrue admin API contract drift across image upgrades | Med | Wrappers isolated in one file; pin `supabase/gotrue` image version bumps to a checklist item that re-runs SSO e2e |
+| ACS/metadata endpoints not reachable through prod Caddy | Med | Explicit deployment task + smoke check (`curl` SP metadata) in the rollout checklist |
+| `GOTRUE_SAML_PRIVATE_KEY` mismanagement (wrong format, leaked) | Med | PKCS#1 generation command documented; stored as Swarm secret in prod compose; never in git |
+| Reassignment list drifts as new assignable columns are added | Low | List lives beside the migration fn with a comment contract; conformance note in users module AGENTS.md |
+| Domain enumeration via the public SSO-check endpoint | Low | Rate-limited, boolean-only response; equivalent information is already discoverable by attempting SSO login |
+
+## Open Questions
+
+> All resolved with the user (conversational interview, 2026-08-21) before this spec was written; recorded here as the audit trail.
+
+- [x] Microsoft-tenant-only vs full SAML? — **Answer:** Full SAML, coexisting with the existing Google/Azure/magic-link/passkey methods; SSO activates per registered domain.
+- [x] Hosted or self-hosted first? — **Answer:** Self-hosted (GoTrue admin REST + service-role key; no Supabase plan dependency).
+- [x] Invite-first or JIT? — **Answer:** Invite-first for v1; JIT (with IdP group→role mapping) deferred as a future per-company toggle.
+- [x] Migration promise for existing users? — **Answer:** Re-invite contract; on first SSO login one atomic transaction attaches the new account, auto-re-points assignable references, and deactivates the old account; immutable audit history deliberately stays on the deactivated account. No id-remap in v1. *(Superseded by later user decision: link-instead-of-archive — the existing active account is linked, nothing is deactivated, and existing members need no re-invite — see Changelog.)*
+- [x] Edition gating? — **Answer:** Enterprise-only.
+- [x] MFA for SSO users? — **Answer:** Trust the IdP (skip Carbon TOTP + requireMfa screen), except `CONTROLLED_ENVIRONMENT=true` where forced TOTP remains. *(Superseded by later user decision: the controlled-environment exception is removed; the IdP is trusted unconditionally — see Changelog.)*
+- [x] Admin UX? — **Answer:** In-app Settings → SSO screen (self-serve), enabled by the self-hosted admin-API path.
+- [x] SSO-only domain enforcement (block magic link/OAuth/passkey for managed domains)? — **Answer:** Out of scope for v1 (documented deferral; recommended as a later per-company toggle once migration tooling is proven). Magic link and SSO coexist during the migration window by design. *(Superseded by later user decision: shipped as the per-connection `requireSso` toggle — see Changelog.)*
+- [x] SCIM / automatic offboarding? — **Answer:** Out of scope for v1; manual deactivation via existing flows; broker (Ory Polis/SSOReady) is the later path if demanded.
+
+Build-time verifications (not design questions): exact JWT/user-object location of `sso_provider_id` in GoTrue v2.189.0; `public.user` email uniqueness behavior during migration overlap; dev/prod proxy routing for `/auth/v1/sso/saml/*`; assignable-column enumeration (plan task).
+
+## Changelog
+
+- 2026-08-21: Created. All open questions pre-resolved via user interview (see Open Questions). Research at `.ai/research/sso.md`.
+- 2026-08-21 (implementation): Kong route `auth-v1-sso` added (`/sso/` → gotrue) — GoTrue self-declares its SP entityID/ACS from `API_EXTERNAL_URL` WITHOUT the `/auth/v1` prefix and validates each assertion's `Destination` against that exact URL, so the un-prefixed path is the canonical one given to IdPs and shown on the settings screen. Reassignment list corrected to 39 live columns (4 spec-era columns no longer exist; compile-time-checked via `satisfies`). Fresh-invited-user-without-any-old-account edge (invite-time auth account hard-deleted) fails closed with a "re-invite" error rather than guessing an employeeType. MES first SSO login defers to ERP (owns the invite migration).
+- 2026-08-21 (planning): Three design refinements forced by the schema sweep, surfaced for user review in `.ai/plans/2026-08-21-enterprise-saml-sso.md` ("Design refinements" section): (1) `create_public_user()` updated to skip — never mutate — on a duplicate email owned by a different id, since the global `index_user_email_key` would otherwise crash the trigger inside GoTrue's transaction and fail the SAML login opaquely; the callback migration transaction owns creating the new row post-verification. (2) v1 LIMITATION: an old same-email account with memberships in OTHER companies blocks SSO migration with a "contact support" error (archiving it would break its other-company logins). (3) Old-account archival = `active=false` + email rewritten to `sso-archived+{oldId}+{email}` inside the transaction, old auth user deleted post-commit; invite-time `employee`/`employeeJob` rows are RE-KEYED to the new user id (the invite flow pre-creates them under an invite-time auth id).
+
+- 2026-08-21 (hosted supabase.com support): Hosted prod is now supported alongside self-hosted, branched on `IS_HOSTED_SUPABASE` (`Boolean(SUPABASE_PROJECT_REF)`, `@carbon/env`; hosted also requires `SUPABASE_ACCESS_TOKEN` — provider CRUD returns a clear error when it is missing). Three differences on hosted: (1) provider registration goes through the Supabase Management API (`https://api.supabase.com/v1/projects/{ref}/config/auth/sso/providers`, Bearer personal access token, same `{ type: "saml", metadata_url?, metadata_xml?, domains }` body) instead of the GoTrue admin API — one shared `ssoProviderRequest` in `packages/auth/src/services/sso.server.ts` picks the backend; (2) SP URLs carry the `/auth/v1` prefix — `getSamlSpUrls()` owns the branch (self-hosted stays un-prefixed per the Kong `auth-v1-sso` route) and the settings screen uses it; (3) the link-instead-of-archive branch in `callback.tsx` is SKIPPED — hosted restricts direct `auth.identities` writes, so an existing account's first SSO login falls through to the invite + `migrateUserToSso` archival path, which is the hosted contract. Self-hosted behavior is unchanged (GoTrue admin API, un-prefixed SP URLs, linking).
+- 2026-08-21 (user decision, final): **Hosted supabase.com support removed.** SSO is self-hosted-only — the Management API branch in `ssoProviderRequest`, the `/auth/v1`-prefixed SP URLs, and the `IS_HOSTED_SUPABASE` / `SUPABASE_PROJECT_REF` / `SUPABASE_ACCESS_TOKEN` env exports are all deleted. With linking now unconditional, the archival machinery in `migrateUserToSso` (`shouldBlockMultiCompany`, `removeCompanyFromPermissions`, `reassignUserReferences`, `REASSIGNABLE_USER_COLUMNS`, the `if (oldUser)` archive/re-key/cleanup branch, the "multi-company" error) was dead code and is deleted. Two audited bugs fixed: (1) an INACTIVE same-email holder no longer causes a permanent unique-violation failure — `migrateUserToSso` now looks up the email active-agnostically, refuses defensively when the holder is active (linking should have absorbed it; retry sign-in), and frees an inactive holder's email via `buildArchivedEmail` inside the transaction before the fresh insert; (2) the misleading "Users to Re-invite" card is now "Covered Users" with copy stating the linking truth — existing members sign in with SSO automatically on their next login, no re-invite needed; only not-yet-members need an invite (invite emails for covered domains route to SSO automatically).
+- 2026-08-21 (user decision): Controlled-environment TOTP exception removed for SSO sessions — SSO logins now mint `mfaVerified: true` and skip the `requireMfa` gate unconditionally, including `CONTROLLED_ENVIRONMENT=true`; MFA attestation is delegated to the IdP policy.
+- 2026-08-21 (requireSso toggle): **Per-connection SSO enforcement shipped**, superseding the v1 "SSO-only enforcement out of scope" deferral. `ssoConnection.requireSso` (BOOLEAN NOT NULL DEFAULT FALSE, migration `20260821111133_sso-require-toggle.sql`); toggled from the Connection Status card on Settings → Security via a `requireSso` intent on the `x+/settings+/sso.tsx` action (`updateSsoRequireSso` in `settings.server.ts`). When true, `isSsoRequiredForEmail` (ERP `settings.server.ts`, MES `sso.service.ts`) is enforced SERVER-SIDE at every non-SSO mint point in both apps: the login action (magic link + verification-code path; the `DEV_BYPASS_EMAIL` branch is deliberately exempt so local dev keeps working), the callback's non-SSO branch (catches Google/Azure OAuth and magic links minted elsewhere), and the passkey verify route (403 before `signInWithPasskey`). `api+/sso.check.ts` now returns `{ enabled, required }`; login pages rely on the server refusals surfacing through their existing inline error mechanisms (no client-side hiding). Bootstrap is inherent — the toggle exists only on an ACTIVE connection, so setup → verified sign-in → enforce is the only possible order. Break-glass for operators is documented in `docs/content/docs/platform/single-sign-on.mdx`: `UPDATE "ssoConnection" SET "requireSso" = false WHERE "companyId" = '<id>';`.
+- 2026-08-21 (security fix, session classification): The callbacks classified a login as SSO by scanning the auth user's IDENTITIES (`getSsoProviderIdFromUser`) — but after link-instead-of-archive, a linked account carries a permanent `sso:` identity, so every subsequent Google/magic-link login was misclassified as an SSO session: it bypassed the Require SSO enforcement on the non-SSO path AND was minted `mfaVerified: true` (TOTP silently skipped). Fixed by deriving SSO-ness from the session's own JWT: new `getSsoProviderIdFromSession(accessToken, user)` in `packages/auth/src/services/sso.server.ts` decodes the access token (unverified — it was just minted for us by GoTrue) and requires an `amr` entry with `method: "sso/saml"` before resolving the provider id from the identity list; undecodable token or missing `amr` fails CLOSED to the non-SSO path. Both ERP and MES `callback.tsx` now call it; `getSsoProviderIdFromUser` remains exported but is documented as answering "has an SSO identity", not "is an SSO session".
+- 2026-08-21 (user decision, supersedes archival): **Link-instead-of-archive.** When an ACTIVE account already owns the asserted email, the callback moves the SAML identity onto it (`linkSsoIdentityToUser` — direct `auth.identities` UPDATE, self-hosted only), deletes the duplicate auth user GoTrue created, and mints a session for the existing account via server-side magic-link redemption (`admin.generateLink` + `verifyOtp`, token never leaves the request). Nothing is deactivated; magic link keeps working; both login methods hit ONE account. Existing members need NO invite (they're already authorized); invites remain required for genuinely new users. The archival/reassignment path in `migrateUserToSso` is now dead code for same-email cases (kept; linking runs first). Multi-company block is moot for linked users (nothing destroyed). Orphan-delete guards ensure a linked real account is never deleted. Security basis: linking only happens after the domain check binds the assertion to the connection's registered domains — this is the account-takeover surface Supabase's no-linking rule guards against, accepted deliberately for registered domains.
+- 2026-08-21 (self-review fixes): (1) **Role-agnostic invite activation** (user decision: "when SSO is enabled everything should login via SSO") — `migrateUserToSso` now activates the invite-time account row for ALL invite roles (`employee` / `customerAccount` / `supplierAccount`), not just employees; previously a covered-domain customer/supplier invite was consumed (membership + permissions + `acceptedAt`) while its portal account row stayed inactive, unrecoverable without delete-and-reinvite. A missing row still refuses with a "re-invite" error inside the transaction (invite is NOT consumed) — `customerId`/`supplierId`/`employeeTypeId` are NOT NULL and the invite doesn't carry them. (2) **Stale-identity cleanup in linking** — `linkSsoIdentityToUser` now deletes any pre-existing `sso:%` identity on the target (in the same transaction as the move); after a deactivate → re-create connection cycle the old identity pointed at a dead provider, and `getSsoProviderIdFromUser` (first-match) could resolve it and permanently lock the account out with "SSO connection is not active". (3) **Cleanups**: the `ssoConnection` domain/provider lookups (`getSsoConnectionByDomain` / `ByProviderId`, `isSsoRequiredForEmail`) and the SSO-aware invite link (`getSsoAwareInviteLink`) were consolidated into `@carbon/auth/sso.server` — previously triplicated across ERP `settings.server.ts`, MES `sso.service.ts` (deleted), and an inline copy in jobs `user-admin.ts`; `upsertSsoConnection`'s domain-steal check is one `.overlaps` query instead of a per-domain loop; the action-only `x+/settings+/sso.tsx` gained a loader redirecting GETs to Security; the Covered Users card queries the `employees` view by domain suffix (no 500-row cap). (4) **Deactivation ordering** — `deactivateSsoConnection` flips the `ssoConnection` row inactive BEFORE deleting the GoTrue provider, and restores it if the provider delete fails; the old order (provider first) could strand a company with SAML dead while `requireSso` still refused every other login method, recoverable only by manual SQL.
+- 2026-08-26 (review hardening): (1) **Migrations squashed** — the three SSO migrations (`sso-connection`, `sso-trigger-skip-permission-row`, `sso-require-toggle`) are now one `20260820215433_sso-connection.sql` carrying the final table (with `requireSso`) and the final skip-branch `create_public_user()`; `crbn migrate`'s stale-version auto-repair reconciles DBs that applied the pre-squash files. (2) **One active connection per company enforced in the DB** — partial unique index `ssoConnection_companyId_active_key` (`"companyId" WHERE "active"`), in the squashed migration for fresh DBs and in `20260825185617_sso-connection-active-unique.sql` (IF NOT EXISTS) for pre-squash DBs; closes the concurrent-upsert race that could leave two active rows and break every `.maybeSingle()` read. (3) **Wildcard-safe invite lookup** — the ERP callback escapes LIKE metacharacters in the asserted email before its case-insensitive `ilike` invite match, so `%`/`_` in an address can never match another invite.
+- 2026-08-27 (domain verification, user decision): **Domains now require DNS TXT ownership proof** — the `domains TEXT[]` column and the app-side `.overlaps` steal check are replaced by the `ssoDomain` table (pending → verified lifecycle, global DB UNIQUE, only verified domains reach GoTrue). Designed and tracked in the follow-on spec `.ai/specs/2026-08-27-sso-domain-verification.md`; the `20260820215433` migration was edited in place (branch unmerged).
+- 2026-08-26 (EE packaging, user decision): **SSO core moved to `@carbon/ee/sso.server`** (`packages/ee/src/sso/`) behind the enterprise flag. `isSsoEnabled()` (`gate.ts` — `CarbonEdition === Edition.Enterprise && isAuthProviderEnabled("sso")`) is the single flag: the connection lookups and admin mutations SELF-GATE on it (answer "no connection" / refuse without querying), and every route entry point checks it — login buttons (ERP + MES), both `sso.check` endpoints, the `x+/settings+/sso.tsx` action (closing the previously ungated mutation surface), the Security screen (loader-provided `ssoEnabled` replaces the client-side `isEnterprise` gate), and both callbacks' SSO branch (which now also skips the `admin.getUserById` call outside Enterprise). Module layout: `provider.server.ts` (GoTrue admin wrappers + `getSamlSpUrls`), `connections.server.ts` (lookups, `isSsoRequiredForEmail`, `getSsoAwareInviteLink`, upsert/requireSso/deactivate), `session.server.ts` (amr classification), `provisioning.server.ts` (linking + invite migration, now taking a `Kysely<KyselyDatabase>` parameter — the ERP callback passes its own `getDatabaseClient()`). `@carbon/auth` keeps only `AuthSession.ssoProviderId` + refresh preservation; its `./sso.server` subpath and ERP's `users.sso.server.ts` / `settings.server.ts` SSO section are deleted. Tests moved with the code (ee: 35, including a gate-off suite).
diff --git a/.ai/specs/2026-08-27-sso-domain-verification.md b/.ai/specs/2026-08-27-sso-domain-verification.md
new file mode 100644
index 0000000000..9bd4a7b142
--- /dev/null
+++ b/.ai/specs/2026-08-27-sso-domain-verification.md
@@ -0,0 +1,289 @@
+# SSO Domain Verification (DNS TXT)
+
+> Status: draft
+> Author: naveen + Claude
+> Date: 2026-08-27
+> Research: [.ai/research/sso-domain-verification.md](../research/sso-domain-verification.md)
+> Parent spec: [2026-08-21-enterprise-saml-sso.md](2026-08-21-enterprise-saml-sso.md)
+
+## TLDR
+
+Require companies to prove ownership of an email domain — via a DNS TXT record challenge —
+before that domain can route SSO logins. Domains move out of `ssoConnection.domains TEXT[]`
+into a new `ssoDomain` table with a `pending → verified` lifecycle: an admin adds a domain,
+Carbon issues a per-(company, domain) 128-bit token, the admin publishes
+`_carbon-challenge.<domain>` TXT `carbon-domain-verification=<token>` at their DNS host and
+clicks **Verify**; Carbon resolves the record server-side and, only on success, includes the
+domain in the GoTrue provider registration. Verification is **one-shot and manual** — no
+background polling, no periodic re-verification (user decision). Unverified domains can
+never capture a login, never trigger `requireSso` enforcement, and never route
+`signInWithSSO`. The unmerged `20260820215433_sso-connection.sql` migration is edited in
+place (user decision — branch is unmerged; no new migration).
+
+## Problem Statement
+
+Today any company admin can register **any syntactically-valid domain** for SSO. The only
+guards are a hostname regex (`settings.models.ts:69`) and a first-come-first-served,
+non-transactional overlap check in `upsertSsoConnection`
+(`packages/ee/src/sso/connections.server.ts:123-140`). Nothing proves the company owns the
+domain. Concretely: a malicious or careless tenant can claim `competitor.com` (or
+`gmail.com`), permanently squatting it — and with `requireSso` the claim actively interferes
+with that domain's users. Domain ownership is asserted, never proven. Every surveyed vendor
+(Google, Microsoft, Atlassian, Slack, Stripe, WorkOS) requires a DNS TXT ownership proof
+before a domain participates in SSO or account capture (see research).
+
+## Proposed Solution
+
+1. **`ssoDomain` table** — one row per claimed domain (replaces the `domains TEXT[]`
+ column): `domain`, `verificationToken`, `status ('pending' | 'verified')`, `verifiedAt`,
+ linked to its `ssoConnection`. `UNIQUE ("companyId","domain")` plus a partial unique
+ index on verified rows closes the concurrent-claim race at the DB level
+ (revised 2026-08-28 — see Design Decisions).
+2. **TXT challenge** — token = 32 hex chars (`crypto.randomBytes(16)`), unique per row.
+ Record: host `_carbon-challenge.<domain>`, value `carbon-domain-verification=<token>`.
+ Underscore-prefixed dedicated host + prefixed high-entropy value per the IETF
+ domain-verification draft / RFC 8552 and the WorkOS/Slack/Stripe pattern.
+3. **Manual verification** — a **Verify** button on Settings → Security runs
+ `dns.promises.Resolver` (pinned to `1.1.1.1` + `8.8.8.8`, explicit
+ `{ timeout: 5000, tries: 2 }`) → `resolveTxt("_carbon-challenge." + domain)`, joins
+ chunked TXT strings, and requires an exact token match. Distinct failure messages for
+ domain-not-found (`ENOTFOUND`), record-not-there-yet (`ENODATA`), token mismatch, and
+ DNS errors. Real DNS always — **no dev bypass** (user decision; dev verification is done
+ against a genuinely-owned domain).
+4. **GoTrue gets verified domains only** — the provider is registered/updated with the
+ connection's *verified* domain list. Every enforcement read
+ (`getSsoConnectionByDomain`, `isSsoRequiredForEmail`, `sso.check`, the callback's
+ domain-membership check, invite routing) resolves through verified domains, so a pending
+ claim has zero effect on logins.
+5. **Input hardening** — reject a curated denylist of public email providers
+ (gmail.com, outlook.com, …) at validation time; keep the ASCII hostname regex (IDNs must
+ be entered in punycode `xn--` form); exact-match semantics (no subdomain inheritance),
+ matching the callback's existing `includes` check.
+
+### Design Decisions
+
+| Decision | Choice | Rationale |
+|----------|--------|-----------|
+| Verification method | DNS TXT only | Unanimous vendor primary (research §1); HTML-file/meta-tag alternatives add surface for marginal value in a B2B admin flow |
+| Record shape | `_carbon-challenge.<domain>` TXT `carbon-domain-verification=<token>` | IETF draft RECOMMENDED underscore host (RFC 8552); prefixed value self-identifies in a crowded zone (Stripe/Atlassian/Google pattern) |
+| Token | 32 hex chars from `crypto.randomBytes(16)`, per (company, domain) row, stable for the row's lifetime | ≥128-bit entropy (ACME §11.3, WorkOS guide); per-tenant scoping prevents replay by a DNS operator who set up another tenant's record |
+| Verification trigger | Manual "Verify" button only — no background polling, no pending expiry | **User decision.** Pending rows persist until verified or removed; nothing to bound because nothing polls |
+| Re-verification | **None** — verified is permanent until the domain is removed | **User decision** ("no nightly Inngest re-verification"). One-shot model (Microsoft/Google) rather than Atlassian's re-check + grace. The TXT record may be deleted after verification with no effect |
+| Data model | New `ssoDomain` table; `ssoConnection.domains TEXT[]` **removed** | Per-domain status/token/timestamps don't fit an array; a real `UNIQUE ("domain")` replaces the racy app-side `.overlaps` check |
+| Domain uniqueness | `UNIQUE ("companyId","domain")` + partial unique `("domain") WHERE status='verified'` | **Revised 2026-08-28** (superseded global `UNIQUE("domain")`): exclusivity attaches to verification, not the claim — a free pending row must not block the rightful owner (squatting vector). First to verify wins, race-free; cross-company verify conflicts fail with a deliberately generic message (no verified-elsewhere oracle) |
+| Migration strategy | Edit `20260820215433_sso-connection.sql` in place; no backfill | **User decision** — branch is unmerged, so the squashed migration is still editable; dev DBs re-apply via rebuild (user-run). `20260825185617` doesn't reference `domains` and stands unchanged |
+| GoTrue registration | Provider created with `domains: []`; domain list synced on each verify/remove | Only verified domains may route `signInWithSSO`. Build-time verification: confirm GoTrue accepts an empty/absent domains array on create; fallback (defer provider creation to first verification) documented in the plan if it refuses |
+| Enforcement reads | All go through **verified** domains only | An unverified domain must be indistinguishable from an unregistered one at login time — `requireSso` and SSO routing degrade safely to ordinary login methods |
+| Public email domains | Hardcoded denylist constant shared client+server (~20 consumer providers); no Public Suffix List dependency | DNS proof is the real gate (nobody can add TXT records to gmail.com); the denylist is fast, friendly UX. Avoids a new production dependency (Ask-First territory) |
+| IDN / homograph | ASCII-only regex retained; IDNs enter as punycode | Verification proves control, not legitimacy; storing/compare in ASCII form avoids unicode-compare bugs with zero new code |
+| Dev/test story | No bypass — real DNS check always | **User decision** (owns carbon.ms for genuine verification). Keeps the trust path single and un-forkable |
+| Multi-tenancy (heuristic 1) | `ssoDomain`: `companyId`, composite PK `("id","companyId")`, `id('ssod')` default, audit columns | Convention |
+| Service shape (heuristic 2) | New fns take `client` first, return `{ data, error }`, never throw; DNS check isolated in `verification.server.ts` returning a discriminated result | Convention |
+| RLS (heuristic 3) | SELECT: employee role; INSERT/UPDATE/DELETE: `settings_update` — mirrors `ssoConnection` | Convention |
+| Permissions (heuristic 4) | Reads under `view: "settings"`; add/verify/remove intents under `update: "settings"` on the existing `x+/settings+/sso.tsx` action | Mirrors existing SSO action gating |
+| Forms (heuristic 5) | `ValidatedForm` + `ssoDomainValidator` (zod) intents; `domains` removed from `ssoConnectionValidator` | Convention |
+| Module layout (heuristic 6) | Verification logic in `packages/ee/src/sso/verification.server.ts`; service fns in `connections.server.ts`; validators in `settings.models.ts` | Follows the EE SSO packaging (parent spec changelog 2026-08-26) |
+| Backward compatibility (heuristic 7) | Pre-merge feature branch; `domains` array never shipped. ERP/MES login + callback contracts unchanged in shape (reads swap source) | No released surface changes |
+
+## Data Model Changes
+
+**Edit `packages/database/supabase/migrations/20260820215433_sso-connection.sql` in place**
+(no new migration — user decision, branch unmerged):
+
+1. Remove `"domains" TEXT[] NOT NULL` from `ssoConnection` and the
+ `ssoConnection_domains_idx` GIN index.
+2. Add after the `ssoConnection` block:
+
+```sql
+CREATE TABLE "ssoDomain" (
+ "id" TEXT NOT NULL DEFAULT id('ssod'),
+ "companyId" TEXT NOT NULL,
+ "connectionId" TEXT NOT NULL,
+ "domain" TEXT NOT NULL, -- lowercase ASCII (punycode for IDNs)
+ "verificationToken" TEXT NOT NULL, -- 32 hex chars; published in DNS, not a secret
+ "status" "ssoDomainStatus" NOT NULL DEFAULT 'pending', -- PG enum ('pending','verified')
+ "verifiedAt" TIMESTAMP WITH TIME ZONE,
+
+ "createdBy" TEXT NOT NULL REFERENCES "user"("id"),
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ "updatedBy" TEXT REFERENCES "user"("id"),
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+
+ CONSTRAINT "ssoDomain_pkey" PRIMARY KEY ("id", "companyId"),
+ CONSTRAINT "ssoDomain_companyId_fkey" FOREIGN KEY ("companyId") REFERENCES "company"("id") ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT "ssoDomain_connectionId_fkey" FOREIGN KEY ("connectionId", "companyId") REFERENCES "ssoConnection"("id", "companyId") ON DELETE CASCADE,
+ CONSTRAINT "ssoDomain_companyId_domain_key" UNIQUE ("companyId", "domain")
+);
+
+-- First-to-verify-wins: at most one VERIFIED row per domain across companies.
+CREATE UNIQUE INDEX "ssoDomain_domain_verified_key" ON "ssoDomain" ("domain") WHERE "status" = 'verified';
+
+CREATE INDEX "ssoDomain_companyId_idx" ON "ssoDomain" ("companyId");
+CREATE INDEX "ssoDomain_connectionId_idx" ON "ssoDomain" ("connectionId", "companyId");
+CREATE INDEX "ssoDomain_createdBy_idx" ON "ssoDomain" ("createdBy");
+
+ALTER TABLE "public"."ssoDomain" ENABLE ROW LEVEL SECURITY;
+-- Four standard policies mirroring ssoConnection:
+-- SELECT: get_companies_with_employee_role()
+-- INSERT/UPDATE/DELETE: get_companies_with_employee_permission('settings_update')
+```
+
+Notes:
+- Uniqueness is two-level **by design** (revised 2026-08-28): `UNIQUE ("companyId","domain")`
+ blocks a company's own duplicate; the partial unique index on verified rows makes
+ first-to-verify-wins exclusive across tenants (replaces the racy app-side `.overlaps` check).
+- `20260825185617_sso-connection-active-unique.sql` is untouched (no `domains` reference).
+- Dev DBs that applied the pre-edit migration must be rebuilt/re-applied by the **user**
+ (never rebuild autonomously); then `pnpm run generate:types` before typecheck.
+
+## API / Service Changes
+
+**`packages/ee/src/sso/verification.server.ts`** (new):
+- `TXT_HOST_PREFIX = "_carbon-challenge"`, `TXT_VALUE_PREFIX = "carbon-domain-verification"`
+- `generateVerificationToken()` — `crypto.randomBytes(16).toString("hex")`
+- `getTxtRecord(domain, token)` → `{ host: "_carbon-challenge.<domain>", value: "carbon-domain-verification=<token>" }` (UI + tests use this one source)
+- `checkDomainVerification(domain, token)` → `{ verified: true } | { verified: false, reason: "domain_not_found" | "no_record" | "token_mismatch" | "dns_error" }` — `dns.promises.Resolver` with `setServers(["1.1.1.1", "8.8.8.8"])`, `{ timeout: 5000, tries: 2 }`; joins each TXT record's chunk array before comparing; never throws.
+
+**`packages/ee/src/sso/connections.server.ts`:**
+- `upsertSsoConnection` — drops `domains` handling entirely (validation, `.overlaps` steal
+ check, GoTrue domains payload). Creates the GoTrue provider with the connection's current
+ verified domains (empty on first create).
+- New: `getSsoDomains(client, companyId)`; `addSsoDomain(serviceRole, { companyId, connectionId, domain, createdBy })` (normalizes, denylist-checks, inserts pending row with fresh token; maps the unique-violation error to a friendly "already registered to another company" message); `verifySsoDomain(serviceRole, { companyId, domainId, updatedBy })` (loads row, runs `checkDomainVerification`, on success marks verified + `syncGoTrueDomains`); `removeSsoDomain(serviceRole, { companyId, domainId })` (deletes row; re-syncs GoTrue if it was verified); internal `getVerifiedDomains(serviceRole, connectionId, companyId)` + `syncGoTrueDomains(connection)` → `updateGoTrueSsoProvider(providerId, { domains })`.
+- `getSsoConnectionByDomain(serviceRole, domain)` — now resolves via `ssoDomain`
+ (`status = 'verified'`, join active connection); same signature/return shape, so
+ `isSsoRequiredForEmail`, both `sso.check` routes, and the passkey/login/callback callers
+ are unchanged.
+- Callback domain check (ERP + MES): `connection.domains.includes(emailDomain)` becomes a
+ verified-domain lookup for the connection (same failure behavior: destroy session, delete
+ JIT orphan).
+- `getSsoAwareInviteLink` / `getSsoInviteDomainError` — resolve through verified domains.
+
+**`apps/erp/app/modules/settings/settings.models.ts`:**
+- `ssoConnectionValidator` — remove `domains`; keep metadata URL/XML XOR refine.
+- New `ssoDomainValidator` — single `domain`: trim → lowercase → regex
+ (`ssoDomainRegex`, unchanged) → no `@` → not in `PUBLIC_EMAIL_DOMAINS`.
+- New exported `PUBLIC_EMAIL_DOMAINS` (~20 entries: gmail.com, googlemail.com, outlook.com,
+ hotmail.com, live.com, msn.com, yahoo.com, ymail.com, icloud.com, me.com, mac.com,
+ aol.com, proton.me, protonmail.com, pm.me, gmx.com, gmx.net, mail.com, zoho.com,
+ yandex.com, qq.com, 163.com, 126.com).
+
+**`apps/erp/app/routes/x+/settings+/sso.tsx` action** — three new intents, same
+`update: "settings"` + `isSsoEnabled()` gates: `addDomain`, `verifyDomain`, `removeDomain`.
+Verify failures flash reason-specific messages ("We couldn't find a TXT record at
+_carbon-challenge.example.com yet — DNS changes can take up to a few minutes to propagate",
+"A TXT record exists but doesn't match this company's verification token", …).
+
+## UI Changes
+
+**Settings → Security (`x+/settings+/security.tsx`), SSO section:**
+- Identity Provider card: the comma-separated **domains input is removed** (metadata +
+ Require SSO + Deactivate remain).
+- New **Email Domains** card (rendered when a connection exists): add-domain input
+ (`ValidatedForm` + `ssoDomainValidator`), and a row per domain — domain name, status
+ badge (Verified ✓ / Pending), and for pending rows the TXT instructions (Host / Type TXT /
+ Value with copy buttons, from `getTxtRecord`) plus **Verify** and **Remove** buttons
+ (fetcher-based, per-row pending states). A hint on the Require SSO switch when zero
+ domains are verified ("Require SSO has no effect until a domain is verified").
+- Loader adds `getSsoDomains` (already gated `view: "settings"` + `ssoEnabled`).
+
+**No MES UI changes** (MES has no SSO settings; its login/`sso.check`/callback flow is
+unchanged in shape).
+
+**Docs:** update `docs/content/docs/platform/single-sign-on.mdx` (+ the agent-KB mirror)
+— domain-verification setup steps, the TXT record shape, one-claim-per-domain rule, and the
+operator dispute note (SQL delete of a squatting `ssoDomain` row).
+
+## Acceptance Criteria
+
+- [ ] Adding `example.com` creates a pending `ssoDomain` row with a 32-hex-char token, and
+ the security page shows `_carbon-challenge.example.com` / TXT /
+ `carbon-domain-verification=<token>` with copy buttons and a Verify button.
+- [ ] Verify against a domain with no such TXT record fails with the "no record yet"
+ message; the row stays pending; GoTrue's provider domain list does not include it.
+- [ ] Verify against a domain whose TXT record matches flips the row to verified (with
+ `verifiedAt`), and the GoTrue provider's domains now include it (assert via
+ `getGoTrueSsoProvider`).
+- [ ] A login email on a **pending** domain: `sso.check` returns `enabled: false`,
+ `isSsoRequiredForEmail` returns false (magic link works normally), and a SAML
+ assertion for it is rejected at the callback.
+- [ ] The same domain added by a second company fails with "already registered to another
+ company" (DB unique violation surfaced as a friendly error) — including under
+ concurrent inserts.
+- [ ] Adding `gmail.com` (any denylisted domain) is rejected at validation with a clear
+ message, client- and server-side.
+- [ ] Removing a verified domain deletes the row and removes it from the GoTrue provider;
+ subsequent logins on that domain fall back to non-SSO methods.
+- [ ] `requireSso` with only pending domains enforces nothing; after verification it
+ enforces exactly as before this change.
+- [ ] Unit tests: `checkDomainVerification` result mapping (mocked resolver: found /
+ chunked TXT join / ENODATA / ENOTFOUND / timeout), token generation shape,
+ `ssoDomainValidator` (normalization, denylist, regex), and the ee test suite still
+ passes with the reads swapped to `ssoDomain`.
+- [ ] `pnpm exec turbo run typecheck --filter=@carbon/ee --filter=erp --filter=mes`,
+ `pnpm run lint`, and `pnpm --filter @carbon/ee test` pass.
+
+## Risks
+
+| Risk | Severity | Mitigation |
+|------|----------|------------|
+| GoTrue rejects a SAML provider with an empty domains array (breaks create-before-verify flow) | Med | Build-time verification against the running GoTrue before UI work; fallback design (nullable `providerId`, provider created on first verification) ready in the plan |
+| Squatter parks a domain in `pending`, blocking the real owner | Low | A pending claim is inert (can't verify without DNS control, routes nothing); operator SQL documented for disputes — strictly better than today's full active capture |
+| DNS resolver unreachable from the server (egress-restricted self-hosted install) | Low | `dns_error` result with a distinct message; pinned public resolvers (1.1.1.1/8.8.8.8) are the most commonly allowed; nothing breaks except the Verify action |
+| Recursive-resolver negative caching delays verification after the record is added | Low | Reason-specific "propagation can take a few minutes" message; manual retry is the designed UX |
+| Domain later expires / transfers while still verified (no re-verification by design) | Med | Accepted by user decision (no nightly re-check). Documented in the ops docs; the one-shot model matches Microsoft/Google |
+| Existing dev DBs applied the pre-edit migration | Low | User rebuilds/re-applies (user decision to edit in place); flagged in the implementation handoff |
+
+## Open Questions
+
+> All resolved with the user (conversational interview, 2026-08-27) before this spec was
+> written; recorded as the audit trail.
+
+- [x] Verification at claim time only, or also ongoing? — **Answer:** Claim-time only.
+ Manual Verify button; **no nightly re-verification** (explicit user decision,
+ superseding the earlier research recommendation of the Atlassian model). Verified is
+ permanent until the domain is removed.
+- [x] Background polling of pending domains? — **Answer:** No — the user verifies manually.
+- [x] New migration or edit the existing one? — **Answer:** Edit
+ `20260820215433_sso-connection.sql` in place; the branch is unmerged so no backfill
+ or compatibility path is needed.
+- [x] Dev bypass for verification (can't own a test domain)? — **Answer:** No bypass —
+ always run the real DNS check; the user owns carbon.ms and verifies genuinely.
+- [x] Data model: cookie…/array vs table? — **Answer:** `ssoDomain` table (from the earlier
+ recommendation round: "rest is fine"), with global DB-level domain uniqueness.
+- [x] Public email domain blocking? — **Answer:** Yes, hardcoded denylist (accepted with
+ "rest is fine"); no Public Suffix List dependency.
+
+Build-time verifications (not design questions): GoTrue admin API behavior with an empty
+`domains` array on create/update; exact `updateGoTrueSsoProvider` body requirements for a
+domains-only update; `ssoConnection` references to `domains` swept across ee tests.
+
+## Changelog
+
+- 2026-08-27: Created. All open questions pre-resolved via user interview (see Open
+ Questions). Research at `.ai/research/sso-domain-verification.md`. Supersedes the parent
+ spec's `domains TEXT[]` design and its app-side `.overlaps` uniqueness check.
+- 2026-08-27 (implementation): (1) The `domain_not_found` verify reason was collapsed into
+ `no_record` — NXDOMAIN on `_carbon-challenge.<domain>` is the ordinary
+ "record not published yet" answer even for a real domain, so the two are
+ indistinguishable without a second base-domain query that buys nothing. (2) The
+ connection lookups attach a computed verified-only `domains: string[]` (embed on
+ `ssoDomain`), so the callbacks, `uncoveredSsoDomainError`, and `getSsoAwareInviteLink`
+ needed zero changes. (3) `deactivateSsoConnection` now DELETES the connection's
+ `ssoDomain` rows (before the GoTrue provider delete) — the global `UNIQUE("domain")`
+ would otherwise leave the claims stranded under the dead connection, blocking the
+ company (or the domain's real owner) from ever re-registering them.
+- 2026-08-28 (revision): **Domain uniqueness redesigned** (user decision — the global
+ unique made a free pending claim block everyone, a squatting vector). Now
+ `UNIQUE("companyId","domain")` + partial unique `("domain") WHERE status='verified'`:
+ pending claims coexist across companies; first to verify wins (race-free at the DB).
+ `addSsoDomain` pre-checks the company's own duplicate (no error-code branching, per
+ user preference); `verifySsoDomain` fail-fasts a cross-company verified conflict with
+ a deliberately **generic** message — a distinct "verified by another company" reply
+ would be an oracle for probing other tenants' domains. The `sso.tsx` action surfaces
+ the services' string messages in flashes. Migration `20260820215433` edited in place;
+ domain-claim release on deactivate is unchanged and still required (a stranded
+ verified claim would block the domain's next owner).
+- 2026-08-28 (revision 2): `status` converted from TEXT + CHECK to a PG enum
+ `ssoDomainStatus` ('pending' | 'verified') so the generated types carry the union —
+ every `.eq("status", ...)` / `update({ status })` / comparison in `@carbon/ee` and
+ `erp` is compiler-checked with no shared constant. Migration edited in place.
diff --git a/.ai/specs/2026-08-28-unified-sso-login-fork.md b/.ai/specs/2026-08-28-unified-sso-login-fork.md
new file mode 100644
index 0000000000..270bdc2da7
--- /dev/null
+++ b/.ai/specs/2026-08-28-unified-sso-login-fork.md
@@ -0,0 +1,187 @@
+# Unified Email-First Login (invisible SSO fork)
+
+> Status: draft
+> Author: Brad + Claude
+> Date: 2026-08-28
+> Parent specs: [2026-08-21-enterprise-saml-sso.md](2026-08-21-enterprise-saml-sso.md),
+> [2026-08-27-sso-domain-verification.md](2026-08-27-sso-domain-verification.md)
+
+## TLDR
+
+Collapse the redundant "SAML SSO" button on the login page into the email flow.
+Today a user is shown BOTH a **SAML SSO** button and a **Sign in with Email**
+button and is expected to know which one applies to them — most users don't know
+what SAML/SSO means. Instead: the user enters their email and presses one button;
+the app forks **behind the scenes** — if the email domain is an SSO-registered
+(verified) domain it routes straight to that company's identity provider, and if
+not it carries on with the existing magic-link / verification-code flow. No new
+data model, no new endpoint, no server-side auth-contract change. The fork is a
+client-side interception of the existing `ValidatedForm` submit, reusing the
+existing `/api/sso/check` lookup and `signInWithSSO`. Applies to both apps that
+have SSO login: **ERP** and **MES** (academy/starter have no SSO button).
+
+## Problem Statement
+
+The login card (`apps/erp/app/routes/_public+/login.tsx`,
+`apps/mes/app/routes/_public+/login.tsx`) currently renders a stack of auth
+buttons — Google, Outlook, Passkey, **SAML SSO** — then a separator, an email
+input, and a **Sign in with Email** submit. The "SAML SSO" button
+(`onSignInWithSSO`) reads the email input, calls `/api/sso/check`, and if the
+domain is SSO-registered calls `carbonClient.auth.signInWithSSO({ domain })`.
+
+Two problems:
+
+1. **It's redundant and confusing.** "SAML SSO" is jargon. A user on an
+ SSO-managed domain doesn't know they must press that specific button; a user
+ on a normal domain doesn't know to ignore it. Both buttons take an email and
+ "sign you in", so the page presents a decision the user isn't equipped to make.
+2. **The failure copy leaks the jargon.** When a `requireSso` domain tries the
+ magic link, the server returns `Your organization requires single sign-on. Use
+ "SAML SSO".` — an instruction that points at the very button we want to remove.
+
+The information needed to route correctly (is this domain SSO-registered?) is
+already available server-side via `getSsoConnectionByDomain` and is already
+exposed to the browser by `/api/sso/check`. The user should never have to make
+this choice.
+
+## Proposed Solution
+
+**One email-first entry.** Remove the standalone "SAML SSO" button. Keep the
+email field and its submit button as the single credential-less path. Intercept
+the form submit: after client-side validation, if SSO is enabled for the
+deployment AND the entered email's domain resolves to an SSO connection, prevent
+the ordinary magic-link POST and instead run `signInWithSSO(domain)` →
+redirect to the IdP. Otherwise let the form submit exactly as it does today
+(magic link for existing users, verification-code signup for unknown users in
+non-Enterprise ERP).
+
+The interception uses `ValidatedForm`'s existing `onSubmit(data, event)` hook
+(`packages/form/src/ValidatedForm.tsx:454-459`): it runs after validation, and
+if it calls `event.preventDefault()` the library skips the real submit. This is
+the designed extension point — no form-library changes, no manual form wiring.
+
+### Flow
+
+```
+User types email → presses the one button
+ │
+ ├─ SSO not enabled for deployment (!hasSsoAuth) ─────────► magic-link POST (unchanged)
+ │
+ └─ SSO enabled → POST /api/sso/check { email }
+ │
+ ├─ enabled:false / network error ───────────────► magic-link POST (unchanged)
+ │
+ └─ enabled:true → event.preventDefault()
+ → carbonClient.auth.signInWithSSO({ domain })
+ → window.location = idpUrl ─────────────► IdP → /callback
+```
+
+Google / Outlook / Passkey buttons are **unchanged** — only the SAML SSO button
+is removed and its logic folded into the email submit.
+
+### Design Decisions
+
+| Decision | Choice | Rationale |
+|----------|--------|-----------|
+| Fork trigger | On `/api/sso/check` `enabled` (domain has an active connection with a VERIFIED domain) — regardless of `requireSso` | Matches what the removed SSO button already did (it forked on `enabled`), matches the user's stated model ("if the domain is an SSO registered domain, redirect to the IDP"). A company that set up SSO wants its domain's users on the IdP. `requireSso` remains the **server-side enforcement** flag (blocks a direct magic-link POST), not a UI-routing flag. **Trade-off:** a domain that is `enabled && !requireSso` (SSO configured but the admin deliberately left magic link allowed) will now be routed to SSO from this page too — see Risks; surfaced for veto |
+| Where the fork lives | Client-side, in `ValidatedForm`'s `onSubmit` + `event.preventDefault()` | `signInWithSSO` is a browser GoTrue call that returns the IdP redirect URL for the browser to navigate to — it MUST run client-side. Reuses the exact `/api/sso/check` + `signInWithSSO` logic the old button had. No server action change on the happy path; magic-link path byte-identical |
+| Skip the check when SSO is off | `if (!hasSsoAuth) return` before any fetch | The vast majority of deployments (Community/Cloud) have no SSO — never pay a round-trip. `hasSsoAuth` already comes from the loader (`isSsoEnabled()`) |
+| Fallback on check failure | `enabled:false` on any non-OK / network / parse error → fall through to magic link | The server `isSsoRequiredForEmail` gate is defense-in-depth: a required-SSO domain that slips through the client check is still refused server-side. Failing open to magic link never leaks and never hard-blocks |
+| Button label | Keep **"Sign in with Email"** unchanged | Minimal diff, zero translation churn, and it aligns with "fork behind the scenes" — the user still signs in by entering their email; the redirect is the invisible fork they asked for. (Alternative "Continue" noted for veto) |
+| Server require-SSO copy | Reword the three `'…requires single sign-on. Use "SAML SSO".'` strings to not reference the removed button | The button it names no longer exists. New copy guides the user to the email flow (which now auto-forks) without jargon about a specific control |
+| Loading state | Local `ssoLoading` state OR-ed into the submit's `isLoading`/`isDisabled` | RVF's own submitting state ends when `onSubmit` returns; without a local flag the button would show no spinner during the `/api/sso/check` + `signInWithSSO` round-trips before the IdP redirect |
+| Keep `/api/sso/check` and its shape | No change to the endpoint | Still returns `{ enabled, required }`; the fork only needs `enabled`. `required` stays for any future use and is harmless |
+| Scope | ERP + MES only | The two apps with an SSO button. academy/starter have no `hasSsoAuth` path. Callbacks/provisioning unchanged |
+| Backward compatibility (heuristic 7) | Purely additive client interception + one string reword. Non-SSO logins byte-identical; SSO logins take the same `signInWithSSO`→`/callback` path the button took | No data-model, endpoint, or session-contract change |
+
+## Data Model Changes
+
+None.
+
+## API / Service Changes
+
+None to services or endpoints. `/api/sso/check` (`apps/{erp,mes}/app/routes/api+/sso.check.ts`)
+is unchanged. `getSsoConnectionByDomain` / `isSsoRequiredForEmail` unchanged.
+
+The only server-side edit is copy: the `SSO_REQUIRED_MESSAGE` literal in the
+login actions, the callback non-SSO branch, and the passkey verify route.
+
+## UI Changes
+
+Both `apps/erp/app/routes/_public+/login.tsx` and
+`apps/mes/app/routes/_public+/login.tsx`:
+
+1. **Remove** the `hasSsoAuth`-gated "SAML SSO" `<Button>` from the button stack.
+2. **Remove** the standalone `onSignInWithSSO` handler (its logic moves into the
+ form submit).
+3. **Add** an `onSubmit` prop to the `ValidatedForm` that performs the fork
+ (validate → check SSO when `hasSsoAuth` → `preventDefault` + `signInWithSSO`
+ on an SSO domain, else fall through).
+4. **Keep** the `ssoError` state + the existing `Alert` (now fed only by a
+ `signInWithSSO` failure, not by "SSO not configured for domain").
+5. **Keep** the separator gate expression, but it no longer needs to include
+ `hasSsoAuth` (the separator now shows when Google/Outlook/Passkey exist).
+6. Add a local `ssoLoading` state to keep the submit button in a loading state
+ through the check + redirect.
+7. **Keep** the button label "Sign in with Email".
+
+No layout/spacing redesign — the SSO button simply disappears from the stack.
+
+## Acceptance Criteria
+
+- [ ] The login page (ERP and MES) shows **no** "SAML SSO" button.
+- [ ] With SSO disabled (Community/Cloud default), entering any email and pressing
+ the button behaves exactly as today (magic link for existing users; ERP
+ verification-code signup for unknown users) and makes **no** call to
+ `/api/sso/check`.
+- [ ] With SSO enabled, entering an email on a **verified SSO domain** and pressing
+ the button redirects to the IdP (`signInWithSSO` URL) — no magic link is
+ sent, no login action POST occurs.
+- [ ] With SSO enabled, entering an email on a **non-SSO domain** sends the magic
+ link / routes to verification exactly as today.
+- [ ] A `signInWithSSO` error surfaces in the existing Authentication Error alert;
+ the form is not left in a stuck submitting state.
+- [ ] If `/api/sso/check` errors or times out, the submit falls through to the
+ magic-link path (and a `requireSso` domain is still refused server-side by
+ the unchanged `isSsoRequiredForEmail` gate).
+- [ ] The submit button shows a loading state during the SSO check + redirect.
+- [ ] No occurrence of `Use "SAML SSO"` remains in app copy; the require-SSO
+ message no longer names a removed button.
+- [ ] `pnpm exec turbo run typecheck --filter=erp --filter=mes` and
+ `pnpm run lint` pass. Missing i18n strings filled via `/translate`.
+
+## Risks
+
+| Risk | Severity | Mitigation |
+|------|----------|------------|
+| `enabled && !requireSso` domains lose magic-link access from this page (auto-forked to SSO) | Med | Matches the removed button's behavior and the user's stated intent; the admin can drop the SSO domain if they want magic link. Surfaced for veto. A future refinement could fork only on `required` and keep a small "Use SSO instead" affordance for enabled-not-required — deliberately not built now |
+| An SSO user with JS disabled can't fork (client-only) | Low | Pre-existing: `signInWithSSO` was always a client SDK call. The server gate still refuses magic link on required domains; wording now guides to email |
+| Extra `/api/sso/check` round-trip on every SSO-enabled login submit | Low | One POST, already rate-limited 20/h/IP; skipped entirely when SSO is off |
+| `onSubmit`/`preventDefault` timing regressions in `ValidatedForm` | Low | Uses the documented proxy behavior (`await onSubmit` then check `defaultPrevented`); covered by the acceptance criteria and browser verification |
+
+## Open Questions
+
+> Resolved autonomously per the user's instruction ("don't grill me, just operate
+> autonomously"); recorded here for the veto trail.
+
+- [x] Fork on `enabled` or only `required`? — **enabled** (matches the removed
+ button and the user's description). `requireSso` stays server-side enforcement.
+- [x] Client-side or server-side fork? — **client-side** (`signInWithSSO` must run
+ in the browser); zero server-contract change.
+- [x] Rename the button? — **no** ("Sign in with Email" kept; minimal diff, aligns
+ with "fork behind the scenes").
+- [x] Scope? — **ERP + MES** (the only apps with SSO login).
+
+## Changelog
+
+- 2026-08-28: Created. Builds on the shipped enterprise SSO + domain-verification
+ work on branch `sso-implementation-research`. No data-model/endpoint change —
+ pure login-UX unification via a client-side submit fork.
+- 2026-08-28 (enhancement): Pass `login_hint=<email>` to the IdP. `signInWithSSO`
+ (auth-js 2.80.0) has no `login_hint` option and returns `data.url` = the IdP's
+ SAML redirect-binding endpoint, so the fork appends `login_hint` via
+ `URLSearchParams.set` (URL-encoded) before navigating. Safe by construction: the
+ redirect-binding signature covers only `SAMLRequest`/`RelayState`/`SigAlg`, so an
+ extra param never invalidates it; Okta/Entra prefill the username, other IdPs
+ ignore it. Applied to both ERP and MES login. Not live-verifiable here (needs a
+ configured SAML provider); typecheck + lint pass.
diff --git a/.claude/rules/authentication-system.md b/.claude/rules/authentication-system.md
index ec1f9adc55..776a19a93f 100644
--- a/.claude/rules/authentication-system.md
+++ b/.claude/rules/authentication-system.md
@@ -43,13 +43,107 @@ Magic link is the primary flow. The action rate-limits by IP (Upstash via `@carb
verification-code signup). Enterprise edition rejects unknown users.
Other methods on the login page: Google + Azure OAuth (`signInWithOAuth`, redirect to
-`/callback`), and Passkey/WebAuthn (`@simplewebauthn`, `/api/passkey/authenticate/*`,
-backed by `passkey.server.ts`). Availability gated by `isAuthProviderEnabled(...)`.
+`/callback`), Passkey/WebAuthn (`@simplewebauthn`, `/api/passkey/authenticate/*`,
+backed by `passkey.server.ts`), and — Enterprise edition with `sso` in
+`AUTH_PROVIDERS` — SAML SSO ("Continue with SSO" → `api+/sso.check.ts` →
+`signInWithSSO` → IdP → `/callback`; see the SSO section below). Availability
+gated by `isAuthProviderEnabled(...)`.
<!-- UNVERIFIED: there is no /signup route; the old cache doc's "/signup" + "Sign up for free" claims were stale (and contained a git merge-conflict artifact). Signup happens via the verification-code flow above. -->
Routes live under `_public+/` (`login`, `callback`, `logout`, `magic-link`, `verify`,
`invite.$code`, `refresh-session`). MES mirrors a subset under its own `_public+/`.
+## Enterprise SAML SSO (`@carbon/ee/sso.server` + `ssoConnection`)
+
+Self-hosted-only (direct `auth.identities` writes). The whole feature lives in
+`packages/ee/src/sso/` behind **`isSsoEnabled()`** (`gate.ts`): Enterprise
+edition AND `sso` in `AUTH_PROVIDERS`. The connection lookups and admin
+mutations SELF-GATE on it (they answer "no connection" / refuse without
+querying), and every route entry point checks it too — login buttons, the
+`sso.check` endpoints, the settings action, and the callbacks' SSO branch
+(which then also skips the `admin.getUserById` call). `@carbon/auth` keeps only
+`AuthSession.ssoProviderId` + its preservation across refresh. Design record:
+`.ai/specs/2026-08-21-enterprise-saml-sso.md`.
+
+- **Provider management**: `packages/ee/src/sso/provider.server.ts` wraps the GoTrue
+ admin SSO API (`create/update/delete/getGoTrueSsoProvider`, service-role key).
+ `getSamlSpUrls()` returns the UN-prefixed `/sso/saml/{acs,metadata}` URLs — GoTrue
+ self-declares its SP entityID/ACS from `API_EXTERNAL_URL` without `/auth/v1` and
+ validates each assertion's `Destination` against that exact URL; Kong routes `/sso/`
+ (`kong.yml` `auth-v1-sso`). Admin UX: Settings → Security (`x+/settings+/security.tsx`,
+ action `x+/settings+/sso.tsx`) via `upsertSsoConnection` / `updateSsoRequireSso` /
+ `deactivateSsoConnection` in `connections.server.ts`.
+- **`ssoConnection` table** (migration `20260820215433`; partial unique index also
+ in `20260825185617` for pre-squash DBs) binds a provider to a company:
+ `providerId` UNIQUE, `metadataUrl` XOR `metadataXml` (CHECK),
+ `active`, `requireSso`, and at most ONE active row per company
+ (`ssoConnection_companyId_active_key` — readers use `.maybeSingle()`). GoTrue
+ providers are project-global, so the CALLBACK — not GoTrue — enforces
+ provider → company + email-domain binding.
+- **Domain ownership verification** (`ssoDomain` table, same migration; spec
+ `.ai/specs/2026-08-27-sso-domain-verification.md`): one row per claimed email
+ domain — `verificationToken` (32-hex, per row), `status pending|verified`.
+ Exclusivity attaches to VERIFICATION, not the claim: `UNIQUE("companyId","domain")`
+ plus a partial unique index on `("domain") WHERE status='verified'` — any number
+ of companies may hold pending claims on one domain (a free pending row must not
+ block the rightful owner — that would be a squatting vector); first to verify
+ wins, race-free. A cross-company verify conflict fails fast with a deliberately
+ GENERIC message ("Failed to verify domain") — a distinct one would be an oracle
+ for probing which domains are verified where. `addSsoDomain` pre-checks the
+ company's own duplicate (no error-code branching). A domain
+ routes SSO / enforces `requireSso` only while VERIFIED; the connection lookups
+ in `connections.server.ts` attach a computed `domains: string[]` of verified
+ domains, so consumers (callbacks, invite guards) keep the old shape. The DNS
+ challenge (`verification.server.ts`): TXT at `_carbon-challenge.<domain>` with
+ `carbon-domain-verification=<token>`, checked manually via the Verify button
+ (pinned resolvers 1.1.1.1/8.8.8.8; no polling, no re-verification — one-shot
+ by design). Only verified domains are pushed to the GoTrue provider
+ (`syncGoTrueDomains`); a new connection registers with `domains: []`.
+ Domain admin flows: `addSsoDomain` / `verifySsoDomain` / `removeSsoDomain`
+ intents on `x+/settings+/sso.tsx`; UI is the Email Domains card on
+ Settings → Security. Deactivating a connection DELETES its `ssoDomain` rows
+ (releases the claims; re-activation re-verifies). Public email providers are
+ denied at validation (`PUBLIC_EMAIL_DOMAINS`, `settings.models.ts`).
+- **Session classification**: `getSsoProviderIdFromSession(accessToken, user)` requires
+ an `amr` entry with `method: "sso/saml"` before resolving the provider id; fails
+ CLOSED to the non-SSO path. `getSsoProviderIdFromUser` only answers "HAS an SSO
+ identity" — a linked account's Google/magic-link login also satisfies it; never use
+ it to classify a session. `AuthSession.ssoProviderId` is stamped at the callback and
+ preserved across refresh and company switch.
+- **Callback SSO branch** (ERP `_public+/callback.tsx`): verifies connection + domain;
+ an ACTIVE same-email account gets the SAML identity LINKED onto it
+ (`linkSsoIdentityToUser` — also deletes stale `sso:%` identities on the target, then
+ the duplicate auth user is deleted and a session minted via server-side magic-link
+ redemption); otherwise the invite-first migration `migrateUserToSso` runs (one Kysely
+ transaction: user row, role-keyed account activation — `employee` /
+ `customerAccount` / `supplierAccount` — membership, permission merge, invite accept
+ under FOR UPDATE). No invite (and the domain-mismatch rejection) → rejected;
+ `deleteJitSsoUser` removes the WHOLE throwaway JIT user — auth user plus the
+ trigger-created `user`/`userPermission` rows (no FK cascade between the schemas),
+ guarded on zero memberships — or the leftover profile trips `authIdentityExists`
+ and makes the email un-invitable. MES defers first login to ERP.
+- **Require SSO** (`ssoConnection.requireSso`): `isSsoRequiredForEmail`
+ (`connections.server.ts`, like all connection lookups —
+ `getSsoConnectionByDomain` / `getSsoConnectionByProviderId` are the ONE copy
+ shared by ERP, MES, and jobs) refuses non-SSO logins server-side at the login
+ actions, the callbacks' non-SSO branch, and the passkey verify routes in both
+ apps. `DEV_BYPASS_EMAIL` is exempt. Break-glass:
+ `UPDATE "ssoConnection" SET "requireSso" = false WHERE "companyId" = '<id>';`.
+- **MFA**: SSO sessions mint `mfaVerified: true` unconditionally (including
+ `CONTROLLED_ENVIRONMENT`) and the `requireMfa` enrollment gate exempts them — the
+ IdP owns MFA (user decision).
+- **Trigger**: `create_public_user()` SKIPS (inserts nothing) when the new auth user's
+ email already belongs to a DIFFERENT `public."user"` row — the callback migration
+ owns that case; inserting would FK/unique-crash GoTrue's signup transaction.
+- **Invites**: `getSsoAwareInviteLink` (`connections.server.ts`; used by the ERP
+ invite routes and jobs `user-admin.ts`) routes covered-domain invite emails to
+ `/login?email=...` instead of `/invite/<code>`, so the IdP is never bypassed.
+ Employee invites outside the covered domains are refused up front
+ (`getSsoInviteDomainError` in ERP `users.server.ts` → `uncoveredSsoDomainError`).
+- **Config**: GoTrue SAML via `SAML_ENABLED` / `SAML_PRIVATE_KEY` in root `.env`
+ (compose substitution → `GOTRUE_SAML_*`; `crbn reload` does not read root `.env` —
+ see `.ai/lessons.md`).
+
## Sessions (`session.server.ts`)
- `createCookieSessionStorage`, cookie name **`carbon`**, `httpOnly`, `sameSite: "lax"`
@@ -107,7 +201,9 @@ Supabase's `auth.mfa_factors` — no app table.
escape it, and any gap there is a lockout or a hole. Mirrors the ITAR gate.
Scoped to the ACTIVE company only: a user in a company that does not require
MFA is not gated, and the shell re-runs on company switch. Console sessions are
- exempt (a shared kiosk cannot complete a personal enrollment); MES has no
+ exempt (a shared kiosk cannot complete a personal enrollment); SSO sessions
+ (`authSession.ssoProviderId` set) are exempt too, including under
+ `CONTROLLED_ENVIRONMENT` — the IdP owns MFA (see the SSO section); MES has no
enrollment UI so its gate links to ERP.
- **Email**: `~/services/mfa-email.server.ts` owns both MFA emails
(`MfaRequiredEmail` / `MfaEnabledEmail` in `@carbon/documents/email`).
@@ -207,9 +303,20 @@ ERP exposes an OAuth 2.0 AS for use as a remote Claude/MCP connector. Routes und
## Schema (newest migrations; `packages/database/supabase/migrations`)
- `user` / `userPermission` (`id`, `permissions` JSONB) — seeded by the
- `create_public_user()` trigger (`on_auth_user_created` on `auth.users`).
+ `create_public_user()` trigger (`on_auth_user_created` on `auth.users`) — which
+ SKIPS inserting when the email already belongs to a different `user` row (the
+ SSO duplicate case; the callback migration owns it).
- `userToCompany` — junction, PK `(userId, companyId)`, `role` enum
`'employee' | 'supplier' | 'customer'`.
+- `ssoConnection` — SAML SSO tenant binding (see the SSO section): PK
+ `(id, companyId)`, `providerId` UNIQUE,
+ `metadataUrl`/`metadataXml` (exactly one, CHECK), `active`, `requireSso`.
+ SELECT: employee role; writes: `settings_update`.
+- `ssoDomain` — DNS-verified email domain claims: PK `(id, companyId)`,
+ composite FK → `ssoConnection`, `UNIQUE("companyId","domain")` + partial unique
+ `("domain") WHERE status='verified'` (first-to-verify-wins), `verificationToken`,
+ `status` (`ssoDomainStatus` enum: `pending|verified`), `verifiedAt`. Same RLS split as
+ `ssoConnection`.
- `apiKey` — `keyHash` (unique), `keyPreview`, `name`, `companyId`, `createdBy`, `scopes`
JSONB, `rateLimit` (default **60**), `rateLimitWindow` (default `'1m'`), `expiresAt`,
`lastUsedAt`. The old plaintext `key` column was dropped.
diff --git a/.claude/rules/environment-configuration.md b/.claude/rules/environment-configuration.md
index efd240f3c6..dd98afa175 100644
--- a/.claude/rules/environment-configuration.md
+++ b/.claude/rules/environment-configuration.md
@@ -68,8 +68,13 @@ secret), `SUPABASE_JWT_SECRET` (optional), plus
`INNGEST_SERVE_HOST`, `INNGEST_TLS_HOST`.
**Auth / session** — `SESSION_SECRET` (required), `AUTH_PROVIDERS`
-(`email,google,azure,passkey`; gate via `isAuthProviderEnabled`),
+(`email,google,azure,passkey,sso`; gate via `isAuthProviderEnabled`),
`CLOUDFLARE_TURNSTILE_SITE_KEY` / `_SECRET_KEY`, `RATE_LIMIT`.
+`SAML_ENABLED` / `SAML_PRIVATE_KEY` are NOT `@carbon/env` vars — they live in
+root `.env` and reach GoTrue via docker-compose substitution (`GOTRUE_SAML_*`).
+Both `crbn up` and `crbn reload` preload `.env.local` then `.env` into
+process.env before invoking compose so these survive a recreate; see the
+`crbn reload` lesson in `.ai/lessons.md`.
**Stripe** — `STRIPE_SECRET_KEY`, `STRIPE_WEBHOOK_SECRET`,
`STRIPE_CONNECT_WEBHOOK_SECRET` (all optional), `STRIPE_BYPASS_COMPANY_IDS`,
diff --git a/.env.example b/.env.example
index 44c7bf001c..e4e7a56ed5 100644
--- a/.env.example
+++ b/.env.example
@@ -60,3 +60,11 @@ EXTRACTION_CONFIDENCE_THRESHOLD="0.85"
GOOGLE_PLACES_API_KEY="*******************"
RATE_LIMIT="5"
+
+# Enterprise SAML SSO (Enterprise edition only). Generate the key with:
+# openssl genpkey -algorithm RSA -out /tmp/pk.pem -quiet && \
+# openssl rsa -in /tmp/pk.pem -outform DER -traditional -out /tmp/pk.der && \
+# base64 -i /tmp/pk.der # (base64 -w 0 /tmp/pk.der on Linux)
+# The key MUST be base64-encoded PKCS#1 DER (the -traditional flag), min 2048-bit.
+SAML_ENABLED=false
+SAML_PRIVATE_KEY=
diff --git a/apps/erp/app/components/UpgradeOverlay/UpgradeOverlay.tsx b/apps/erp/app/components/UpgradeOverlay/UpgradeOverlay.tsx
index ff49be8dc9..8696966669 100644
--- a/apps/erp/app/components/UpgradeOverlay/UpgradeOverlay.tsx
+++ b/apps/erp/app/components/UpgradeOverlay/UpgradeOverlay.tsx
@@ -138,6 +138,43 @@ function UpgradeOverlayDialog({
);
}
+/**
+ * Generic section-level gate: blurs the real (inert) section and centers the
+ * upgrade card over it. Unlike the full-page overlays, it sizes to the section
+ * — the min-height only guarantees the card fits over short content.
+ */
+function UpgradeOverlaySection({
+ icon,
+ title,
+ description,
+ children,
+ className
+}: {
+ icon: ReactNode;
+ title: ReactNode;
+ description: ReactNode;
+ children: ReactNode;
+ className?: string;
+}) {
+ return (
+ <UpgradeOverlayRoot className={cn("min-h-80", className)}>
+ <UpgradeOverlayPreview className="flex min-h-80 flex-col justify-center">
+ {children}
+ </UpgradeOverlayPreview>
+ <UpgradeOverlayCard>
+ <UpgradeOverlayIcon>{icon}</UpgradeOverlayIcon>
+ <UpgradeOverlayContent>
+ <UpgradeOverlayTitle>{title}</UpgradeOverlayTitle>
+ <UpgradeOverlayDescription>{description}</UpgradeOverlayDescription>
+ </UpgradeOverlayContent>
+ <UpgradeOverlayActions>
+ <UpgradeOverlayUpgradeButton />
+ </UpgradeOverlayActions>
+ </UpgradeOverlayCard>
+ </UpgradeOverlayRoot>
+ );
+}
+
function UpgradeOverlayUpgradeButton({
children,
to = path.to.billing
@@ -164,6 +201,7 @@ export {
UpgradeOverlayIcon,
UpgradeOverlayInline,
UpgradeOverlayPreview,
+ UpgradeOverlaySection,
UpgradeOverlayStickyGradient,
UpgradeOverlayTitle,
UpgradeOverlayUpgradeButton
diff --git a/apps/erp/app/components/UpgradeOverlay/index.ts b/apps/erp/app/components/UpgradeOverlay/index.ts
index 3d64ce5577..548e7dcdd7 100644
--- a/apps/erp/app/components/UpgradeOverlay/index.ts
+++ b/apps/erp/app/components/UpgradeOverlay/index.ts
@@ -8,6 +8,7 @@ export {
UpgradeOverlayIcon,
UpgradeOverlayInline,
UpgradeOverlayPreview,
+ UpgradeOverlaySection,
UpgradeOverlayStickyGradient,
UpgradeOverlayTitle,
UpgradeOverlayUpgradeButton
diff --git a/apps/erp/app/modules/agent/kb/docs/platform/self-hosting/environment-variables.md b/apps/erp/app/modules/agent/kb/docs/platform/self-hosting/environment-variables.md
index 2abd312dcd..75ffa619f0 100644
--- a/apps/erp/app/modules/agent/kb/docs/platform/self-hosting/environment-variables.md
+++ b/apps/erp/app/modules/agent/kb/docs/platform/self-hosting/environment-variables.md
@@ -13,7 +13,7 @@ Platform-wide behavior and edition.
One of `community`, `cloud`, `enterprise`, or `test`. Gates edition-specific features.
Enables ITAR / controlled-environment restrictions: the US-Person certification gate, ITAR hostnames and branding, Slack and analytics disabled, and mandatory `docs/reference/two-factor` that a company admin cannot turn off.
-Allowed sign-in methods: `email`, `google`, `azure`, `passkey`.
+Allowed sign-in methods: `email`, `google`, `azure`, `passkey`, `sso` (`docs/platform/single-sign-on`, Enterprise edition only).
Base domain the apps are served from.
Public URL of the ERP app.
Public URL of the MES app.
@@ -39,6 +39,11 @@ Azure OAuth client id, when `azure` is enabled.
Azure OAuth client secret.
Local only. Sign in as this email without a magic link.
+Enterprise `docs/platform/single-sign-on` adds two more:
+
+Turns on the SAML engine in the auth service.
+SAML signing key — base64-encoded PKCS#1 DER RSA, minimum 2048-bit; the generation command is in `.env.example`.
+
Sign-in bot protection uses Cloudflare Turnstile: `CLOUDFLARE_TURNSTILE_SITE_KEY` and
`CLOUDFLARE_TURNSTILE_SECRET_KEY`.
diff --git a/apps/erp/app/modules/agent/kb/docs/platform/single-sign-on.md b/apps/erp/app/modules/agent/kb/docs/platform/single-sign-on.md
new file mode 100644
index 0000000000..c24d8bee3f
--- /dev/null
+++ b/apps/erp/app/modules/agent/kb/docs/platform/single-sign-on.md
@@ -0,0 +1,93 @@
+# Single sign-on
+
+> Route sign-in for your company's email domains through your own identity provider with enterprise SAML SSO.
+
+Single sign-on hands control of Carbon sign-in to your own identity provider — Okta, Entra ID, Google Workspace, or any SAML 2.0 IdP. You register your email domains once — proving you own each one with a DNS record — and from then on your IT team grants and revokes access centrally: everyone on those domains signs in to both ERP and MES with their normal work email — Carbon recognizes the domain and routes them to your IdP automatically, with no SSO button to find. Registering alone doesn't take anything away — the magic link and other methods keep working until you turn on [Require SSO](#requiring-sso).
+
+## Requirements
+
+SSO is an Enterprise feature. Automatic SSO routing on the login page and the settings section are active only when the instance runs the **Enterprise** edition (`CARBON_EDITION=enterprise`), which requires a `docs/platform/licensing`. It is a capability of your own `docs/platform/self-hosting` deployment — Carbon Cloud sign-in is unaffected.
+
+Enable it through `docs/platform/self-hosting/environment-variables`:
+
+Add `sso` to the comma-separated list of sign-in methods. Without it, the button never renders.
+Turns on the SAML engine in the auth service (GoTrue).
+The SAML signing key — a base64-encoded PKCS#1 DER RSA key, minimum 2048-bit. The exact `openssl` generation command is in `.env.example`.
+
+Carbon registers providers directly against the auth service with its service-role key — no Supabase account or plan is involved.
+
+## Connect your identity provider
+
+The whole exchange lives on one screen: **Settings** → **Security**, under the **"Single Sign-On"** heading. Viewing it requires the `settings` view permission; saving requires `settings` update.
+
+**Copy Carbon's service provider details.** The **"Service Provider Details"** card shows the **"ACS URL"** and **"SP Metadata URL"** with copy buttons. Copy them from the screen rather than constructing them by hand.
+
+**Register Carbon in your IdP.** In Okta, Entra ID, or Google Workspace, create a SAML application using those two URLs. The assertion must include an **email attribute** — the email is how Carbon matches each sign-in to a person and a company.
+
+**Paste the IdP metadata back into Carbon.** In the **"Identity Provider"** card, provide either the **"IdP Metadata URL"** or the raw **"IdP Metadata XML"** — exactly one of the two — then **"Save"**. After saving, the card gains a **"Require SSO"** switch and a **"Deactivate"** button — the sign that the connection is active.
+
+**Verify your email domains.** The **"Email Domains"** card appears once the connection exists. Add each domain your people sign in with, publish the DNS record it shows you, and click **"Verify"** — see [Verifying a domain](#verifying-a-domain). Only verified domains route SSO sign-ins.
+
+- **IdP Metadata URL**: The SAML metadata URL published by your identity provider. Provide this *or* the XML, never both — the form rejects the submission with **"Provide either a metadata URL or metadata XML (exactly one)"**.
+- **IdP Metadata XML**: The raw metadata document, for IdPs that don't publish a metadata URL.
+- **Add a domain**: One domain at a time, e.g. `example.com`. Domains are lowercased and must be bare hostnames — no `@`, no spaces; enter internationalized domains in punycode (`xn--`) form. Public email providers (`gmail.com`, `outlook.com`, …) are refused. Several companies may hold a **pending** claim on the same domain at once — a claim on its own blocks nobody. Exclusivity kicks in at verification: only one company can ever hold a domain **verified**, and only DNS control gets you there. Adding a domain your own company already has fails with **"This domain has already been added"**.
+
+## Verifying a domain
+
+A domain routes SSO sign-ins only after you prove your company controls it. Each added domain starts **Pending** with a DNS challenge — a unique TXT record shown right on the card:
+
+| Record | Value |
+| --- | --- |
+| **Host** | `_carbon-challenge.example.com` |
+| **Type** | `TXT` |
+| **Value** | `carbon-domain-verification=<your unique token>` |
+
+Add the record at your DNS host (copy both fields from the card — the token is unique to your company and this domain), then click **"Verify"**. Many DNS providers auto-append your domain to the record's name field: in Cloudflare, for example, enter only `_carbon-challenge` (plus any subdomain) and check the preview under the field shows the host once, not twice. Carbon looks the record up and, on a match, flips the domain to **Verified** — from then on it participates in sign-in routing and [Require SSO](#requiring-sso) enforcement. Verification is one-time: the domain stays verified until you remove it, and the TXT record may be deleted afterwards if you prefer a tidy zone.
+
+If verification fails, the message tells you why: the record isn't visible yet (DNS changes can take a few minutes to propagate — wait and retry), the record's value doesn't match the token (re-copy it exactly), or the DNS lookup itself failed (the server couldn't reach the public resolvers; check its outbound DNS access). A **Pending** domain has no effect anywhere: it can't capture sign-ins, and it never triggers Require SSO — so adding a domain is always safe.
+
+Only one company can hold a domain verified — first to prove DNS control wins. A **"Verify"** attempt on a domain another company already verified fails with a deliberately generic message, so the button can't be used to probe which domains are registered where. Verification is also permanent: the holder keeps the domain even if DNS control later changes hands (a domain sale, a rebrand). The clean handover is for the holding company to **Remove** the domain from its list, which frees it for the new owner to verify. Failing that, operators of a self-hosted deployment can delete the claim directly (`DELETE FROM "ssoDomain" WHERE "domain" = 'example.com';`) — note the previous holder's provider registration keeps routing the domain until its connection is re-saved, though sign-ins on it are rejected either way once the row is gone.
+
+To turn SSO off, use the **"Deactivate"** button in the Identity Provider card. It opens a **"Deactivate Single Sign-On"** confirmation warning that "Users on your registered domains will no longer be able to sign in through your identity provider. This cannot be undone." — the provider registration is deleted outright and the domain claims are released, so re-enabling means saving the connection again and re-verifying your domains.
+
+## How sign-in works
+
+The login page is email-first, and the SSO fork is invisible. The user types their email and presses **"Continue"** — there is no separate SSO button to choose. Carbon checks whether the email's domain has an active connection (a rate-limited check that reveals nothing beyond yes or no); if it does, the browser redirects to your IdP, the user authenticates there, and lands back in Carbon signed in to the connection's company. If it doesn't, the same button falls through to the ordinary magic-link (or sign-up) flow. Users never have to know whether their company uses SSO.
+
+Before any session is created, Carbon enforces the connection's boundaries itself: the asserted email's domain must be one of the connection's **verified** email domains. An assertion outside them is rejected with **"SSO sign-in rejected: this email domain is not registered for your company's SSO connection."** — even a misconfigured or hostile IdP can't sign someone into another company.
+
+Provisioning is **invite-first** — there is no self-serve signup through SSO. Three outcomes:
+
+- **Already a member** of the connection's company: signed straight in.
+- **Has a pending invite**: the first SSO sign-in accepts it — the person lands in the company with exactly the invite's role and permissions.
+- **Neither**: rejected with **"SSO sign-in succeeded but no invite exists for `[email protected]`. Contact your administrator."** (the message names the address). Nothing is provisioned, so creating the invite and retrying just works.
+
+Invites cooperate with this automatically: when you invite someone whose email domain has an active SSO connection, the invite email links to the login page with their address prefilled instead of carrying a magic-link code — the IdP is never bypassed, even on day one.
+
+MES uses the same email-first sign-in and enforces the same domain rules, but it doesn't run first-time provisioning. A brand-new SSO user who starts at MES sees **"Complete your first SSO sign-in in Carbon ERP, then return here."** — after that one ERP sign-in, MES works normally.
+
+## Existing accounts
+
+People who already sign in with a magic link or OAuth don't lose anything when SSO arrives.
+
+The first SSO sign-in quietly attaches the SAML identity to the existing account. Nothing changes for the user: it's the same account, the magic link keeps working, and no invite is needed, because an existing member is already authorized.
+
+Coverage follows the registered domains: every existing member whose email domain is registered with the connection signs in with SSO automatically on their next login, no re-invite needed. People not yet in the company still need an invite from the `docs/reference/people`; invite emails for these domains route to SSO automatically.
+
+## Requiring SSO
+
+Once the connection works, you can make it the only way in. The **"Identity Provider"** card carries a **"Require SSO"** switch: while it's on, anyone whose email domain is **verified** on the active connection can sign in **only** through your identity provider (a pending domain enforces nothing). Every other method is refused server-side — the magic-link form, Google and Outlook sign-in, and passkeys all answer with **"Your organization requires single sign-on. Sign in with your work email to continue."** and no session is created.
+
+The ordering protects you from locking yourself out: the switch exists only on an active connection, so the path is always *set up SSO, prove a sign-in works, enforce last*. Turning the switch off — or deactivating the connection — immediately restores the other sign-in methods for those domains.
+
+If enforcement is on and your identity provider is unreachable, nobody on the covered domains can sign in to turn it off. Operators of a self-hosted deployment can lift the requirement directly in the database:
+
+```sql
+UPDATE "ssoConnection" SET "requireSso" = false WHERE "companyId" = '<id>';
+```
+
+Magic-link sign-in works again on the next attempt; re-enable the switch once the IdP is healthy.
+
+## Two-factor authentication
+
+SSO sessions skip Carbon's `docs/reference/two-factor` and the company-wide two-factor requirement in every environment, including controlled (ITAR) deployments. Your identity provider already enforced its own MFA policy during sign-in, and challenging twice is friction without security — MFA attestation for SSO sign-ins belongs to the IdP policy. Magic-link logins still go through Carbon's own two-factor challenge.
diff --git a/apps/erp/app/modules/agent/kb/docs/reference/mes.md b/apps/erp/app/modules/agent/kb/docs/reference/mes.md
index 77f7127fec..bf665fde16 100644
--- a/apps/erp/app/modules/agent/kb/docs/reference/mes.md
+++ b/apps/erp/app/modules/agent/kb/docs/reference/mes.md
@@ -8,7 +8,7 @@ Every mutation here hits the network. The MES keeps an IndexedDB read-cache for
## Getting onto the floor
-An operator signs in on the login screen with whichever methods the company has enabled: **"Sign in with Google"**, **"Sign in with Outlook"**, **"Sign in with Passkey"**, or **"Sign in with Email"** (a magic link, which lands on a **"Check your email"** confirmation). The available buttons follow the company's `AUTH_PROVIDERS`, so a floor that only allows passkeys sees only that one.
+An operator signs in on the login screen with whichever methods the company has enabled: **"Sign in with Google"**, **"Sign in with Outlook"**, **"Sign in with Passkey"**, or an email address plus **"Continue"** (which sends a magic link and lands on a **"Check your email"** confirmation, or routes an SSO-registered domain to its identity provider). The available buttons follow the company's `AUTH_PROVIDERS`, so a floor that only allows passkeys sees only that one.
Once in, the operator sets their context. If the company has more than one location, a **"Location"** submenu appears in the sidebar to pick which floor they're standing on. With a single location the choice is skipped entirely. This selection scopes the board, the assigned lists, and everything they report.
diff --git a/apps/erp/app/modules/agent/kb/docs/reference/two-factor.md b/apps/erp/app/modules/agent/kb/docs/reference/two-factor.md
index faa11fb883..4b7dc8fadb 100644
--- a/apps/erp/app/modules/agent/kb/docs/reference/two-factor.md
+++ b/apps/erp/app/modules/agent/kb/docs/reference/two-factor.md
@@ -28,6 +28,8 @@ Once you have a verified authenticator, every sign-in asks for a code — magic
Passkeys are challenged too, which surprises people. A passkey is strong, but in Carbon it resolves into an ordinary session like any other sign-in method, so exempting it would leave a way around the requirement. If you'd rather not be asked twice, that's an argument for using a passkey *instead of* two-factor, not alongside it.
+`docs/platform/single-sign-on` is the one method that isn't challenged. An SSO session arrives with your identity provider's MFA policy already enforced at sign-in, so Carbon skips its own code screen and the company-wide requirement for those sessions — in every environment, including controlled (ITAR) deployments. Sign in with a magic link instead and the challenge applies as usual.
+
A code is valid for its thirty-second window plus one window either side, to absorb small drift. If codes are consistently rejected on a phone whose time is set manually, switch it to network time. It's the single most common cause of "the code is right but Carbon says no".
Repeated attempts are rate-limited on the same budget as sign-in itself, so guessing your way through isn't practical — and neither is retrying twenty times because you mistyped.
@@ -48,7 +50,7 @@ This is the part worth reading twice. If you belong to two companies and only on
But once you've set one up, you're asked for a code at **every** sign-in, to either company. There's no such thing as being half-enrolled — the authenticator is attached to your account, not to a membership. Turning the requirement on in one company therefore does change how its people sign in everywhere else, which is worth saying out loud before you flip it.
-Controlled environments are the exception to all of the above. When Carbon is deployed for ITAR or CMMC work, two-factor is mandatory and the switch is locked on, because NIST 800-171 requires it for network access to non-privileged accounts. Admins can see the setting but not turn it off, and the enrollment screen offers no way around it.
+Controlled environments are the exception to all of the above. When Carbon is deployed for ITAR or CMMC work, two-factor is mandatory and the switch is locked on, because NIST 800-171 requires it for network access to non-privileged accounts. Admins can see the setting but not turn it off, and the enrollment screen offers no way around it. SSO sessions remain exempt even here — the identity provider owns their MFA.
## Seeing who has set it up
diff --git a/apps/erp/app/modules/agent/kb/manifest.json b/apps/erp/app/modules/agent/kb/manifest.json
index 90885806bb..12ff0cbeae 100644
--- a/apps/erp/app/modules/agent/kb/manifest.json
+++ b/apps/erp/app/modules/agent/kb/manifest.json
@@ -229,6 +229,21 @@
],
"headings": ["Recipes"]
},
+ {
+ "slug": "docs/platform/single-sign-on",
+ "title": "Single sign-on",
+ "description": "Route sign-in for your company's email domains through your own identity provider with enterprise SAML SSO.",
+ "keywords": ["single", "sign-on", "docs", "platform", "sign"],
+ "headings": [
+ "Requirements",
+ "Connect your identity provider",
+ "Verifying a domain",
+ "How sign-in works",
+ "Existing accounts",
+ "Requiring SSO",
+ "Two-factor authentication"
+ ]
+ },
{
"slug": "docs/reference/account",
"title": "Your account",
diff --git a/apps/erp/app/modules/settings/settings.models.sso.test.ts b/apps/erp/app/modules/settings/settings.models.sso.test.ts
new file mode 100644
index 0000000000..daa84420af
--- /dev/null
+++ b/apps/erp/app/modules/settings/settings.models.sso.test.ts
@@ -0,0 +1,100 @@
+import { describe, expect, it, vi } from "vitest";
+
+// Isolation mock — settings.models transitively imports @carbon/glossary,
+// whose Lingui `msg` macro calls only work under the app's vite macro
+// transform. The validator under test never touches glossary content.
+vi.mock("@carbon/glossary", () => ({
+ getDefinitionText: vi.fn(),
+ getEntry: vi.fn(),
+ getTermText: vi.fn(),
+ glossaryEntries: [],
+ hasEntry: vi.fn(() => false),
+ listEntries: vi.fn(() => []),
+ lookupEntry: vi.fn(),
+ termSlug: vi.fn(),
+ terms: {}
+}));
+
+const { ssoConnectionValidator, ssoDomainValidator } = await import(
+ "./settings.models"
+);
+
+// Form-shaped input: zfd.text turns "" into undefined exactly like an empty
+// form field, so tests pass strings the way the route action receives them.
+function parse(input: { metadataUrl?: string; metadataXml?: string }) {
+ return ssoConnectionValidator.safeParse(input);
+}
+
+function parseDomain(domain: string) {
+ return ssoDomainValidator.safeParse({ domain });
+}
+
+const URL = "https://idp.example.com/metadata";
+
+describe("ssoDomainValidator", () => {
+ it("normalizes to a trimmed lowercase domain", () => {
+ const result = parseDomain(" Example.COM ");
+ expect(result.success).toBe(true);
+ if (result.success) {
+ expect(result.data.domain).toBe("example.com");
+ }
+ });
+
+ it("accepts subdomains, hyphens, and multi-label TLDs", () => {
+ expect(parseDomain("sub.example.com").success).toBe(true);
+ expect(parseDomain("my-domain.co.uk").success).toBe(true);
+ });
+
+ it("accepts a punycode (xn--) internationalized domain", () => {
+ expect(parseDomain("xn--mnchen-3ya.de").success).toBe(true);
+ });
+
+ it("rejects a full email address typed as a domain", () => {
+ expect(parseDomain("[email protected]").success).toBe(false);
+ });
+
+ it("rejects a bare hostname without a TLD", () => {
+ expect(parseDomain("localhost").success).toBe(false);
+ });
+
+ it("rejects a domain containing spaces", () => {
+ expect(parseDomain("exa mple.com").success).toBe(false);
+ });
+
+ it("rejects public email providers, case-insensitively", () => {
+ expect(parseDomain("gmail.com").success).toBe(false);
+ expect(parseDomain("GMAIL.com").success).toBe(false);
+ expect(parseDomain("outlook.com").success).toBe(false);
+ });
+
+ it("accepts a company subdomain of a public provider's TLD-alike", () => {
+ // The denylist is exact-match: gmail.com is blocked, mygmail.com is a
+ // legitimate (if odd) claim the DNS challenge will adjudicate.
+ expect(parseDomain("mygmail.com").success).toBe(true);
+ });
+});
+
+describe("ssoConnectionValidator — metadata XOR", () => {
+ it("accepts metadata URL alone", () => {
+ expect(parse({ metadataUrl: URL }).success).toBe(true);
+ });
+
+ it("accepts metadata XML alone", () => {
+ expect(parse({ metadataXml: "<EntityDescriptor/>" }).success).toBe(true);
+ });
+
+ it("rejects BOTH metadata URL and XML", () => {
+ expect(
+ parse({ metadataUrl: URL, metadataXml: "<EntityDescriptor/>" }).success
+ ).toBe(false);
+ });
+
+ it("rejects NEITHER metadata URL nor XML (empty form fields become undefined)", () => {
+ // zfd.text("") -> undefined is the actual empty-field shape from a form.
+ expect(parse({ metadataUrl: "", metadataXml: "" }).success).toBe(false);
+ });
+
+ it("rejects a metadata URL that is not a valid URL", () => {
+ expect(parse({ metadataUrl: "not-a-url" }).success).toBe(false);
+ });
+});
diff --git a/apps/erp/app/modules/settings/settings.models.ts b/apps/erp/app/modules/settings/settings.models.ts
index 00a298ea74..11b89cccad 100644
--- a/apps/erp/app/modules/settings/settings.models.ts
+++ b/apps/erp/app/modules/settings/settings.models.ts
@@ -66,6 +66,85 @@ export const apiKeyValidator = z.object({
)
});
+const ssoDomainRegex = /^[a-z0-9.-]+\.[a-z]{2,}$/;
+
+/**
+ * Consumer email providers no company can own. The DNS TXT challenge is the
+ * real gate (nobody can publish a record under gmail.com), but refusing these
+ * at validation gives an instant, honest error instead of a claim that can
+ * never verify. ASCII, lowercase — compared after normalization.
+ */
+export const PUBLIC_EMAIL_DOMAINS = [
+ "gmail.com",
+ "googlemail.com",
+ "outlook.com",
+ "hotmail.com",
+ "live.com",
+ "msn.com",
+ "yahoo.com",
+ "ymail.com",
+ "icloud.com",
+ "me.com",
+ "mac.com",
+ "aol.com",
+ "proton.me",
+ "protonmail.com",
+ "pm.me",
+ "gmx.com",
+ "gmx.net",
+ "mail.com",
+ "zoho.com",
+ "yandex.com",
+ "qq.com",
+ "163.com",
+ "126.com"
+] as const;
+
+/**
+ * SAML SSO connection form. The IdP metadata comes in as EITHER a metadata URL
+ * or raw metadata XML (exactly one — GoTrue takes one or the other). Email
+ * domains are managed separately per-domain with a DNS ownership challenge
+ * (ssoDomainValidator), not on this form.
+ */
+export const ssoConnectionValidator = z
+ .object({
+ metadataUrl: zfd.text(
+ z.string().url({ message: "Must be a valid URL" }).optional()
+ ),
+ metadataXml: zfd.text(z.string().optional())
+ })
+ .refine(
+ (input) => Boolean(input.metadataUrl) !== Boolean(input.metadataXml),
+ {
+ message: "Provide either a metadata URL or metadata XML (exactly one)",
+ path: ["metadataUrl"]
+ }
+ );
+
+/**
+ * A single SSO email domain claim. Lowercased ASCII hostname (enter
+ * internationalized domains in punycode `xn--` form); public email providers
+ * are refused outright.
+ */
+export const ssoDomainValidator = z.object({
+ domain: zfd
+ .text(z.string().min(1, { message: "Domain is required" }))
+ .transform((value) => value.trim().toLowerCase())
+ .refine((domain) => ssoDomainRegex.test(domain) && !domain.includes("@"), {
+ message: "Must be a valid hostname like example.com (no @ or spaces)"
+ })
+ .refine(
+ (domain) =>
+ !PUBLIC_EMAIL_DOMAINS.includes(
+ domain as (typeof PUBLIC_EMAIL_DOMAINS)[number]
+ ),
+ {
+ message:
+ "Public email providers cannot be registered for single sign-on"
+ }
+ )
+});
+
const companyAddress = {
name: z.string().trim().min(1, { message: "Name is required" }),
addressLine1: z.string().min(1, { message: "Address is required" }),
diff --git a/apps/erp/app/modules/settings/ui/Security/SecurityUpgradeOverlay.tsx b/apps/erp/app/modules/settings/ui/Security/SecurityUpgradeOverlay.tsx
deleted file mode 100644
index 474cc3c6ad..0000000000
--- a/apps/erp/app/modules/settings/ui/Security/SecurityUpgradeOverlay.tsx
+++ /dev/null
@@ -1,74 +0,0 @@
-import {
- Card,
- CardDescription,
- CardHeader,
- CardTitle,
- Heading,
- HStack,
- Switch,
- VStack
-} from "@carbon/react";
-import { Trans } from "@lingui/react/macro";
-import { LuShieldCheck } from "react-icons/lu";
-import {
- UpgradeOverlay,
- UpgradeOverlayActions,
- UpgradeOverlayCard,
- UpgradeOverlayContent,
- UpgradeOverlayDescription,
- UpgradeOverlayIcon,
- UpgradeOverlayPreview,
- UpgradeOverlayTitle,
- UpgradeOverlayUpgradeButton
-} from "~/components/UpgradeOverlay";
-
-export default function SecurityUpgradeOverlay() {
- return (
- <UpgradeOverlay>
- <UpgradeOverlayPreview>
- <VStack spacing={4} className="py-12 px-4 max-w-[60rem] mx-auto gap-4">
- <Heading size="h3">
- <Trans>Security</Trans>
- </Heading>
- <Card>
- <CardHeader>
- <HStack className="justify-between items-center">
- <div>
- <CardTitle>
- <Trans>Two-Factor Authentication Enforcement</Trans>
- </CardTitle>
- <CardDescription>
- <Trans>
- Require an authenticator app before anyone can open this
- company. Their other companies are unaffected.
- </Trans>
- </CardDescription>
- </div>
- <Switch checked={false} disabled />
- </HStack>
- </CardHeader>
- </Card>
- </VStack>
- </UpgradeOverlayPreview>
- <UpgradeOverlayCard>
- <UpgradeOverlayIcon>
- <LuShieldCheck className="size-6 text-muted-foreground" />
- </UpgradeOverlayIcon>
- <UpgradeOverlayContent>
- <UpgradeOverlayTitle>
- <Trans>Security</Trans>
- </UpgradeOverlayTitle>
- <UpgradeOverlayDescription>
- <Trans>
- Protect your company with advanced security controls like
- two-factor authentication enforcement.
- </Trans>
- </UpgradeOverlayDescription>
- </UpgradeOverlayContent>
- <UpgradeOverlayActions>
- <UpgradeOverlayUpgradeButton />
- </UpgradeOverlayActions>
- </UpgradeOverlayCard>
- </UpgradeOverlay>
- );
-}
diff --git a/apps/erp/app/modules/settings/ui/Security/index.ts b/apps/erp/app/modules/settings/ui/Security/index.ts
index c7d01d5f61..34d4afb277 100644
--- a/apps/erp/app/modules/settings/ui/Security/index.ts
+++ b/apps/erp/app/modules/settings/ui/Security/index.ts
@@ -1,2 +1 @@
-export { default as SecurityUpgradeOverlay } from "./SecurityUpgradeOverlay";
export { default as TwoFactorUpgradeDialog } from "./TwoFactorUpgradeDialog";
diff --git a/apps/erp/app/modules/users/users.server.ts b/apps/erp/app/modules/users/users.server.ts
index 653da2d7ea..588c3f620e 100644
--- a/apps/erp/app/modules/users/users.server.ts
+++ b/apps/erp/app/modules/users/users.server.ts
@@ -17,8 +17,11 @@ import { now, parseAbsolute } from "@internationalized/date";
// per-request memoization.
export { getUserClaims } from "@carbon/auth/users.server";
+import {
+ getSsoConnection,
+ uncoveredSsoDomainError
+} from "@carbon/ee/sso.server";
import { getLogger } from "@carbon/logger";
-
import type { SupabaseClient } from "@supabase/supabase-js";
import { redirect } from "react-router";
import { getSupplierContact } from "~/modules/purchasing";
@@ -54,6 +57,35 @@ export function isControlledInviteExpired(createdAt: string): boolean {
return expiresAt.compare(now("UTC")) < 0;
}
+/**
+ * Once a company has an active SSO connection, employee invites must stay on
+ * its covered domains — an uncovered invite would silently bypass the IdP via
+ * magic-link auth. Customer/supplier invites are external by nature and are
+ * not constrained. Scoped to THIS company's connection: a domain covered by
+ * another company's connection is neither required nor blocked here.
+ * Returns the refusal message for the email field, or null when the invite
+ * may proceed. A failed connection read refuses (fail closed) rather than
+ * guessing.
+ */
+export async function getSsoInviteDomainError(
+ serviceRole: SupabaseClient<Database>,
+ companyId: string,
+ email: string
+): Promise<string | null> {
+ const connection = await getSsoConnection(serviceRole, companyId);
+ if (connection.error) {
+ logger.error("Failed to read SSO connection for invite check", {
+ companyId,
+ error: connection.error
+ });
+ return "Could not verify the company's single sign-on configuration. Try again.";
+ }
+ if (!connection.data) {
+ return null;
+ }
+ return uncoveredSsoDomainError(connection.data.domains ?? [], email);
+}
+
export async function acceptInvite(
serviceRole: SupabaseClient<Database>,
code: string,
diff --git a/apps/erp/app/routes/_public+/callback.tsx b/apps/erp/app/routes/_public+/callback.tsx
index c860ad1906..026b3439cd 100644
--- a/apps/erp/app/routes/_public+/callback.tsx
+++ b/apps/erp/app/routes/_public+/callback.tsx
@@ -3,6 +3,7 @@ import {
callbackValidator,
carbonClient,
error,
+ getCarbon,
safeRedirect
} from "@carbon/auth";
import { refreshAccessToken } from "@carbon/auth/auth.server";
@@ -17,6 +18,15 @@ import {
setPendingMfaSession
} from "@carbon/auth/session.server";
import { getUserByEmail } from "@carbon/auth/users.server";
+import {
+ deleteJitSsoUser,
+ getSsoConnectionByProviderId,
+ getSsoProviderIdFromSession,
+ isSsoEnabled,
+ isSsoRequiredForEmail,
+ linkSsoIdentityToUser,
+ migrateUserToSso
+} from "@carbon/ee/sso.server";
import { validator } from "@carbon/form";
import { AccountLockout, redis } from "@carbon/kv";
import {
@@ -38,6 +48,7 @@ import {
useSearchParams
} from "react-router";
import { getCompanies, getEmployeeCompanies } from "~/modules/settings";
+import { getDatabaseClient } from "~/services/database.server";
import { path } from "~/utils/path";
export async function loader({ request }: LoaderFunctionArgs) {
@@ -92,9 +103,260 @@ export async function action({ request }: ActionFunctionArgs) {
);
}
+ // ── SSO branch ─────────────────────────────────────────────────────────
+ // A SAML session is company-bound by its provider. Enforce the
+ // provider → company binding and the asserted email's registered domain
+ // BEFORE anything is attached — GoTrue's own checks are not trusted here —
+ // then run the invite-first migration on a first login. Every non-SSO
+ // session falls through to the unchanged path below. Outside Enterprise the
+ // classification (and its admin API call) is skipped entirely.
+ let ssoProviderId: string | null = null;
+ if (isSsoEnabled()) {
+ const authUser = await serviceRole.auth.admin.getUserById(userId);
+ ssoProviderId = authUser.data?.user
+ ? getSsoProviderIdFromSession(authSession.accessToken, authUser.data.user)
+ : null;
+ }
+
+ if (ssoProviderId) {
+ const connection = await getSsoConnectionByProviderId(
+ serviceRole,
+ ssoProviderId
+ );
+ if (!connection.data) {
+ return redirect(
+ path.to.root,
+ await flash(
+ request,
+ error(
+ connection.error,
+ "SAML SSO connection is not active. Contact your administrator."
+ )
+ )
+ );
+ }
+
+ const memberships =
+ (
+ await serviceRole
+ .from("userToCompany")
+ .select("companyId")
+ .eq("userId", userId)
+ ).data ?? [];
+
+ const emailDomain = authSession.email.split("@")[1]?.toLowerCase() ?? "";
+ if (!connection.data.domains.includes(emailDomain)) {
+ // The IdP asserted an email outside its registered domains. Never
+ // attach it; remove the JIT-created orphan — auth user AND the
+ // trigger-created profile rows — so a retry (or a later invite for
+ // this email) starts clean.
+ if (memberships.length === 0) {
+ await deleteJitSsoUser(serviceRole, getDatabaseClient(), userId);
+ }
+ return redirect(
+ path.to.root,
+ await flash(
+ request,
+ error(
+ null,
+ "SAML SSO sign-in rejected: this email domain is not registered for your company's SAML SSO connection."
+ )
+ )
+ );
+ }
+
+ const ssoCompanyId = connection.data.companyId;
+
+ // Link-instead-of-archive: when an ACTIVE account already owns this
+ // email, move the SAML identity onto it and continue as that account —
+ // nothing is deactivated, and magic link keeps working. Safe because the
+ // domain check above bound this assertion to the connection's registered
+ // domains. The duplicate auth user GoTrue just created is deleted; its
+ // tokens die with it, so a fresh session is minted server-side.
+ const existingUser = (
+ await serviceRole
+ .from("user")
+ .select("id")
+ .eq("email", authSession.email.toLowerCase())
+ .neq("id", userId)
+ .eq("active", true)
+ .maybeSingle()
+ ).data;
+
+ if (existingUser) {
+ const linked = await linkSsoIdentityToUser(getDatabaseClient(), {
+ fromUserId: userId,
+ toUserId: existingUser.id
+ });
+ if (linked.error) {
+ return redirect(
+ path.to.root,
+ await flash(
+ request,
+ error(
+ linked.error,
+ "SAML SSO sign-in failed while linking your account. Contact your administrator."
+ )
+ )
+ );
+ }
+ await serviceRole.auth.admin.deleteUser(userId);
+
+ // Server-side magic-link redemption for the linked account — the
+ // token hash never leaves this request and no email is sent.
+ const link = await serviceRole.auth.admin.generateLink({
+ type: "magiclink",
+ email: authSession.email
+ });
+ const tokenHash = link.data?.properties?.hashed_token;
+ const verified = tokenHash
+ ? await getCarbon().auth.verifyOtp({
+ type: "magiclink",
+ token_hash: tokenHash
+ })
+ : null;
+ const linkedSession = verified?.data?.session?.refresh_token
+ ? await refreshAccessToken(
+ verified.data.session.refresh_token,
+ ssoCompanyId,
+ ""
+ )
+ : null;
+ if (!linkedSession) {
+ // The identity IS linked — the next SSO attempt resolves directly
+ // to the existing account, so this is self-healing.
+ return redirect(
+ path.to.root,
+ await flash(
+ request,
+ error(
+ link.error ?? verified?.error,
+ "Your single sign-on identity was linked. Sign in with your work email again to continue."
+ )
+ )
+ );
+ }
+ Object.assign(authSession, linkedSession);
+ const linkedMemberships =
+ (
+ await serviceRole
+ .from("userToCompany")
+ .select("companyId")
+ .eq("userId", authSession.userId)
+ ).data ?? [];
+ memberships.length = 0;
+ memberships.push(...linkedMemberships);
+ }
+
+ const isMember = memberships.some((m) => m.companyId === ssoCompanyId);
+
+ if (!isMember) {
+ // ilike for the case fold only (invite emails are stored as typed, the
+ // asserted email is lowercased) — escape LIKE metacharacters so %/_ in
+ // an address can never act as wildcards and match someone else's invite.
+ const inviteEmailPattern = authSession.email.replace(
+ /[\\%_]/g,
+ (match) => `\\${match}`
+ );
+ const invite = await serviceRole
+ .from("invite")
+ .select("id, companyId, role, permissions")
+ .ilike("email", inviteEmailPattern)
+ .eq("companyId", ssoCompanyId)
+ .is("acceptedAt", null)
+ .is("revokedAt", null)
+ .maybeSingle();
+
+ if (!invite.data) {
+ // Only ever delete the throwaway duplicate — never a linked account.
+ // The whole throwaway goes: auth user plus its trigger-created
+ // profile rows, or the leftover profile makes the email un-invitable.
+ if (memberships.length === 0 && authSession.userId === userId) {
+ await deleteJitSsoUser(serviceRole, getDatabaseClient(), userId);
+ }
+ return redirect(
+ path.to.root,
+ await flash(
+ request,
+ error(
+ invite.error,
+ `SAML SSO sign-in succeeded but no invite exists for ${authSession.email}. Contact your administrator.`
+ )
+ )
+ );
+ }
+
+ const migration = await migrateUserToSso(
+ getDatabaseClient(),
+ serviceRole,
+ {
+ newUserId: authSession.userId,
+ email: authSession.email,
+ companyId: ssoCompanyId,
+ invite: invite.data
+ }
+ );
+
+ if (migration.error) {
+ return redirect(
+ path.to.root,
+ await flash(
+ request,
+ error(
+ migration.error,
+ "SAML SSO sign-in failed while activating your account. Contact your administrator."
+ )
+ )
+ );
+ }
+ }
+
+ // Bind the session to the connection's company (a first login just
+ // created the membership, so the pre-session company resolution above
+ // could not have seen it).
+ const ssoCompany = await serviceRole
+ .from("company")
+ .select("companyGroupId")
+ .eq("id", ssoCompanyId)
+ .maybeSingle();
+ authSession.companyId = ssoCompanyId;
+ authSession.companyGroupId = ssoCompany.data?.companyGroupId ?? "";
+ authSession.ssoProviderId = ssoProviderId;
+
+ await new AccountLockout({ redis }).reset(authSession.email);
+
+ // The IdP owns MFA for SSO sessions, including controlled environments
+ // (user decision — attestation shifts to the IdP policy).
+ authSession.mfaVerified = true;
+
+ const ssoSessionCookie = await setAuthSession(request, { authSession });
+ return redirect(safeRedirect(redirectTo, path.to.authenticatedRoot), {
+ headers: [
+ ["Set-Cookie", ssoSessionCookie],
+ ["Set-Cookie", setCompanyId(ssoCompanyId)]
+ ]
+ });
+ }
+
const user = await getUserByEmail(authSession.email);
if (user?.data) {
+ // Require-SSO gate: this is the non-SSO path (magic link, Google/Azure
+ // OAuth, magic links minted elsewhere) — a covered + enforced domain may
+ // only authenticate via SSO, so refuse before any session state is minted.
+ if (await isSsoRequiredForEmail(serviceRole, authSession.email)) {
+ return redirect(
+ path.to.root,
+ await flash(
+ request,
+ error(
+ null,
+ "Your organization requires single sign-on. Sign in with your work email to continue."
+ )
+ )
+ );
+ }
+
// Genuine login (magic-link / OAuth first factor verified) — clear any
// accumulated per-account lockout state (NIST 3.1.8 reset-on-success). Runs
// before the TOTP gate so an MFA-enrolled user's counter clears too.
diff --git a/apps/erp/app/routes/_public+/login.tsx b/apps/erp/app/routes/_public+/login.tsx
index 652c17b54b..796b6aea30 100644
--- a/apps/erp/app/routes/_public+/login.tsx
+++ b/apps/erp/app/routes/_public+/login.tsx
@@ -16,6 +16,7 @@ import {
signInWithBypassEmail,
verifyAuthSession
} from "@carbon/auth/auth.server";
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
import {
clearAuthCookies,
flash,
@@ -24,6 +25,7 @@ import {
} from "@carbon/auth/session.server";
import { getUserByEmail } from "@carbon/auth/users.server";
import { sendVerificationCode } from "@carbon/auth/verification.server";
+import { isSsoEnabled, isSsoRequiredForEmail } from "@carbon/ee/sso.server";
import { Hidden, Input, Submit, ValidatedForm, validator } from "@carbon/form";
import { AccountLockout, Ratelimit, redis } from "@carbon/kv";
import {
@@ -72,6 +74,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
const hasOutlookAuth = isAuthProviderEnabled("azure");
const hasGoogleAuth = isAuthProviderEnabled("google");
const hasPasskeyAuth = isAuthProviderEnabled("passkey");
+ const hasSsoAuth = isSsoEnabled();
if (authSession) {
if (await verifyAuthSession(authSession)) {
@@ -79,7 +82,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
}
const cookieHeaders = await clearAuthCookies(request);
return data(
- { hasOutlookAuth, hasGoogleAuth, hasPasskeyAuth },
+ { hasOutlookAuth, hasGoogleAuth, hasPasskeyAuth, hasSsoAuth },
{ headers: cookieHeaders }
);
}
@@ -87,7 +90,8 @@ export async function loader({ request }: LoaderFunctionArgs) {
return {
hasOutlookAuth,
hasGoogleAuth,
- hasPasskeyAuth
+ hasPasskeyAuth,
+ hasSsoAuth
};
}
@@ -210,6 +214,24 @@ export async function action({ request }: ActionFunctionArgs) {
}
}
+ // Require-SSO gate: a covered + enforced domain may only authenticate via
+ // SSO — refuse the magic link (and the signup verification-code path) here,
+ // server-side. Deliberately AFTER the dev-bypass branch above so local dev
+ // keeps working.
+ if (await isSsoRequiredForEmail(getCarbonServiceRole(), email)) {
+ const SSO_REQUIRED_MESSAGE =
+ "Your organization requires single sign-on. Sign in with your work email to continue.";
+ logAuthEvent("login_failed", {
+ actor: email,
+ ip,
+ reason: "sso required for domain"
+ });
+ return data(
+ { success: false, message: SSO_REQUIRED_MESSAGE },
+ await flash(request, error(null, SSO_REQUIRED_MESSAGE))
+ );
+ }
+
if (user.data && user.data.active) {
const magicLink = await sendMagicLink(email);
@@ -253,16 +275,19 @@ export async function action({ request }: ActionFunctionArgs) {
export default function LoginRoute() {
const { t } = useLingui();
- const { hasOutlookAuth, hasGoogleAuth, hasPasskeyAuth } =
+ const { hasOutlookAuth, hasGoogleAuth, hasPasskeyAuth, hasSsoAuth } =
useLoaderData<typeof loader>();
const [searchParams] = useSearchParams();
const redirectTo = searchParams.get("redirectTo") ?? undefined;
+ const emailParam = searchParams.get("email") ?? undefined;
const [mode, setMode] = useState<"login" | "signup" | "verify">("login");
const [signupEmail, setSignupEmail] = useState<string>("");
const [turnstileToken, setTurnstileToken] = useState<string>("");
const [passkeySupported, setPasskeySupported] = useState(false);
const [passkeyLoading, setPasskeyLoading] = useState(false);
+ const [ssoLoading, setSsoLoading] = useState(false);
+ const [ssoError, setSsoError] = useState<string | null>(null);
const conditionalAbortRef = useRef<AbortController | null>(null);
const fetcher = useFetcher<Result & { mode?: string; email?: string }>();
@@ -416,6 +441,77 @@ export default function LoginRoute() {
}
};
+ // Invisible SSO fork: runs as the email form's onSubmit (after validation).
+ // If the entered email's domain is an SSO-registered domain, suppress the
+ // magic-link POST and route the browser to the identity provider instead.
+ // Otherwise it returns and the form submits normally (magic link / signup).
+ const onSubmitEmail = async (
+ formData: { email?: string },
+ event: React.FormEvent<HTMLFormElement>
+ ) => {
+ // No SSO configured for this deployment — never pay a round-trip.
+ if (!hasSsoAuth) return;
+
+ setSsoError(null);
+ const email = String(formData.email ?? "")
+ .trim()
+ .toLowerCase();
+ const domain = email.split("@")[1];
+ if (!domain) return; // let the server validator handle a bad address
+
+ let enabled = false;
+ try {
+ const body = new FormData();
+ body.append("email", email);
+ const response = await fetch(path.to.api.ssoCheck, {
+ method: "POST",
+ body
+ });
+ enabled = response.ok ? Boolean((await response.json()).enabled) : false;
+ } catch {
+ // Fall through to the magic-link path; the server-side require-SSO gate
+ // is the defense-in-depth that still refuses an SSO-required domain.
+ enabled = false;
+ }
+
+ if (!enabled) return; // ordinary domain — magic-link submit proceeds
+
+ // SSO domain — stop the magic-link POST and hand off to the IdP.
+ event.preventDefault();
+ setSsoLoading(true);
+ const { data, error } = await carbonClient.auth.signInWithSSO({
+ domain,
+ options: {
+ redirectTo: `${window.location.origin}/callback${
+ redirectTo ? `?redirectTo=${redirectTo}` : ""
+ }`
+ }
+ });
+
+ if (error) {
+ setSsoError(error.message);
+ setSsoLoading(false);
+ return;
+ }
+
+ if (data?.url) {
+ // Prefill the user's email at the IdP so they don't retype it. The
+ // returned url is the IdP's SAML redirect-binding endpoint; login_hint is
+ // an extra query param (URL-encoded by URLSearchParams) that Okta/Entra
+ // honor and other IdPs safely ignore — it is not covered by the SAML
+ // request signature, so appending it never invalidates the request.
+ let target = data.url;
+ try {
+ const url = new URL(data.url);
+ url.searchParams.set("login_hint", email);
+ target = url.toString();
+ } catch {
+ // Non-absolute url — navigate to it unchanged.
+ }
+ window.location.href = target; // navigate away; keep the loading state
+ }
+ };
+
return (
<>
<div className="flex justify-center mb-8">
@@ -473,20 +569,24 @@ export default function LoginRoute() {
<ValidatedForm
fetcher={fetcher}
validator={magicLinkValidator}
- defaultValues={{ redirectTo }}
+ defaultValues={{ redirectTo, email: emailParam }}
method="post"
action="/login"
+ onSubmit={onSubmitEmail}
>
<Hidden name="redirectTo" value={redirectTo} type="hidden" />
<Hidden name="turnstileToken" value={turnstileToken} />
<VStack spacing={2}>
- {fetcher.data?.success === false && fetcher.data?.message && (
+ {((fetcher.data?.success === false && fetcher.data?.message) ||
+ ssoError) && (
<Alert variant="destructive">
<LuCircleAlert className="w-4 h-4" />
<AlertTitle>
<Trans>Authentication Error</Trans>
</AlertTitle>
- <AlertDescription>{fetcher.data?.message}</AlertDescription>
+ <AlertDescription>
+ {ssoError ?? fetcher.data?.message}
+ </AlertDescription>
</Alert>
)}
@@ -548,15 +648,16 @@ export default function LoginRoute() {
<Submit
isDisabled={
fetcher.state !== "idle" ||
+ ssoLoading ||
(!!CLOUDFLARE_TURNSTILE_SITE_KEY && !turnstileToken)
}
- isLoading={fetcher.state === "submitting"}
+ isLoading={fetcher.state === "submitting" || ssoLoading}
size="lg"
className="w-full"
withBlocker={false}
variant="secondary"
>
- <Trans>Sign in with Email</Trans>
+ <Trans>Continue</Trans>
</Submit>
{!!CLOUDFLARE_TURNSTILE_SITE_KEY && (
<div className="w-full flex justify-center">
diff --git a/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json b/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json
index 5bd34c3dcd..0c3437fd56 100644
--- a/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json
+++ b/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json
@@ -1,5 +1,5 @@
{
- "generated": "2026-08-28T16:35:40.658Z",
+ "generated": "2026-08-28T17:37:13.495Z",
"totalTools": 1449,
"modules": 15,
"tools": [
@@ -44952,7 +44952,7 @@
"module": "settings",
"classification": "WRITE",
"description": "upsert api key",
- "paramCount": 49,
+ "paramCount": 50,
"serviceParams": [
"client",
"apiKey"
@@ -44965,6 +44965,9 @@
"schema": {
"type": "object",
"properties": {
+ "domain": {
+ "type": "string"
+ },
"next": {
"type": "string"
},
@@ -45138,6 +45141,7 @@
}
},
"required": [
+ "domain",
"next",
"digitalQuoteEnabled",
"digitalQuoteIncludesPurchaseOrders",
diff --git a/apps/erp/app/routes/api+/passkey.authenticate.verify.ts b/apps/erp/app/routes/api+/passkey.authenticate.verify.ts
index 9143e179bb..3c288a870e 100644
--- a/apps/erp/app/routes/api+/passkey.authenticate.verify.ts
+++ b/apps/erp/app/routes/api+/passkey.authenticate.verify.ts
@@ -8,6 +8,7 @@ import {
setAuthSession,
setPendingMfaSession
} from "@carbon/auth/session.server";
+import { isSsoRequiredForEmail } from "@carbon/ee/sso.server";
import { AccountLockout, redis } from "@carbon/kv";
import type { WebAuthnCredential } from "@simplewebauthn/browser";
import type { ActionFunctionArgs } from "react-router";
@@ -106,6 +107,19 @@ export async function action({ request }: ActionFunctionArgs) {
});
}
+ // Require-SSO gate: a covered + enforced domain may only authenticate via
+ // SSO — refuse the passkey before any session is minted. The login page
+ // surfaces this message via its existing error toast.
+ if (await isSsoRequiredForEmail(serviceRole, authUser.user.email)) {
+ return data(
+ error(
+ null,
+ "Your organization requires single sign-on. Sign in with your work email to continue."
+ ),
+ { status: 403 }
+ );
+ }
+
const authSession = await signInWithPasskey(
credRow.userId,
authUser.user.email
diff --git a/apps/erp/app/routes/api+/sso.check.ts b/apps/erp/app/routes/api+/sso.check.ts
new file mode 100644
index 0000000000..535917f891
--- /dev/null
+++ b/apps/erp/app/routes/api+/sso.check.ts
@@ -0,0 +1,49 @@
+import { assertIsPost } from "@carbon/auth";
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import { getSsoConnectionByDomain, isSsoEnabled } from "@carbon/ee/sso.server";
+import { Ratelimit, redis } from "@carbon/kv";
+import type { ActionFunctionArgs } from "react-router";
+import { data } from "react-router";
+
+// Public endpoint: given an email, answers only whether SSO is configured for
+// its domain and whether that connection enforces SSO-only sign-in.
+// Deliberately returns two booleans — no other connection details.
+export async function action({ request }: ActionFunctionArgs) {
+ assertIsPost(request);
+
+ if (!isSsoEnabled()) {
+ return data({ enabled: false, required: false });
+ }
+
+ const ip = request.headers.get("x-forwarded-for") ?? "127.0.0.1";
+ const ratelimit = new Ratelimit({
+ redis,
+ limiter: Ratelimit.slidingWindow(20, "1 h"),
+ analytics: true
+ });
+ const { success } = await ratelimit.limit(`sso-check:${ip}`);
+
+ if (!success) {
+ return data({ enabled: false, required: false }, { status: 429 });
+ }
+
+ const formData = await request.formData();
+ const email = String(formData.get("email") ?? "")
+ .trim()
+ .toLowerCase();
+ const domain = email.split("@")[1];
+
+ if (!domain) {
+ return data({ enabled: false, required: false });
+ }
+
+ const connection = await getSsoConnectionByDomain(
+ getCarbonServiceRole(),
+ domain
+ );
+
+ return data({
+ enabled: Boolean(connection.data),
+ required: connection.data?.requireSso === true
+ });
+}
diff --git a/apps/erp/app/routes/x+/_layout.tsx b/apps/erp/app/routes/x+/_layout.tsx
index becace6d3e..359d0a4783 100644
--- a/apps/erp/app/routes/x+/_layout.tsx
+++ b/apps/erp/app/routes/x+/_layout.tsx
@@ -260,10 +260,14 @@ export async function loader({ request }: LoaderFunctionArgs) {
// non-privileged accounts), so a company cannot switch it back off.
const mfaRequired =
CONTROLLED_ENVIRONMENT || companySettings.data?.requireMfa === true;
+ // SSO sessions trust the IdP for MFA in all environments, including
+ // controlled — user decision: attestation is delegated to the IdP policy.
+ const ssoMfaExempt = Boolean(authSession.ssoProviderId);
// Redis-cached + memoized per read; only queried when it could gate.
- const mfaEnrolled = mfaRequired
- ? await userHasVerifiedTotpFactor(userId)
- : true;
+ const mfaEnrolled =
+ mfaRequired && !ssoMfaExempt
+ ? await userHasVerifiedTotpFactor(userId)
+ : true;
return data({
session: {
diff --git a/apps/erp/app/routes/x+/settings+/security.tsx b/apps/erp/app/routes/x+/settings+/security.tsx
index ecb531a643..841f3fa1ff 100644
--- a/apps/erp/app/routes/x+/settings+/security.tsx
+++ b/apps/erp/app/routes/x+/settings+/security.tsx
@@ -9,25 +9,50 @@ import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { flash } from "@carbon/auth/session.server";
import { requirePlan } from "@carbon/ee/plan.server";
import {
+ getSamlSpUrls,
+ getSsoConnection,
+ getSsoDomains,
+ getTxtRecord,
+ isSsoEnabled
+} from "@carbon/ee/sso.server";
+import { ValidatedForm } from "@carbon/form";
+import {
+ Button,
Card,
+ CardContent,
CardDescription,
+ CardFooter,
CardHeader,
CardTitle,
+ Copy,
+ cn,
Heading,
HStack,
+ Modal,
+ ModalBody,
+ ModalContent,
+ ModalFooter,
+ ModalHeader,
+ ModalOverlay,
+ ModalTitle,
ScrollArea,
Switch,
VStack
} from "@carbon/react";
import { msg } from "@lingui/core/macro";
import { Trans, useLingui } from "@lingui/react/macro";
+import { type ReactNode, useEffect, useState } from "react";
+import { LuShieldCheck } from "react-icons/lu";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";
-import { data, Link, useFetcher } from "react-router";
+import { data, Link, redirect, useFetcher, useLoaderData } from "react-router";
+import { Hidden, Input, Submit, TextArea } from "~/components/Form";
+import { UpgradeOverlaySection } from "~/components/UpgradeOverlay";
import { usePermissions } from "~/hooks";
import { usePlanGate } from "~/hooks/usePlanGate";
import { useSettings } from "~/hooks/useSettings";
import {
- SecurityUpgradeOverlay,
+ ssoConnectionValidator,
+ ssoDomainValidator,
updateRequireMfaSetting
} from "~/modules/settings";
import { sendMfaRequiredEmails } from "~/services/mfa-email.server";
@@ -40,11 +65,85 @@ export const handle: Handle = {
};
export async function loader({ request }: LoaderFunctionArgs) {
- await requirePermissions(request, {
+ const { client, companyId } = await requirePermissions(request, {
view: "settings",
role: "employee"
});
- return null;
+
+ // The SP URLs are un-prefixed on purpose: GoTrue self-declares its SP
+ // entityID and ACS from API_EXTERNAL_URL (no /auth/v1) and validates each
+ // assertion's Destination against that exact URL. Kong routes /sso/ for this
+ // (kong.yml auth-v1-sso).
+ const { acsUrl, metadataUrl } = getSamlSpUrls();
+
+ // The whole SSO surface keys off isSsoEnabled() (Enterprise edition + `sso`
+ // in AUTH_PROVIDERS) — the component gates the section on this flag rather
+ // than on edition alone, so a deployment without the provider enabled never
+ // shows a setup form whose action would refuse.
+ const ssoEnabled = isSsoEnabled();
+ if (!ssoEnabled) {
+ return {
+ ssoEnabled,
+ connection: null,
+ domains: [],
+ acsUrl,
+ metadataUrl
+ };
+ }
+
+ const connection = await getSsoConnection(client, companyId);
+ if (connection.error) {
+ throw redirect(
+ path.to.settings,
+ await flash(
+ request,
+ error(connection.error, "Failed to load SAML SSO connection")
+ )
+ );
+ }
+
+ // Domain claims with their DNS challenge instructions. The token is not a
+ // secret (once published it is world-readable in DNS), so shipping the
+ // ready-to-copy record to the client is fine.
+ let domains: {
+ id: string;
+ domain: string;
+ status: string;
+ txtHost: string;
+ txtValue: string;
+ }[] = [];
+ if (connection.data) {
+ const domainRows = await getSsoDomains(client, companyId);
+ if (domainRows.error) {
+ throw redirect(
+ path.to.settings,
+ await flash(
+ request,
+ error(domainRows.error, "Failed to load SAML SSO domains")
+ )
+ );
+ }
+ domains = (domainRows.data ?? [])
+ .filter((row) => row.connectionId === connection.data?.id)
+ .map((row) => {
+ const txt = getTxtRecord(row.domain, row.verificationToken);
+ return {
+ id: row.id,
+ domain: row.domain,
+ status: row.status,
+ txtHost: txt.host,
+ txtValue: txt.value
+ };
+ });
+ }
+
+ return {
+ ssoEnabled,
+ connection: connection.data,
+ domains,
+ acsUrl,
+ metadataUrl
+ };
}
export async function action({ request }: ActionFunctionArgs) {
@@ -116,75 +215,482 @@ export async function action({ request }: ActionFunctionArgs) {
);
}
+function StatusDot({
+ tone,
+ children
+}: {
+ tone: "green" | "amber" | "gray";
+ children: ReactNode;
+}) {
+ const toneClass = {
+ green: "bg-emerald-500 shadow-[0_0_0_3px_rgb(16_185_129_/_0.15)]",
+ amber: "bg-amber-500 shadow-[0_0_0_3px_rgb(245_158_11_/_0.15)]",
+ gray: "bg-muted-foreground/40"
+ }[tone];
+
+ return (
+ <span className="inline-flex items-center gap-2 text-xs font-medium text-muted-foreground">
+ <span className={cn("size-2 rounded-full", toneClass)} />
+ {children}
+ </span>
+ );
+}
+
+function ConnectionStatus({ active }: { active: boolean }) {
+ return (
+ <StatusDot tone={active ? "green" : "gray"}>
+ {active ? <Trans>Active</Trans> : <Trans>Not configured</Trans>}
+ </StatusDot>
+ );
+}
+
+function CopyableField({ label, value }: { label: string; value: string }) {
+ return (
+ <div className="flex flex-col gap-1.5 w-full">
+ <span className="text-sm font-medium text-foreground">{label}</span>
+ <div className="flex items-center gap-1 h-10 w-full rounded-md border border-input bg-muted/40 pl-3 pr-1">
+ <span className="flex-1 truncate font-mono text-sm text-muted-foreground">
+ {value}
+ </span>
+ <Copy text={value} />
+ </div>
+ </div>
+ );
+}
+
+function SsoDomainRow({
+ domain,
+ canEdit
+}: {
+ domain: {
+ id: string;
+ domain: string;
+ status: string;
+ txtHost: string;
+ txtValue: string;
+ };
+ canEdit: boolean;
+}) {
+ const { t } = useLingui();
+ const fetcher = useFetcher<{}>();
+ const isPending = domain.status !== "verified";
+ const isBusy = fetcher.state !== "idle";
+ const submitting = fetcher.formData?.get("intent");
+
+ return (
+ <div className="w-full rounded-md border border-border p-4">
+ <HStack className="w-full justify-between items-center">
+ <HStack spacing={2}>
+ <span className="text-sm font-medium font-mono">{domain.domain}</span>
+ <StatusDot tone={isPending ? "amber" : "green"}>
+ {isPending ? <Trans>Pending</Trans> : <Trans>Verified</Trans>}
+ </StatusDot>
+ </HStack>
+ <HStack spacing={2}>
+ {isPending && (
+ <fetcher.Form method="post" action={path.to.sso}>
+ <input type="hidden" name="intent" value="verifyDomain" />
+ <input type="hidden" name="domainId" value={domain.id} />
+ <Button
+ type="submit"
+ variant="secondary"
+ isLoading={isBusy && submitting === "verifyDomain"}
+ isDisabled={!canEdit || isBusy}
+ >
+ <Trans>Verify</Trans>
+ </Button>
+ </fetcher.Form>
+ )}
+ <fetcher.Form method="post" action={path.to.sso}>
+ <input type="hidden" name="intent" value="removeDomain" />
+ <input type="hidden" name="domainId" value={domain.id} />
+ <Button
+ type="submit"
+ variant="ghost"
+ isLoading={isBusy && submitting === "removeDomain"}
+ isDisabled={!canEdit || isBusy}
+ >
+ <Trans>Remove</Trans>
+ </Button>
+ </fetcher.Form>
+ </HStack>
+ </HStack>
+ {isPending && (
+ <VStack spacing={2} className="mt-4">
+ <p className="text-sm text-muted-foreground">
+ <Trans>
+ Add this TXT record at your DNS host, then click Verify. DNS
+ changes can take a few minutes to propagate.
+ </Trans>
+ </p>
+ <p className="text-sm text-muted-foreground">
+ <Trans>
+ Your DNS provider may auto-append your domain to the record name —
+ if so, enter only the part before it (e.g. _carbon-challenge plus
+ any subdomain).
+ </Trans>
+ </p>
+ <CopyableField label={t`Host`} value={domain.txtHost} />
+ <CopyableField label={t`Value`} value={domain.txtValue} />
+ </VStack>
+ )}
+ </div>
+ );
+}
+
export default function Security() {
+ const { ssoEnabled, connection, domains, acsUrl, metadataUrl } =
+ useLoaderData<typeof loader>();
const { t } = useLingui();
const permissions = usePermissions();
const canEdit = permissions.can("update", "settings");
const mfaFetcher = useFetcher<{}>();
const settings = useSettings();
const requireMfa = settings.requireMfa === true;
+ const [deactivateModalOpen, setDeactivateModalOpen] = useState(false);
+ const deactivateFetcher = useFetcher<{}>();
+ const requireSsoFetcher = useFetcher<{}>();
+ // The IdP form posts to the action-only /settings/sso route. Submitting
+ // through a fetcher keeps that off the navigation stack — a plain form
+ // submit is a pathname change, which Submit's unsaved-changes blocker
+ // intercepts as "leaving the page".
+ const connectionFetcher = useFetcher<{}>();
+ const addDomainFetcher = useFetcher<{}>();
const { isGated } = usePlanGate({ feature: "TWO_FACTOR" });
+ // Gate only the 2FA enforcement card — the SSO section is edition-gated
+ // separately (isSsoEnabled), so a plan-gated company must still reach it.
+ const mfaGated = isGated && !CONTROLLED_ENVIRONMENT && !requireMfa;
- if (isGated && !CONTROLLED_ENVIRONMENT && !requireMfa) {
- return <SecurityUpgradeOverlay />;
- }
+ // A successful deactivation redirects and revalidates the loader, so the
+ // connection disappears — close the confirm modal with it instead of
+ // leaving it floating over the setup form. A failed deactivation returns
+ // data (connection still present), so the modal stays open with the error
+ // flash visible.
+ useEffect(() => {
+ if (!connection) setDeactivateModalOpen(false);
+ }, [connection]);
+
+ const twoFactorCard = (
+ <Card>
+ <CardHeader>
+ <HStack className="justify-between items-center">
+ <div>
+ <CardTitle>
+ <Trans>Two-Factor Authentication Enforcement</Trans>
+ </CardTitle>
+ <CardDescription>
+ {CONTROLLED_ENVIRONMENT ? (
+ <Trans>
+ This is a controlled environment, so two-factor authentication
+ is required for everyone and cannot be turned off.
+ </Trans>
+ ) : (
+ <Trans>
+ Require an authenticator app before anyone can open this
+ company. Their other companies are unaffected. Visit the{" "}
+ <Link
+ to={path.to.employeeAccounts}
+ className="text-primary underline"
+ >
+ employee accounts page
+ </Link>{" "}
+ to see each person's status.
+ </Trans>
+ )}
+ </CardDescription>
+ </div>
+ <Switch
+ checked={CONTROLLED_ENVIRONMENT || requireMfa}
+ onCheckedChange={(checked) =>
+ mfaFetcher.submit(
+ { enabled: String(checked) },
+ { method: "post" }
+ )
+ }
+ disabled={
+ CONTROLLED_ENVIRONMENT || mfaFetcher.state !== "idle" || !canEdit
+ }
+ aria-label={t`Require two-factor authentication`}
+ />
+ </HStack>
+ </CardHeader>
+ </Card>
+ );
return (
<ScrollArea className="w-full h-[calc(100dvh-49px)]">
<VStack
spacing={4}
- className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-4"
+ className="py-12 px-4 max-w-[60rem] h-full mx-auto gap-8"
>
- <Heading size="h3">
- <Trans>Security</Trans>
- </Heading>
- <Card>
- <CardHeader>
- <HStack className="justify-between items-center">
- <div>
+ <div className="flex flex-col gap-1 w-full">
+ <Heading size="h3">
+ <Trans>Security</Trans>
+ </Heading>
+ <p className="text-sm text-muted-foreground text-pretty">
+ <Trans>
+ Manage authentication and sign-in requirements for your company.
+ </Trans>
+ </p>
+ </div>
+ {mfaGated ? (
+ <UpgradeOverlaySection
+ icon={<LuShieldCheck className="size-6 text-muted-foreground" />}
+ title={<Trans>Two-Factor Authentication Enforcement</Trans>}
+ description={
+ <Trans>
+ Protect your company with advanced security controls like
+ two-factor authentication enforcement.
+ </Trans>
+ }
+ >
+ {twoFactorCard}
+ </UpgradeOverlaySection>
+ ) : (
+ twoFactorCard
+ )}
+
+ {ssoEnabled && (
+ <>
+ <div className="flex items-end justify-between gap-4 w-full">
+ <div className="flex flex-col gap-1">
+ <Heading size="h3">
+ <Trans>Single Sign-On</Trans>
+ </Heading>
+ <p className="text-sm text-muted-foreground text-pretty max-w-xl">
+ <Trans>
+ Let members sign in through your identity provider with
+ SAML.
+ </Trans>
+ </p>
+ </div>
+ <ConnectionStatus active={Boolean(connection)} />
+ </div>
+
+ <Card>
+ <CardHeader>
<CardTitle>
- <Trans>Two-Factor Authentication Enforcement</Trans>
+ <Trans>Service Provider Details</Trans>
</CardTitle>
<CardDescription>
- {CONTROLLED_ENVIRONMENT ? (
+ <Trans>
+ Provide these URLs to your identity provider (Okta, Entra
+ ID, Google Workspace, etc.) when registering Carbon as a
+ SAML application.
+ </Trans>
+ </CardDescription>
+ </CardHeader>
+ <CardContent className="gap-4">
+ <CopyableField label={t`ACS URL`} value={acsUrl} />
+ <CopyableField label={t`SP Metadata URL`} value={metadataUrl} />
+ </CardContent>
+ </Card>
+
+ <ValidatedForm
+ className="w-full"
+ validator={ssoConnectionValidator}
+ method="post"
+ action={path.to.sso}
+ fetcher={connectionFetcher}
+ defaultValues={{
+ metadataUrl: connection?.metadataUrl ?? "",
+ metadataXml: connection?.metadataXml ?? ""
+ }}
+ >
+ <Card>
+ <CardHeader>
+ <CardTitle>
+ <Trans>Identity Provider</Trans>
+ </CardTitle>
+ <CardDescription>
<Trans>
- This is a controlled environment, so two-factor
- authentication is required for everyone and cannot be
- turned off.
+ Connect your identity provider by pasting either its
+ metadata URL or its raw metadata XML — exactly one of the
+ two.
</Trans>
- ) : (
+ </CardDescription>
+ </CardHeader>
+ <CardContent className="gap-6">
+ <Hidden name="intent" value="upsert" />
+ <VStack spacing={4}>
+ <Input
+ name="metadataUrl"
+ label={t`IdP Metadata URL`}
+ helperText={t`The SAML metadata URL published by your identity provider`}
+ />
+ <TextArea
+ name="metadataXml"
+ label={t`IdP Metadata XML`}
+ placeholder={t`Paste the metadata XML if your identity provider does not publish a metadata URL`}
+ />
+ </VStack>
+ {connection && (
+ <div className="flex items-center justify-between gap-4 border-t border-border pt-6">
+ <div className="flex flex-col gap-0.5 max-w-md">
+ <p className="text-sm font-medium text-foreground">
+ <Trans>Require SAML SSO</Trans>
+ </p>
+ <p className="text-sm text-muted-foreground text-pretty">
+ <Trans>
+ Users on covered domains can sign in only with SAML
+ SSO; magic link, Google, and passkeys are refused.
+ </Trans>
+ </p>
+ {connection.domains.length === 0 && (
+ <p className="text-sm text-muted-foreground text-pretty">
+ <Trans>
+ This has no effect until an email domain is
+ verified below.
+ </Trans>
+ </p>
+ )}
+ </div>
+ {/* The connection loaded here is active by definition
+ (getSsoConnection filters active = true), so the
+ switch is enabled whenever a connection renders. */}
+ <Switch
+ checked={connection.requireSso === true}
+ onCheckedChange={(checked) =>
+ requireSsoFetcher.submit(
+ {
+ intent: "requireSso",
+ enabled: String(checked)
+ },
+ { method: "post", action: path.to.sso }
+ )
+ }
+ disabled={
+ requireSsoFetcher.state !== "idle" || !canEdit
+ }
+ aria-label={t`Require SAML SSO`}
+ />
+ </div>
+ )}
+ </CardContent>
+ <CardFooter
+ className={connection ? "justify-between" : "justify-end"}
+ >
+ {connection && (
+ <Button
+ variant="ghost"
+ className="text-destructive hover:text-destructive"
+ isDisabled={!canEdit}
+ onClick={() => setDeactivateModalOpen(true)}
+ >
+ <Trans>Deactivate</Trans>
+ </Button>
+ )}
+ <Submit isDisabled={!canEdit}>
+ {connection ? (
+ <Trans>Save changes</Trans>
+ ) : (
+ <Trans>Connect</Trans>
+ )}
+ </Submit>
+ </CardFooter>
+ </Card>
+ </ValidatedForm>
+
+ {connection && (
+ <Card>
+ <CardHeader>
+ <CardTitle>
+ <Trans>Email Domains</Trans>
+ </CardTitle>
+ <CardDescription>
<Trans>
- Require an authenticator app before anyone can open this
- company. Their other companies are unaffected. Visit the{" "}
- <Link
- to={path.to.employeeAccounts}
- className="text-primary underline"
- >
- employee accounts page
- </Link>{" "}
- to see each person's status.
+ Prove ownership of each email domain with a DNS TXT record
+ before it can route SAML SSO sign-ins. Add the record at
+ DNS host, then click Verify — only verified domains
+ participate in single sign-on.
</Trans>
- )}
- </CardDescription>
- </div>
- <Switch
- checked={CONTROLLED_ENVIRONMENT || requireMfa}
- onCheckedChange={(checked) =>
- mfaFetcher.submit(
- { enabled: String(checked) },
- { method: "post" }
- )
- }
- disabled={
- CONTROLLED_ENVIRONMENT ||
- mfaFetcher.state !== "idle" ||
- !canEdit
- }
- aria-label={t`Require two-factor authentication`}
- />
- </HStack>
- </CardHeader>
- </Card>
+ </CardDescription>
+ </CardHeader>
+ <CardContent>
+ <VStack spacing={4}>
+ {domains.map((domain) => (
+ <SsoDomainRow
+ key={domain.id}
+ domain={domain}
+ canEdit={canEdit}
+ />
+ ))}
+ <ValidatedForm
+ className="w-full"
+ validator={ssoDomainValidator}
+ method="post"
+ action={path.to.sso}
+ defaultValues={{ domain: "" }}
+ fetcher={addDomainFetcher}
+ resetAfterSubmit
+ >
+ <Hidden name="intent" value="addDomain" />
+ <HStack className="w-full items-end">
+ <div className="flex-1">
+ <Input
+ name="domain"
+ label={t`Add a domain`}
+ placeholder="example.com"
+ />
+ </div>
+ <Submit isDisabled={!canEdit} withBlocker={false}>
+ <Trans>Add</Trans>
+ </Submit>
+ </HStack>
+ </ValidatedForm>
+ </VStack>
+ </CardContent>
+ </Card>
+ )}
+
+ {deactivateModalOpen && (
+ <Modal
+ open
+ onOpenChange={(open) => {
+ if (!open) setDeactivateModalOpen(false);
+ }}
+ >
+ <ModalOverlay />
+ <ModalContent>
+ <ModalHeader>
+ <ModalTitle>
+ <Trans>Deactivate Single Sign-On</Trans>
+ </ModalTitle>
+ </ModalHeader>
+ <ModalBody>
+ <p className="text-sm text-muted-foreground">
+ <Trans>
+ Are you sure you want to deactivate SAML SSO? Users on
+ your registered domains will no longer be able to sign
+ in through your identity provider. This cannot be
+ undone.
+ </Trans>
+ </p>
+ </ModalBody>
+ <ModalFooter>
+ <Button
+ variant="secondary"
+ onClick={() => setDeactivateModalOpen(false)}
+ >
+ <Trans>Cancel</Trans>
+ </Button>
+ <deactivateFetcher.Form method="post" action={path.to.sso}>
+ <input type="hidden" name="intent" value="deactivate" />
+ <Button
+ variant="destructive"
+ type="submit"
+ isLoading={deactivateFetcher.state !== "idle"}
+ isDisabled={deactivateFetcher.state !== "idle"}
+ >
+ <Trans>Deactivate</Trans>
+ </Button>
+ </deactivateFetcher.Form>
+ </ModalFooter>
+ </ModalContent>
+ </Modal>
+ )}
+ </>
+ )}
</VStack>
</ScrollArea>
);
diff --git a/apps/erp/app/routes/x+/settings+/sso.tsx b/apps/erp/app/routes/x+/settings+/sso.tsx
new file mode 100644
index 0000000000..e9a2cab978
--- /dev/null
+++ b/apps/erp/app/routes/x+/settings+/sso.tsx
@@ -0,0 +1,220 @@
+import { assertIsPost, error, success } from "@carbon/auth";
+import { requirePermissions } from "@carbon/auth/auth.server";
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import { flash } from "@carbon/auth/session.server";
+import {
+ addSsoDomain,
+ deactivateSsoConnection,
+ isSsoEnabled,
+ removeSsoDomain,
+ updateSsoRequireSso,
+ upsertSsoConnection,
+ verifySsoDomain
+} from "@carbon/ee/sso.server";
+import { validationError, validator } from "@carbon/form";
+import type { ActionFunctionArgs } from "react-router";
+import { data, redirect } from "react-router";
+import { ssoConnectionValidator, ssoDomainValidator } from "~/modules/settings";
+import { path } from "~/utils/path";
+
+// Action-only route — the SSO admin UI lives on the Security screen. A direct
+// GET (typed URL, stale bookmark) lands there instead of erroring.
+export async function loader() {
+ throw redirect(path.to.security);
+}
+
+export async function action({ request }: ActionFunctionArgs) {
+ assertIsPost(request);
+ const { companyId, userId } = await requirePermissions(request, {
+ update: "settings"
+ });
+
+ // Defense in depth on top of the ee module's self-gating: a non-Enterprise
+ // deployment (or one without `sso` in AUTH_PROVIDERS) refuses the whole
+ // action even if a client posts to it directly.
+ if (!isSsoEnabled()) {
+ throw redirect(
+ path.to.security,
+ await flash(
+ request,
+ error(null, "Single sign-on requires Carbon Enterprise edition")
+ )
+ );
+ }
+
+ const formData = await request.formData();
+ const intent = formData.get("intent");
+
+ if (intent === "upsert") {
+ const validation = await validator(ssoConnectionValidator).validate(
+ formData
+ );
+
+ if (validation.error) {
+ return validationError(validation.error);
+ }
+
+ const upsert = await upsertSsoConnection(getCarbonServiceRole(), {
+ ...validation.data,
+ companyId,
+ userId
+ });
+
+ if (upsert.error) {
+ return data(
+ {},
+ await flash(
+ request,
+ error(upsert.error, "Failed to save SAML SSO connection")
+ )
+ );
+ }
+
+ throw redirect(
+ path.to.security,
+ await flash(request, success("SAML SSO connection saved"))
+ );
+ }
+
+ if (intent === "requireSso") {
+ const requireSso = formData.get("enabled") === "true";
+ const update = await updateSsoRequireSso(getCarbonServiceRole(), {
+ companyId,
+ requireSso,
+ userId
+ });
+
+ if (update.error) {
+ return data(
+ {},
+ await flash(
+ request,
+ error(update.error, "Failed to update SAML SSO requirement")
+ )
+ );
+ }
+
+ return data(
+ {},
+ await flash(
+ request,
+ success(
+ requireSso
+ ? "SAML SSO is now required for covered domains"
+ : "SAML SSO is no longer required for covered domains"
+ )
+ )
+ );
+ }
+
+ if (intent === "addDomain") {
+ const validation = await validator(ssoDomainValidator).validate(formData);
+
+ if (validation.error) {
+ return validationError(validation.error);
+ }
+
+ const insert = await addSsoDomain(getCarbonServiceRole(), {
+ companyId,
+ domain: validation.data.domain,
+ userId
+ });
+
+ if (insert.error) {
+ // Flash shows only the message argument — surface the service's strings.
+ return data({}, await flash(request, error(insert.error, insert.error)));
+ }
+
+ return data(
+ {},
+ await flash(
+ request,
+ success(
+ "Domain added. Publish the TXT record shown below, then click Verify."
+ )
+ )
+ );
+ }
+
+ if (intent === "verifyDomain") {
+ const domainId = formData.get("domainId");
+ if (typeof domainId !== "string" || !domainId) {
+ return data({}, await flash(request, error(null, "Unknown domain")));
+ }
+
+ const result = await verifySsoDomain(getCarbonServiceRole(), {
+ companyId,
+ domainId,
+ userId
+ });
+
+ if (result.error) {
+ return data({}, await flash(request, error(result.error, result.error)));
+ }
+
+ if (result.data?.verified) {
+ return data(
+ {},
+ await flash(
+ request,
+ success("Domain verified — it can now route SAML SSO sign-ins")
+ )
+ );
+ }
+
+ // Reason-specific copy: the difference between "not there yet" and "wrong
+ // token" is exactly what the admin needs to fix their DNS record.
+ const message =
+ result.data?.reason === "token_mismatch"
+ ? "A TXT record exists but its value does not match this company's verification token. Check that the record's value was copied exactly."
+ : result.data?.reason === "dns_error"
+ ? "The DNS lookup failed. Check your network's outbound DNS access and try again."
+ : "No TXT record found yet. DNS changes can take a few minutes to propagate — check the record's host name and try again shortly.";
+ return data({}, await flash(request, error(null, message)));
+ }
+
+ if (intent === "removeDomain") {
+ const domainId = formData.get("domainId");
+ if (typeof domainId !== "string" || !domainId) {
+ return data({}, await flash(request, error(null, "Unknown domain")));
+ }
+
+ const removal = await removeSsoDomain(getCarbonServiceRole(), {
+ companyId,
+ domainId
+ });
+
+ if (removal.error) {
+ return data(
+ {},
+ await flash(request, error(removal.error, "Failed to remove domain"))
+ );
+ }
+
+ return data({}, await flash(request, success("Domain removed")));
+ }
+
+ if (intent === "deactivate") {
+ const deactivate = await deactivateSsoConnection(getCarbonServiceRole(), {
+ companyId,
+ userId
+ });
+
+ if (deactivate.error) {
+ return data(
+ {},
+ await flash(
+ request,
+ error(deactivate.error, "Failed to deactivate SAML SSO connection")
+ )
+ );
+ }
+
+ throw redirect(
+ path.to.security,
+ await flash(request, success("SAML SSO connection deactivated"))
+ );
+ }
+
+ return data({}, await flash(request, error(null, "Unknown intent")));
+}
diff --git a/apps/erp/app/routes/x+/users+/customers.new.tsx b/apps/erp/app/routes/x+/users+/customers.new.tsx
index 8fc639003f..19435a5114 100644
--- a/apps/erp/app/routes/x+/users+/customers.new.tsx
+++ b/apps/erp/app/routes/x+/users+/customers.new.tsx
@@ -2,13 +2,14 @@ import {
assertIsPost,
CONTROLLED_ENVIRONMENT,
error,
- getAppUrl,
RESEND_DOMAIN,
success
} from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { flash } from "@carbon/auth/session.server";
import { InviteEmail } from "@carbon/documents/email";
+import { getSsoAwareInviteLink } from "@carbon/ee/sso.server";
import { validationError, validator } from "@carbon/form";
import { sendEmail } from "@carbon/lib/resend.server";
import { getLogger } from "@carbon/logger";
@@ -78,6 +79,13 @@ export async function action({ request }: ActionFunctionArgs) {
throw new Error("Failed to load company or user");
}
+ const inviteLink = await getSsoAwareInviteLink(
+ getCarbonServiceRole(),
+ result.email,
+ result.code,
+ companyId
+ );
+
await sendEmail({
from: `Carbon <no-reply@${RESEND_DOMAIN}>`,
to: result.email,
@@ -92,7 +100,7 @@ export async function action({ request }: ActionFunctionArgs) {
email: result.email,
name: invitee.data?.fullName ?? "",
companyName: company.data.name,
- inviteLink: `${getAppUrl()}/invite/${result.code}`,
+ inviteLink,
ip,
location,
controlledEnvironment: CONTROLLED_ENVIRONMENT
diff --git a/apps/erp/app/routes/x+/users+/employees.new.tsx b/apps/erp/app/routes/x+/users+/employees.new.tsx
index 2051000ef3..8a95a1f5d4 100644
--- a/apps/erp/app/routes/x+/users+/employees.new.tsx
+++ b/apps/erp/app/routes/x+/users+/employees.new.tsx
@@ -2,13 +2,14 @@ import {
assertIsPost,
CONTROLLED_ENVIRONMENT,
error,
- getAppUrl,
RESEND_DOMAIN,
success
} from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { flash } from "@carbon/auth/session.server";
import { InviteEmail } from "@carbon/documents/email";
+import { getSsoAwareInviteLink } from "@carbon/ee/sso.server";
import { validationError, validator } from "@carbon/form";
import { sendEmail } from "@carbon/lib/resend.server";
import { getLogger } from "@carbon/logger";
@@ -26,7 +27,10 @@ import {
createEmployeeValidator,
getInvitable
} from "~/modules/users";
-import { createEmployeeAccount } from "~/modules/users/users.server";
+import {
+ createEmployeeAccount,
+ getSsoInviteDomainError
+} from "~/modules/users/users.server";
import { path } from "~/utils/path";
import { getCompanyId, invalidateUserSelectQueries } from "~/utils/react-query";
@@ -87,6 +91,19 @@ export async function action({ request }: ActionFunctionArgs) {
});
}
+ // Once SSO is active for the company, an employee invite outside its
+ // covered domains is refused before anything is created or emailed.
+ const ssoDomainError = await getSsoInviteDomainError(
+ getCarbonServiceRole(),
+ companyId,
+ email
+ );
+ if (ssoDomainError) {
+ return validationError({
+ fieldErrors: { email: ssoDomainError }
+ });
+ }
+
const result = await createEmployeeAccount(client, {
email: email.toLowerCase(),
firstName,
@@ -121,6 +138,13 @@ export async function action({ request }: ActionFunctionArgs) {
throw new Error("Failed to load company or user");
}
+ const inviteLink = await getSsoAwareInviteLink(
+ getCarbonServiceRole(),
+ email,
+ result.code,
+ companyId
+ );
+
await sendEmail({
from: `Carbon <no-reply@${RESEND_DOMAIN}>`,
to: email,
@@ -135,7 +159,7 @@ export async function action({ request }: ActionFunctionArgs) {
email,
name: `${firstName} ${lastName}`.trim(),
companyName: company.data.name,
- inviteLink: `${getAppUrl()}/invite/${result.code}`,
+ inviteLink,
ip,
location,
controlledEnvironment: CONTROLLED_ENVIRONMENT
diff --git a/apps/erp/app/routes/x+/users+/resend-invite.tsx b/apps/erp/app/routes/x+/users+/resend-invite.tsx
index 8b7bbfbf0e..6008d685d8 100644
--- a/apps/erp/app/routes/x+/users+/resend-invite.tsx
+++ b/apps/erp/app/routes/x+/users+/resend-invite.tsx
@@ -1,7 +1,6 @@
import {
CONTROLLED_ENVIRONMENT,
error,
- getAppUrl,
RESEND_DOMAIN,
success
} from "@carbon/auth";
@@ -9,6 +8,7 @@ import { requirePermissions } from "@carbon/auth/auth.server";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { flash } from "@carbon/auth/session.server";
import { InviteEmail } from "@carbon/documents/email";
+import { getSsoAwareInviteLink } from "@carbon/ee/sso.server";
import { validationError, validator } from "@carbon/form";
import { batchTrigger } from "@carbon/jobs";
import { sendEmail } from "@carbon/lib/resend.server";
@@ -98,6 +98,13 @@ export async function action({ request }: ActionFunctionArgs) {
.eq("id", existingInvite.data.createdBy)
.single();
+ const inviteLink = await getSsoAwareInviteLink(
+ serviceRole,
+ user.data.email,
+ refreshed.data.code,
+ companyId
+ );
+
await sendEmail({
from: `Carbon <no-reply@${RESEND_DOMAIN}>`,
to: user.data.email,
@@ -112,7 +119,7 @@ export async function action({ request }: ActionFunctionArgs) {
email: user.data.email,
name: user.data.fullName ?? "",
companyName: company.data.name,
- inviteLink: `${getAppUrl()}/invite/${refreshed.data.code}`,
+ inviteLink,
ip,
location,
controlledEnvironment: CONTROLLED_ENVIRONMENT
diff --git a/apps/erp/app/routes/x+/users+/suppliers.new.tsx b/apps/erp/app/routes/x+/users+/suppliers.new.tsx
index 4d02aba33b..55c689d1a6 100644
--- a/apps/erp/app/routes/x+/users+/suppliers.new.tsx
+++ b/apps/erp/app/routes/x+/users+/suppliers.new.tsx
@@ -2,13 +2,14 @@ import {
assertIsPost,
CONTROLLED_ENVIRONMENT,
error,
- getAppUrl,
RESEND_DOMAIN,
success
} from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { flash } from "@carbon/auth/session.server";
import { InviteEmail } from "@carbon/documents/email";
+import { getSsoAwareInviteLink } from "@carbon/ee/sso.server";
import { validationError, validator } from "@carbon/form";
import { sendEmail } from "@carbon/lib/resend.server";
import { getLogger } from "@carbon/logger";
@@ -78,6 +79,13 @@ export async function action({ request }: ActionFunctionArgs) {
throw new Error("Failed to load company or user");
}
+ const inviteLink = await getSsoAwareInviteLink(
+ getCarbonServiceRole(),
+ result.email,
+ result.code,
+ companyId
+ );
+
await sendEmail({
from: `Carbon <no-reply@${RESEND_DOMAIN}>`,
to: result.email,
@@ -92,7 +100,7 @@ export async function action({ request }: ActionFunctionArgs) {
email: result.email,
name: invitee.data?.fullName ?? "",
companyName: company.data.name,
- inviteLink: `${getAppUrl()}/invite/${result.code}`,
+ inviteLink,
ip,
location,
controlledEnvironment: CONTROLLED_ENVIRONMENT
diff --git a/apps/erp/app/utils/path.ts b/apps/erp/app/utils/path.ts
index b49b719c12..069ad95958 100644
--- a/apps/erp/app/utils/path.ts
+++ b/apps/erp/app/utils/path.ts
@@ -243,6 +243,7 @@ export const path = {
shifts: (id: string) =>
generatePath(`${api}/people/shifts?location=${id}`),
shippingMethods: `${api}/inventory/shipping-methods`,
+ ssoCheck: `${api}/sso/check`,
storageTypes: `${api}/inventory/storage-types`,
storageUnitChildren: (parentId: string) =>
generatePath(
@@ -2019,6 +2020,7 @@ export const path = {
generatePath(`${x}/inventory/shipping-methods/${id}`),
shippingMethods: `${x}/inventory/shipping-methods`,
splitIssueItem: `${x}/issue/item/split`,
+ sso: `${x}/settings/sso`,
stockMovementCorrect: (id: string) =>
generatePath(`${x}/inventory/stock-movements/${id}/correct`),
stockMovements: `${x}/inventory/stock-movements`,
diff --git a/apps/mes/app/routes/_public+/callback.tsx b/apps/mes/app/routes/_public+/callback.tsx
index 64cf2ecc73..81d036eaf9 100644
--- a/apps/mes/app/routes/_public+/callback.tsx
+++ b/apps/mes/app/routes/_public+/callback.tsx
@@ -16,6 +16,12 @@ import {
setPendingMfaSession
} from "@carbon/auth/session.server";
import { getUserByEmail } from "@carbon/auth/users.server";
+import {
+ getSsoConnectionByProviderId,
+ getSsoProviderIdFromSession,
+ isSsoEnabled,
+ isSsoRequiredForEmail
+} from "@carbon/ee/sso.server";
import { validator } from "@carbon/form";
import { AccountLockout, redis } from "@carbon/kv";
import {
@@ -80,9 +86,111 @@ export async function action({ request }: ActionFunctionArgs) {
);
}
+ // ── SSO branch ─────────────────────────────────────────────────────────
+ // Mirrors the ERP callback's enforcement (provider → company binding +
+ // registered email domain), but MES runs no invite migration: a first SSO
+ // login must happen in the ERP, which owns the invite-accept transaction.
+ // Outside Enterprise the classification (and its admin API call) is skipped.
+ let ssoProviderId: string | null = null;
+ if (isSsoEnabled()) {
+ const authUser = await serviceRole.auth.admin.getUserById(userId);
+ ssoProviderId = authUser.data?.user
+ ? getSsoProviderIdFromSession(authSession.accessToken, authUser.data.user)
+ : null;
+ }
+
+ if (ssoProviderId) {
+ const connection = await getSsoConnectionByProviderId(
+ serviceRole,
+ ssoProviderId
+ );
+ if (!connection.data) {
+ return redirect(
+ path.to.root,
+ await flash(
+ request,
+ error(
+ connection.error,
+ "SAML SSO connection is not active. Contact your administrator."
+ )
+ )
+ );
+ }
+
+ const emailDomain = authSession.email.split("@")[1]?.toLowerCase() ?? "";
+ if (!connection.data.domains.includes(emailDomain)) {
+ return redirect(
+ path.to.root,
+ await flash(
+ request,
+ error(
+ null,
+ "SAML SSO sign-in rejected: this email domain is not registered for your company's SAML SSO connection."
+ )
+ )
+ );
+ }
+
+ const ssoCompanyId = connection.data.companyId;
+ const isMember = (companies.data ?? []).some(
+ (c) => c.companyId === ssoCompanyId
+ );
+ if (!isMember) {
+ return redirect(
+ path.to.root,
+ await flash(
+ request,
+ error(
+ null,
+ "Complete your first SAML SSO sign-in in Carbon ERP, then return here."
+ )
+ )
+ );
+ }
+
+ const ssoCompany = await serviceRole
+ .from("company")
+ .select("companyGroupId")
+ .eq("id", ssoCompanyId)
+ .maybeSingle();
+ authSession.companyId = ssoCompanyId;
+ authSession.companyGroupId = ssoCompany.data?.companyGroupId ?? "";
+ authSession.ssoProviderId = ssoProviderId;
+
+ await new AccountLockout({ redis }).reset(authSession.email);
+
+ // The IdP owns MFA for SSO sessions, including controlled environments
+ // (user decision — attestation shifts to the IdP policy).
+ authSession.mfaVerified = true;
+
+ const ssoSessionCookie = await setAuthSession(request, { authSession });
+ return redirect(path.to.authenticatedRoot, {
+ headers: [
+ ["Set-Cookie", ssoSessionCookie],
+ ["Set-Cookie", setCompanyId(ssoCompanyId)]
+ ]
+ });
+ }
+
const user = await getUserByEmail(authSession.email);
if (user?.data) {
+ // Require-SSO gate: this is the non-SSO path (magic link, Google/Azure
+ // OAuth, magic links minted elsewhere) — a covered + enforced domain may
+ // only authenticate via SSO, so refuse before any session state is minted.
+ if (await isSsoRequiredForEmail(serviceRole, authSession.email)) {
+ return redirect(
+ path.to.root,
+ await flash(
+ request,
+ error(
+ null,
+ "Your organization requires single sign-on. Sign in with your work email to continue."
+ )
+ )
+ );
+ }
+
// Genuine login (magic-link / OAuth first factor verified) — clear any
// accumulated per-account lockout state (NIST 3.1.8 reset-on-success). Runs
// before the TOTP gate so an MFA-enrolled user's counter clears too.
diff --git a/apps/mes/app/routes/_public+/login.tsx b/apps/mes/app/routes/_public+/login.tsx
index eb0f14d070..df99b4a456 100644
--- a/apps/mes/app/routes/_public+/login.tsx
+++ b/apps/mes/app/routes/_public+/login.tsx
@@ -13,12 +13,14 @@ import {
sendMagicLink,
verifyAuthSession
} from "@carbon/auth/auth.server";
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
import {
clearAuthCookies,
flash,
getAuthSession
} from "@carbon/auth/session.server";
import { getUserByEmail } from "@carbon/auth/users.server";
+import { isSsoEnabled, isSsoRequiredForEmail } from "@carbon/ee/sso.server";
import { Hidden, Input, Submit, ValidatedForm, validator } from "@carbon/form";
import { AccountLockout, Ratelimit, redis } from "@carbon/kv";
import {
@@ -64,6 +66,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
const hasOutlookAuth = isAuthProviderEnabled("azure");
const hasGoogleAuth = isAuthProviderEnabled("google");
const hasPasskeyAuth = isAuthProviderEnabled("passkey");
+ const hasSsoAuth = isSsoEnabled();
const authSession = await getAuthSession(request);
if (authSession) {
@@ -72,12 +75,12 @@ export async function loader({ request }: LoaderFunctionArgs) {
}
const cookieHeaders = await clearAuthCookies(request);
return data(
- { hasOutlookAuth, hasGoogleAuth, hasPasskeyAuth },
+ { hasOutlookAuth, hasGoogleAuth, hasPasskeyAuth, hasSsoAuth },
{ headers: cookieHeaders }
);
}
- return { hasOutlookAuth, hasGoogleAuth, hasPasskeyAuth };
+ return { hasOutlookAuth, hasGoogleAuth, hasPasskeyAuth, hasSsoAuth };
}
export async function action({ request }: ActionFunctionArgs) {
@@ -142,6 +145,22 @@ export async function action({ request }: ActionFunctionArgs) {
);
}
+ // Require-SSO gate: a covered + enforced domain may only authenticate via
+ // SSO — refuse the magic link here, server-side.
+ if (await isSsoRequiredForEmail(getCarbonServiceRole(), email)) {
+ const SSO_REQUIRED_MESSAGE =
+ "Your organization requires single sign-on. Sign in with your work email to continue.";
+ logAuthEvent("login_failed", {
+ actor: email,
+ ip,
+ reason: "sso required for domain"
+ });
+ return data(
+ { success: false, message: SSO_REQUIRED_MESSAGE },
+ await flash(request, error(null, SSO_REQUIRED_MESSAGE))
+ );
+ }
+
const user = await getUserByEmail(email);
if (user.data && user.data.active) {
@@ -165,11 +184,12 @@ export async function action({ request }: ActionFunctionArgs) {
export default function LoginRoute() {
const { t } = useLingui();
- const { hasOutlookAuth, hasGoogleAuth, hasPasskeyAuth } =
+ const { hasOutlookAuth, hasGoogleAuth, hasPasskeyAuth, hasSsoAuth } =
useLoaderData<typeof loader>();
const [searchParams] = useSearchParams();
const redirectTo = searchParams.get("redirectTo") ?? undefined;
+ const emailParam = searchParams.get("email") ?? undefined;
const fetcher = useFetcher<
{ success: true } | { success: false; message: string }
@@ -177,6 +197,8 @@ export default function LoginRoute() {
const [passkeySupported, setPasskeySupported] = useState(false);
const [passkeyLoading, setPasskeyLoading] = useState(false);
+ const [ssoLoading, setSsoLoading] = useState(false);
+ const [ssoError, setSsoError] = useState<string | null>(null);
const conditionalAbortRef = useRef<AbortController | null>(null);
// Detect passkey support and start conditional UI (autofill) on mount
@@ -309,6 +331,77 @@ export default function LoginRoute() {
}
};
+ // Invisible SSO fork: runs as the email form's onSubmit (after validation).
+ // If the entered email's domain is an SSO-registered domain, suppress the
+ // magic-link POST and route the browser to the identity provider instead.
+ // Otherwise it returns and the form submits normally (magic link).
+ const onSubmitEmail = async (
+ formData: { email?: string },
+ event: React.FormEvent<HTMLFormElement>
+ ) => {
+ // No SSO configured for this deployment — never pay a round-trip.
+ if (!hasSsoAuth) return;
+
+ setSsoError(null);
+ const email = String(formData.email ?? "")
+ .trim()
+ .toLowerCase();
+ const domain = email.split("@")[1];
+ if (!domain) return; // let the server validator handle a bad address
+
+ let enabled = false;
+ try {
+ const body = new FormData();
+ body.append("email", email);
+ const response = await fetch(path.to.api.ssoCheck, {
+ method: "POST",
+ body
+ });
+ enabled = response.ok ? Boolean((await response.json()).enabled) : false;
+ } catch {
+ // Fall through to the magic-link path; the server-side require-SSO gate
+ // is the defense-in-depth that still refuses an SSO-required domain.
+ enabled = false;
+ }
+
+ if (!enabled) return; // ordinary domain — magic-link submit proceeds
+
+ // SSO domain — stop the magic-link POST and hand off to the IdP.
+ event.preventDefault();
+ setSsoLoading(true);
+ const { data, error } = await carbonClient.auth.signInWithSSO({
+ domain,
+ options: {
+ redirectTo: `${window.location.origin}/callback${
+ redirectTo ? `?redirectTo=${redirectTo}` : ""
+ }`
+ }
+ });
+
+ if (error) {
+ setSsoError(error.message);
+ setSsoLoading(false);
+ return;
+ }
+
+ if (data?.url) {
+ // Prefill the user's email at the IdP so they don't retype it. The
+ // returned url is the IdP's SAML redirect-binding endpoint; login_hint is
+ // an extra query param (URL-encoded by URLSearchParams) that Okta/Entra
+ // honor and other IdPs safely ignore — it is not covered by the SAML
+ // request signature, so appending it never invalidates the request.
+ let target = data.url;
+ try {
+ const url = new URL(data.url);
+ url.searchParams.set("login_hint", email);
+ target = url.toString();
+ } catch {
+ // Non-absolute url — navigate to it unchanged.
+ }
+ window.location.href = target; // navigate away; keep the loading state
+ }
+ };
+
return (
<>
<div className="flex justify-center mb-8">
@@ -341,18 +434,25 @@ export default function LoginRoute() {
<ValidatedForm
fetcher={fetcher}
validator={magicLinkValidator}
- defaultValues={{ redirectTo }}
+ defaultValues={{ redirectTo, email: emailParam }}
method="post"
+ onSubmit={onSubmitEmail}
>
<Hidden name="redirectTo" value={redirectTo} type="hidden" />
<VStack spacing={2}>
- {fetcher.data?.success === false && fetcher.data?.message && (
+ {((fetcher.data?.success === false && fetcher.data?.message) ||
+ ssoError) && (
<Alert variant="destructive">
<LuCircleAlert className="w-4 h-4" />
<AlertTitle>
<Trans>Authentication Error</Trans>
</AlertTitle>
- <AlertDescription>{fetcher.data?.message}</AlertDescription>
+ <AlertDescription>
+ {ssoError ??
+ (fetcher.data?.success === false
+ ? fetcher.data.message
+ : null)}
+ </AlertDescription>
</Alert>
)}
@@ -412,14 +512,14 @@ export default function LoginRoute() {
/>
<Submit
- isDisabled={fetcher.state !== "idle"}
- isLoading={fetcher.state === "submitting"}
+ isDisabled={fetcher.state !== "idle" || ssoLoading}
+ isLoading={fetcher.state === "submitting" || ssoLoading}
size="lg"
className="w-full"
withBlocker={false}
variant="secondary"
>
- <Trans>Sign in with Email</Trans>
+ <Trans>Continue</Trans>
</Submit>
</VStack>
</ValidatedForm>
diff --git a/apps/mes/app/routes/api+/passkey.authenticate.verify.ts b/apps/mes/app/routes/api+/passkey.authenticate.verify.ts
index efc824c375..25615d166f 100644
--- a/apps/mes/app/routes/api+/passkey.authenticate.verify.ts
+++ b/apps/mes/app/routes/api+/passkey.authenticate.verify.ts
@@ -8,6 +8,7 @@ import {
setAuthSession,
setPendingMfaSession
} from "@carbon/auth/session.server";
+import { isSsoRequiredForEmail } from "@carbon/ee/sso.server";
import { AccountLockout, redis } from "@carbon/kv";
import type { WebAuthnCredential } from "@simplewebauthn/browser";
import type { ActionFunctionArgs } from "react-router";
@@ -105,6 +106,19 @@ export async function action({ request }: ActionFunctionArgs) {
});
}
+ // Require-SSO gate: a covered + enforced domain may only authenticate via
+ // SSO — refuse the passkey before any session is minted. The login page
+ // surfaces this message via its existing error toast.
+ if (await isSsoRequiredForEmail(serviceRole, authUser.user.email)) {
+ return data(
+ error(
+ null,
+ "Your organization requires single sign-on. Sign in with your work email to continue."
+ ),
+ { status: 403 }
+ );
+ }
+
const authSession = await signInWithPasskey(
credRow.userId,
authUser.user.email
diff --git a/apps/mes/app/routes/api+/sso.check.ts b/apps/mes/app/routes/api+/sso.check.ts
new file mode 100644
index 0000000000..535917f891
--- /dev/null
+++ b/apps/mes/app/routes/api+/sso.check.ts
@@ -0,0 +1,49 @@
+import { assertIsPost } from "@carbon/auth";
+import { getCarbonServiceRole } from "@carbon/auth/client.server";
+import { getSsoConnectionByDomain, isSsoEnabled } from "@carbon/ee/sso.server";
+import { Ratelimit, redis } from "@carbon/kv";
+import type { ActionFunctionArgs } from "react-router";
+import { data } from "react-router";
+
+// Public endpoint: given an email, answers only whether SSO is configured for
+// its domain and whether that connection enforces SSO-only sign-in.
+// Deliberately returns two booleans — no other connection details.
+export async function action({ request }: ActionFunctionArgs) {
+ assertIsPost(request);
+
+ if (!isSsoEnabled()) {
+ return data({ enabled: false, required: false });
+ }
+
+ const ip = request.headers.get("x-forwarded-for") ?? "127.0.0.1";
+ const ratelimit = new Ratelimit({
+ redis,
+ limiter: Ratelimit.slidingWindow(20, "1 h"),
+ analytics: true
+ });
+ const { success } = await ratelimit.limit(`sso-check:${ip}`);
+
+ if (!success) {
+ return data({ enabled: false, required: false }, { status: 429 });
+ }
+
+ const formData = await request.formData();
+ const email = String(formData.get("email") ?? "")
+ .trim()
+ .toLowerCase();
+ const domain = email.split("@")[1];
+
+ if (!domain) {
+ return data({ enabled: false, required: false });
+ }
+
+ const connection = await getSsoConnectionByDomain(
+ getCarbonServiceRole(),
+ domain
+ );
+
+ return data({
+ enabled: Boolean(connection.data),
+ required: connection.data?.requireSso === true
+ });
+}
diff --git a/apps/mes/app/routes/x+/_layout.tsx b/apps/mes/app/routes/x+/_layout.tsx
index a728b3f3c1..026bbaa699 100644
--- a/apps/mes/app/routes/x+/_layout.tsx
+++ b/apps/mes/app/routes/x+/_layout.tsx
@@ -106,8 +106,8 @@ export const shouldRevalidate: ShouldRevalidateFunction = ({
export const middleware: MiddlewareFunction[] = [userMiddleware];
export async function loader({ request, context }: LoaderFunctionArgs) {
- const { accessToken, companyId, expiresAt, expiresIn, userId } =
- await requireAuthSession(request, { verify: true });
+ const authSession = await requireAuthSession(request, { verify: true });
+ const { accessToken, companyId, expiresAt, expiresIn, userId } = authSession;
// share a client between requests
const client = getCarbon(accessToken);
@@ -187,9 +187,13 @@ export async function loader({ request, context }: LoaderFunctionArgs) {
const mfaRequired =
!consoleMode &&
(CONTROLLED_ENVIRONMENT || companySettings.data?.requireMfa === true);
- const mfaEnrollmentRequired = mfaRequired
- ? !(await userHasVerifiedTotpFactor(userId))
- : false;
+ // SSO sessions trust the IdP for MFA in all environments, including
+ // controlled — user decision, mirroring the ERP shell.
+ const ssoMfaExempt = Boolean(authSession.ssoProviderId);
+ const mfaEnrollmentRequired =
+ mfaRequired && !ssoMfaExempt
+ ? !(await userHasVerifiedTotpFactor(userId))
+ : false;
// Get active maintenance count after we have the location
const activeMaintenanceCount = await getActiveMaintenanceEventsCount(
diff --git a/apps/mes/app/utils/path.ts b/apps/mes/app/utils/path.ts
index afb2d36211..cecafbeaa2 100644
--- a/apps/mes/app/utils/path.ts
+++ b/apps/mes/app/utils/path.ts
@@ -34,6 +34,7 @@ export const path = {
qualityIssueTypes: `${api}/quality-issue-types`,
serialNumbers: (itemId: string) =>
generatePath(`${api}/serial-numbers?itemId=${itemId}`),
+ ssoCheck: `${api}/sso/check`,
suggestedAllocation: (
itemId: string,
locationId: string,
diff --git a/contrib/deploying/simple-docker-caddy/.env.example b/contrib/deploying/simple-docker-caddy/.env.example
index fe73f77e2c..ddfd6b1525 100644
--- a/contrib/deploying/simple-docker-caddy/.env.example
+++ b/contrib/deploying/simple-docker-caddy/.env.example
@@ -85,3 +85,12 @@ REALTIME_DB_ENC_KEY=
# ── Edge functions ───────────────────────────────────────────────────────────
EDGE_VERIFY_JWT=false
+
+# ── Enterprise SAML SSO ──────────────────────────────────────────────────────
+# Generate the key with:
+# openssl genpkey -algorithm RSA -out /tmp/pk.pem -quiet && \
+# openssl rsa -in /tmp/pk.pem -outform DER -traditional -out /tmp/pk.der && \
+# base64 -w 0 /tmp/pk.der
+# MUST be base64-encoded PKCS#1 DER (the -traditional flag), min 2048-bit.
+SAML_ENABLED=false
+SAML_PRIVATE_KEY=
diff --git a/contrib/deploying/simple-docker-caddy/deploy.sh b/contrib/deploying/simple-docker-caddy/deploy.sh
index 763902483b..92fae20717 100755
--- a/contrib/deploying/simple-docker-caddy/deploy.sh
+++ b/contrib/deploying/simple-docker-caddy/deploy.sh
@@ -29,7 +29,7 @@ readonly ENV_EXAMPLE="$HERE/.env.example"
# NOT in GENERATED_SECRETS. ALL_SECRETS is the full set the stack needs to deploy.
readonly GENERATED_SECRETS="session_secret inngest_signing_key inngest_event_key"
readonly TRIO_SECRETS="jwt_secret anon_key service_role_key"
-readonly SUPPLIED_SECRETS="resend_api_key smtp_password"
+readonly SUPPLIED_SECRETS="resend_api_key smtp_password saml_private_key"
readonly ALL_SECRETS="postgres_password postgrest_db_uri $GENERATED_SECRETS $TRIO_SECRETS $SUPPLIED_SECRETS"
log() { printf '\033[0;36m[%s]\033[0m %s\n' "$(date '+%H:%M:%S')" "$*"; }
@@ -133,6 +133,8 @@ cmd_init() {
case "$s" in
resend_api_key) create_secret "$s" "re_placeholder_change_me" ;;
smtp_password) create_secret "$s" "change_me" ;;
+ # Ignored while SAML_ENABLED=false; replace before enabling SAML.
+ saml_private_key) create_secret "$s" "change_me" ;;
esac
done
diff --git a/contrib/deploying/simple-docker-caddy/docker-compose.prod.yml b/contrib/deploying/simple-docker-caddy/docker-compose.prod.yml
index 690fbbae08..1dee0e0e59 100644
--- a/contrib/deploying/simple-docker-caddy/docker-compose.prod.yml
+++ b/contrib/deploying/simple-docker-caddy/docker-compose.prod.yml
@@ -258,6 +258,7 @@ services:
- postgres_password
- jwt_secret
- smtp_password
+ - saml_private_key
environment:
GOTRUE_API_HOST: 0.0.0.0
GOTRUE_API_PORT: "9999"
@@ -265,7 +266,7 @@ services:
GOTRUE_DB_DRIVER: postgres
GOTRUE_DB_DATABASE_URL: postgres://supabase_auth_admin:__POSTGRES_PASSWORD__@postgres:5432/postgres
GOTRUE_SITE_URL: ${ERP_URL}
- GOTRUE_URI_ALLOW_LIST: ${ERP_URL},${MES_URL}
+ GOTRUE_URI_ALLOW_LIST: ${ERP_URL},${ERP_URL}/callback,${MES_URL},${MES_URL}/callback
GOTRUE_DISABLE_SIGNUP: ${GOTRUE_DISABLE_SIGNUP:-true}
GOTRUE_JWT_SECRET: __JWT_SECRET__
GOTRUE_JWT_EXP: "3600"
@@ -288,6 +289,11 @@ services:
GOTRUE_EXTERNAL_AZURE_CLIENT_ID: ${SUPABASE_AUTH_EXTERNAL_AZURE_CLIENT_ID:-}
GOTRUE_EXTERNAL_AZURE_SECRET: ${SUPABASE_AUTH_EXTERNAL_AZURE_CLIENT_SECRET:-}
GOTRUE_EXTERNAL_AZURE_REDIRECT_URI: ${SUPABASE_AUTH_EXTERNAL_AZURE_REDIRECT_URI:-}
+ GOTRUE_SAML_ENABLED: ${SAML_ENABLED:-false}
+ # Swarm secret, not env interpolation — the SP private key must not be
+ # readable via `docker inspect`. Placeholder until SAML is enabled; set it
+ # with `deploy.sh secret saml_private_key "$(base64 -w0 < key.der)"`.
+ GOTRUE_SAML_PRIVATE_KEY: __SAML_PRIVATE_KEY__
GOTRUE_MAILER_TEMPLATES_MAGIC_LINK: ${ERP_URL}/templates/magic-link.html
GOTRUE_MAILER_TEMPLATES_INVITE: ${ERP_URL}/templates/invite.html
GOTRUE_MFA_TOTP_ENROLL_ENABLED: "true"
@@ -617,3 +623,5 @@ secrets:
external: true
smtp_password:
external: true
+ saml_private_key:
+ external: true
diff --git a/docs/content/docs/platform/meta.json b/docs/content/docs/platform/meta.json
index a56c8edcff..272befd3e4 100644
--- a/docs/content/docs/platform/meta.json
+++ b/docs/content/docs/platform/meta.json
@@ -1,5 +1,11 @@
{
"title": "Platform",
"defaultOpen": true,
- "pages": ["architecture", "backups", "self-hosting", "licensing"]
+ "pages": [
+ "architecture",
+ "backups",
+ "self-hosting",
+ "single-sign-on",
+ "licensing"
+ ]
}
diff --git a/docs/content/docs/platform/self-hosting/environment-variables.mdx b/docs/content/docs/platform/self-hosting/environment-variables.mdx
index 94cb902796..a43b38bb6b 100644
--- a/docs/content/docs/platform/self-hosting/environment-variables.mdx
+++ b/docs/content/docs/platform/self-hosting/environment-variables.mdx
@@ -15,7 +15,7 @@ Platform-wide behavior and edition.
<EnvVars>
<EnvVar name="CARBON_EDITION" type="enum">One of `community`, `cloud`, `enterprise`, or `test`. Gates edition-specific features.</EnvVar>
<EnvVar name="CONTROLLED_ENVIRONMENT" type="boolean">Enables ITAR / controlled-environment restrictions: the US-Person certification gate, ITAR hostnames and branding, Slack and analytics disabled, and mandatory [two-factor authentication](/docs/reference/two-factor) that a company admin cannot turn off.</EnvVar>
-<EnvVar name="AUTH_PROVIDERS" type="enum[]">Allowed sign-in methods: `email`, `google`, `azure`, `passkey`.</EnvVar>
+<EnvVar name="AUTH_PROVIDERS" type="enum[]">Allowed sign-in methods: `email`, `google`, `azure`, `passkey`, `sso` ([single sign-on](/docs/platform/single-sign-on), Enterprise edition only).</EnvVar>
<EnvVar name="DOMAIN" type="string">Base domain the apps are served from.</EnvVar>
<EnvVar name="ERP_URL" type="url">Public URL of the ERP app.</EnvVar>
<EnvVar name="MES_URL" type="url">Public URL of the MES app.</EnvVar>
@@ -46,6 +46,13 @@ Carbon's single Postgres database. The first four are required and crash boot if
<EnvVar name="DEV_BYPASS_EMAIL" type="string">Local only. Sign in as this email without a magic link.</EnvVar>
</EnvVars>
+Enterprise [SAML single sign-on](/docs/platform/single-sign-on) adds two more:
+
+<EnvVars>
+<EnvVar name="SAML_ENABLED" type="boolean">Turns on the SAML engine in the auth service.</EnvVar>
+<EnvVar name="SAML_PRIVATE_KEY" type="string">SAML signing key — base64-encoded PKCS#1 DER RSA, minimum 2048-bit; the generation command is in `.env.example`.</EnvVar>
+</EnvVars>
+
Sign-in bot protection uses Cloudflare Turnstile: `CLOUDFLARE_TURNSTILE_SITE_KEY` and
`CLOUDFLARE_TURNSTILE_SECRET_KEY`.
diff --git a/docs/content/docs/platform/single-sign-on.mdx b/docs/content/docs/platform/single-sign-on.mdx
new file mode 100644
index 0000000000..726efac5f0
--- /dev/null
+++ b/docs/content/docs/platform/single-sign-on.mdx
@@ -0,0 +1,123 @@
+---
+title: Single sign-on
+description: Route sign-in for your company's email domains through your own identity provider with enterprise SAML SSO.
+---
+
+Single sign-on hands control of Carbon sign-in to your own <Term>identity provider</Term> — Okta, Entra ID, Google Workspace, or any SAML 2.0 IdP. You register your email domains once — proving you own each one with a DNS record — and from then on your IT team grants and revokes access centrally: everyone on those domains signs in to both ERP and MES with their normal work email — Carbon recognizes the domain and routes them to your IdP automatically, with no SSO button to find. Registering alone doesn't take anything away — the <Term>magic link</Term> and other methods keep working until you turn on [Require SSO](#requiring-sso).
+
+## Requirements
+
+SSO is an Enterprise feature. Automatic SSO routing on the login page and the settings section are active only when the instance runs the **Enterprise** edition (`CARBON_EDITION=enterprise`), which requires a [commercial license](/docs/platform/licensing). It is a capability of your own [self-hosted](/docs/platform/self-hosting) deployment — Carbon Cloud sign-in is unaffected.
+
+Enable it through [environment variables](/docs/platform/self-hosting/environment-variables):
+
+<EnvVars>
+<EnvVar name="AUTH_PROVIDERS" type="enum[]">Add `sso` to the comma-separated list of sign-in methods. Without it, the button never renders.</EnvVar>
+<EnvVar name="SAML_ENABLED" type="boolean">Turns on the SAML engine in the auth service (GoTrue).</EnvVar>
+<EnvVar name="SAML_PRIVATE_KEY" type="string">The SAML signing key — a base64-encoded PKCS#1 DER RSA key, minimum 2048-bit. The exact `openssl` generation command is in `.env.example`.</EnvVar>
+</EnvVars>
+
+Carbon registers providers directly against the auth service with its service-role key — no Supabase account or plan is involved.
+
+## Connect your identity provider
+
+The whole exchange lives on one screen: **Settings** → **Security**, under the **"Single Sign-On"** heading. Viewing it requires the `settings` view permission; saving requires `settings` update.
+
+<Steps>
+<Step>
+
+**Copy Carbon's service provider details.** The **"Service Provider Details"** card shows the **"ACS URL"** and **"SP Metadata URL"** with copy buttons. Copy them from the screen rather than constructing them by hand.
+
+</Step>
+<Step>
+
+**Register Carbon in your IdP.** In Okta, Entra ID, or Google Workspace, create a SAML application using those two URLs. The assertion must include an **email attribute** — the email is how Carbon matches each sign-in to a person and a company.
+
+</Step>
+<Step>
+
+**Paste the IdP metadata back into Carbon.** In the **"Identity Provider"** card, provide either the **"IdP Metadata URL"** or the raw **"IdP Metadata XML"** — exactly one of the two — then **"Save"**. After saving, the card gains a **"Require SSO"** switch and a **"Deactivate"** button — the sign that the connection is active.
+
+</Step>
+<Step>
+
+**Verify your email domains.** The **"Email Domains"** card appears once the connection exists. Add each domain your people sign in with, publish the DNS record it shows you, and click **"Verify"** — see [Verifying a domain](#verifying-a-domain). Only verified domains route SSO sign-ins.
+
+</Step>
+</Steps>
+
+<FieldTable>
+<Field name="IdP Metadata URL" type="url">The SAML metadata URL published by your identity provider. Provide this *or* the XML, never both — the form rejects the submission with **"Provide either a metadata URL or metadata XML (exactly one)"**.</Field>
+<Field name="IdP Metadata XML" type="xml">The raw metadata document, for IdPs that don't publish a metadata URL.</Field>
+<Field name="Add a domain" type="text">One domain at a time, e.g. `example.com`. Domains are lowercased and must be bare hostnames — no `@`, no spaces; enter internationalized domains in punycode (`xn--`) form. Public email providers (`gmail.com`, `outlook.com`, …) are refused. Several companies may hold a **pending** claim on the same domain at once — a claim on its own blocks nobody. Exclusivity kicks in at verification: only one company can ever hold a domain **verified**, and only DNS control gets you there. Adding a domain your own company already has fails with **"This domain has already been added"**.</Field>
+</FieldTable>
+
+## Verifying a domain
+
+A domain routes SSO sign-ins only after you prove your company controls it. Each added domain starts **Pending** with a DNS challenge — a unique TXT record shown right on the card:
+
+| Record | Value |
+| --- | --- |
+| **Host** | `_carbon-challenge.example.com` |
+| **Type** | `TXT` |
+| **Value** | `carbon-domain-verification=<your unique token>` |
+
+Add the record at your DNS host (copy both fields from the card — the token is unique to your company and this domain), then click **"Verify"**. Many DNS providers auto-append your domain to the record's name field: in Cloudflare, for example, enter only `_carbon-challenge` (plus any subdomain) and check the preview under the field shows the host once, not twice. Carbon looks the record up and, on a match, flips the domain to **Verified** — from then on it participates in sign-in routing and [Require SSO](#requiring-sso) enforcement. Verification is one-time: the domain stays verified until you remove it, and the TXT record may be deleted afterwards if you prefer a tidy zone.
+
+If verification fails, the message tells you why: the record isn't visible yet (DNS changes can take a few minutes to propagate — wait and retry), the record's value doesn't match the token (re-copy it exactly), or the DNS lookup itself failed (the server couldn't reach the public resolvers; check its outbound DNS access). A **Pending** domain has no effect anywhere: it can't capture sign-ins, and it never triggers Require SSO — so adding a domain is always safe.
+
+<Callout type="warn" title="Verified claims are exclusive until removed">
+Only one company can hold a domain verified — first to prove DNS control wins. A **"Verify"** attempt on a domain another company already verified fails with a deliberately generic message, so the button can't be used to probe which domains are registered where. Verification is also permanent: the holder keeps the domain even if DNS control later changes hands (a domain sale, a rebrand). The clean handover is for the holding company to **Remove** the domain from its list, which frees it for the new owner to verify. Failing that, operators of a self-hosted deployment can delete the claim directly (`DELETE FROM "ssoDomain" WHERE "domain" = 'example.com';`) — note the previous holder's provider registration keeps routing the domain until its connection is re-saved, though sign-ins on it are rejected either way once the row is gone.
+</Callout>
+
+To turn SSO off, use the **"Deactivate"** button in the Identity Provider card. It opens a **"Deactivate Single Sign-On"** confirmation warning that "Users on your registered domains will no longer be able to sign in through your identity provider. This cannot be undone." — the provider registration is deleted outright and the domain claims are released, so re-enabling means saving the connection again and re-verifying your domains.
+
+## How sign-in works
+
+The login page is email-first, and the SSO fork is invisible. The user types their email and presses **"Continue"** — there is no separate SSO button to choose. Carbon checks whether the email's domain has an active connection (a rate-limited check that reveals nothing beyond yes or no); if it does, the browser redirects to your IdP, the user authenticates there, and lands back in Carbon signed in to the connection's company. If it doesn't, the same button falls through to the ordinary magic-link (or sign-up) flow. Users never have to know whether their company uses SSO.
+
+Before any session is created, Carbon enforces the connection's boundaries itself: the asserted email's domain must be one of the connection's **verified** email domains. An assertion outside them is rejected with **"SSO sign-in rejected: this email domain is not registered for your company's SSO connection."** — even a misconfigured or hostile IdP can't sign someone into another company.
+
+Provisioning is **invite-first** — there is no self-serve signup through SSO. Three outcomes:
+
+- **Already a member** of the connection's company: signed straight in.
+- **Has a pending invite**: the first SSO sign-in accepts it — the person lands in the company with exactly the invite's role and permissions.
+- **Neither**: rejected with **"SSO sign-in succeeded but no invite exists for `[email protected]`. Contact your administrator."** (the message names the address). Nothing is provisioned, so creating the invite and retrying just works.
+
+Invites cooperate with this automatically: when you invite someone whose email domain has an active SSO connection, the invite email links to the login page with their address prefilled instead of carrying a magic-link code — the IdP is never bypassed, even on day one.
+
+<Callout type="note" title="First sign-in happens in ERP">
+MES uses the same email-first sign-in and enforces the same domain rules, but it doesn't run first-time provisioning. A brand-new SSO user who starts at MES sees **"Complete your first SSO sign-in in Carbon ERP, then return here."** — after that one ERP sign-in, MES works normally.
+</Callout>
+
+## Existing accounts
+
+People who already sign in with a magic link or OAuth don't lose anything when SSO arrives.
+
+<Callout type="note" title="Existing accounts are linked automatically">
+The first SSO sign-in quietly attaches the SAML identity to the existing account. Nothing changes for the user: it's the same account, the magic link keeps working, and no invite is needed, because an existing member is already authorized.
+</Callout>
+
+Coverage follows the registered domains: every existing member whose email domain is registered with the connection signs in with SSO automatically on their next login, no re-invite needed. People not yet in the company still need an invite from the [employees directory](/docs/reference/people); invite emails for these domains route to SSO automatically.
+
+## Requiring SSO
+
+Once the connection works, you can make it the only way in. The **"Identity Provider"** card carries a **"Require SSO"** switch: while it's on, anyone whose email domain is **verified** on the active connection can sign in **only** through your identity provider (a pending domain enforces nothing). Every other method is refused server-side — the magic-link form, Google and Outlook sign-in, and passkeys all answer with **"Your organization requires single sign-on. Sign in with your work email to continue."** and no session is created.
+
+The ordering protects you from locking yourself out: the switch exists only on an active connection, so the path is always *set up SSO, prove a sign-in works, enforce last*. Turning the switch off — or deactivating the connection — immediately restores the other sign-in methods for those domains.
+
+<Callout type="warn" title="Break-glass recovery">
+If enforcement is on and your identity provider is unreachable, nobody on the covered domains can sign in to turn it off. Operators of a self-hosted deployment can lift the requirement directly in the database:
+
+```sql
+UPDATE "ssoConnection" SET "requireSso" = false WHERE "companyId" = '<id>';
+```
+
+Magic-link sign-in works again on the next attempt; re-enable the switch once the IdP is healthy.
+</Callout>
+
+## Two-factor authentication
+
+<Callout type="tip" title="Your IdP owns MFA">
+SSO sessions skip Carbon's [two-factor challenge](/docs/reference/two-factor) and the company-wide two-factor requirement in every environment, including controlled (ITAR) deployments. Your identity provider already enforced its own MFA policy during sign-in, and challenging twice is friction without security — MFA attestation for SSO sign-ins belongs to the IdP policy. Magic-link logins still go through Carbon's own two-factor challenge.
+</Callout>
diff --git a/docs/content/docs/reference/two-factor.mdx b/docs/content/docs/reference/two-factor.mdx
index 8264063aac..f94d83e5ac 100644
--- a/docs/content/docs/reference/two-factor.mdx
+++ b/docs/content/docs/reference/two-factor.mdx
@@ -31,6 +31,8 @@ Once you have a verified authenticator, every sign-in asks for a code — magic
Passkeys are challenged too, which surprises people. A passkey is strong, but in Carbon it resolves into an ordinary session like any other sign-in method, so exempting it would leave a way around the requirement. If you'd rather not be asked twice, that's an argument for using a passkey *instead of* two-factor, not alongside it.
+[Single sign-on](/docs/platform/single-sign-on) is the one method that isn't challenged. An SSO session arrives with your identity provider's MFA policy already enforced at sign-in, so Carbon skips its own code screen and the company-wide requirement for those sessions — in every environment, including controlled (ITAR) deployments. Sign in with a magic link instead and the challenge applies as usual.
+
<Callout type="warn" title="Codes are time-based, so your clock matters">
A code is valid for its thirty-second window plus one window either side, to absorb small drift. If codes are consistently rejected on a phone whose time is set manually, switch it to network time. It's the single most common cause of "the code is right but Carbon says no".
@@ -55,7 +57,7 @@ This is the part worth reading twice. If you belong to two companies and only on
But once you've set one up, you're asked for a code at **every** sign-in, to either company. There's no such thing as being half-enrolled — the authenticator is attached to your account, not to a membership. Turning the requirement on in one company therefore does change how its people sign in everywhere else, which is worth saying out loud before you flip it.
</Callout>
-Controlled environments are the exception to all of the above. When Carbon is deployed for ITAR or CMMC work, two-factor is mandatory and the switch is locked on, because NIST 800-171 requires it for network access to non-privileged accounts. Admins can see the setting but not turn it off, and the enrollment screen offers no way around it.
+Controlled environments are the exception to all of the above. When Carbon is deployed for ITAR or CMMC work, two-factor is mandatory and the switch is locked on, because NIST 800-171 requires it for network access to non-privileged accounts. Admins can see the setting but not turn it off, and the enrollment screen offers no way around it. SSO sessions remain exempt even here — the identity provider owns their MFA.
## Seeing who has set it up
diff --git a/packages/auth/AGENTS.md b/packages/auth/AGENTS.md
index 7ae3e73d37..c5934b052f 100644
--- a/packages/auth/AGENTS.md
+++ b/packages/auth/AGENTS.md
@@ -43,6 +43,9 @@ pnpm --filter @carbon/auth test
| `./passkey.server` | WebAuthn/passkey registration and authentication |
| `./middleware/flash.server` | Flash message middleware |
+SAML SSO lives in `@carbon/ee/sso.server` (Enterprise-gated), NOT here — auth
+only carries `AuthSession.ssoProviderId` and its preservation across refresh.
+
## Cross-References
- `.claude/rules/authentication-system.md` — full auth architecture, login flows, claims caching
diff --git a/packages/auth/src/services/session.server.ts b/packages/auth/src/services/session.server.ts
index 20c9c5c3bd..03a0a0f071 100644
--- a/packages/auth/src/services/session.server.ts
+++ b/packages/auth/src/services/session.server.ts
@@ -372,6 +372,9 @@ export async function refreshAuthSession(
if (refreshedAuthSession && authSession?.mfaVerified) {
refreshedAuthSession.mfaVerified = authSession.mfaVerified;
}
+ if (refreshedAuthSession && authSession?.ssoProviderId) {
+ refreshedAuthSession.ssoProviderId = authSession.ssoProviderId;
+ }
// Preserve session age + last-activity across a silent token refresh — a
// refresh is neither a re-auth nor user activity, so it must not reset the
// absolute-cap clock (3.1.11) or the idle clock (3.1.10).
diff --git a/packages/auth/src/types.ts b/packages/auth/src/types.ts
index 19bff0e9da..1a4cc80be1 100644
--- a/packages/auth/src/types.ts
+++ b/packages/auth/src/types.ts
@@ -16,6 +16,14 @@ export interface AuthSession {
* sessions where this is unset but the user has a verified factor.
*/
mfaVerified?: boolean;
+ /**
+ * Set when this session was minted from a SAML SSO login — the GoTrue SSO
+ * provider id the assertion came from. SSO sessions are minted
+ * `mfaVerified: true` unconditionally (the IdP owns MFA, including under
+ * CONTROLLED_ENVIRONMENT), and the org `requireMfa` gate exempts them.
+ * PRESERVED across token refresh, like `mfaVerified`.
+ */
+ ssoProviderId?: string;
/**
* Session start (unix ms). Stamped once at mint; PRESERVED across token
* refresh (never reset by refreshAuthSession). Basis of the 12h absolute cap
diff --git a/packages/database/src/swagger-docs-schema.ts b/packages/database/src/swagger-docs-schema.ts
index 0bd9c9a192..be16a8dc31 100644
--- a/packages/database/src/swagger-docs-schema.ts
+++ b/packages/database/src/swagger-docs-schema.ts
@@ -16062,6 +16062,195 @@ export default {
tags: ["quoteMaterialWithMakeMethodId"]
}
},
+ "/ssoDomain": {
+ get: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.id"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.companyId"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.connectionId"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.domain"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.verificationToken"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.status"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.verifiedAt"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.createdBy"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.createdAt"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.updatedBy"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.updatedAt"
+ },
+ {
+ $ref: "#/parameters/select"
+ },
+ {
+ $ref: "#/parameters/order"
+ },
+ {
+ $ref: "#/parameters/range"
+ },
+ {
+ $ref: "#/parameters/rangeUnit"
+ },
+ {
+ $ref: "#/parameters/offset"
+ },
+ {
+ $ref: "#/parameters/limit"
+ },
+ {
+ $ref: "#/parameters/preferCount"
+ }
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ schema: {
+ items: {
+ $ref: "#/definitions/ssoDomain"
+ },
+ type: "array"
+ }
+ },
+ "206": {
+ description: "Partial Content"
+ }
+ },
+ tags: ["ssoDomain"]
+ },
+ post: {
+ parameters: [
+ {
+ $ref: "#/parameters/body.ssoDomain"
+ },
+ {
+ $ref: "#/parameters/select"
+ },
+ {
+ $ref: "#/parameters/preferPost"
+ }
+ ],
+ responses: {
+ "201": {
+ description: "Created"
+ }
+ },
+ tags: ["ssoDomain"]
+ },
+ delete: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.id"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.companyId"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.connectionId"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.domain"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.verificationToken"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.status"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.verifiedAt"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.createdBy"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.createdAt"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.updatedBy"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.updatedAt"
+ },
+ {
+ $ref: "#/parameters/preferReturn"
+ }
+ ],
+ responses: {
+ "204": {
+ description: "No Content"
+ }
+ },
+ tags: ["ssoDomain"]
+ },
+ patch: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.id"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.companyId"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.connectionId"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.domain"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.verificationToken"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.status"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.verifiedAt"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.createdBy"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.createdAt"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.updatedBy"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoDomain.updatedAt"
+ },
+ {
+ $ref: "#/parameters/body.ssoDomain"
+ },
+ {
+ $ref: "#/parameters/preferReturn"
+ }
+ ],
+ responses: {
+ "204": {
+ description: "No Content"
+ }
+ },
+ tags: ["ssoDomain"]
+ }
+ },
"/itemUnitSalePrice": {
get: {
parameters: [
@@ -48855,6 +49044,195 @@ export default {
tags: ["jobOperationParameter"]
}
},
+ "/ssoConnection": {
+ get: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.id"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.companyId"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.providerId"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.metadataUrl"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.metadataXml"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.active"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.requireSso"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.createdBy"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.createdAt"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.updatedBy"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.updatedAt"
+ },
+ {
+ $ref: "#/parameters/select"
+ },
+ {
+ $ref: "#/parameters/order"
+ },
+ {
+ $ref: "#/parameters/range"
+ },
+ {
+ $ref: "#/parameters/rangeUnit"
+ },
+ {
+ $ref: "#/parameters/offset"
+ },
+ {
+ $ref: "#/parameters/limit"
+ },
+ {
+ $ref: "#/parameters/preferCount"
+ }
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ schema: {
+ items: {
+ $ref: "#/definitions/ssoConnection"
+ },
+ type: "array"
+ }
+ },
+ "206": {
+ description: "Partial Content"
+ }
+ },
+ tags: ["ssoConnection"]
+ },
+ post: {
+ parameters: [
+ {
+ $ref: "#/parameters/body.ssoConnection"
+ },
+ {
+ $ref: "#/parameters/select"
+ },
+ {
+ $ref: "#/parameters/preferPost"
+ }
+ ],
+ responses: {
+ "201": {
+ description: "Created"
+ }
+ },
+ tags: ["ssoConnection"]
+ },
+ delete: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.id"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.companyId"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.providerId"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.metadataUrl"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.metadataXml"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.active"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.requireSso"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.createdBy"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.createdAt"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.updatedBy"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.updatedAt"
+ },
+ {
+ $ref: "#/parameters/preferReturn"
+ }
+ ],
+ responses: {
+ "204": {
+ description: "No Content"
+ }
+ },
+ tags: ["ssoConnection"]
+ },
+ patch: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.id"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.companyId"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.providerId"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.metadataUrl"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.metadataXml"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.active"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.requireSso"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.createdBy"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.createdAt"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.updatedBy"
+ },
+ {
+ $ref: "#/parameters/rowFilter.ssoConnection.updatedAt"
+ },
+ {
+ $ref: "#/parameters/body.ssoConnection"
+ },
+ {
+ $ref: "#/parameters/preferReturn"
+ }
+ ],
+ responses: {
+ "204": {
+ description: "No Content"
+ }
+ },
+ tags: ["ssoConnection"]
+ }
+ },
"/gaugeType": {
get: {
parameters: [
@@ -85644,6 +86022,9 @@ export default {
{
$ref: "#/parameters/rowFilter.companySettings.requireMfa"
},
+ {
+ $ref: "#/parameters/rowFilter.companySettings.allowLowercaseItemIds"
+ },
{
$ref: "#/parameters/select"
},
@@ -85844,6 +86225,9 @@ export default {
{
$ref: "#/parameters/rowFilter.companySettings.requireMfa"
},
+ {
+ $ref: "#/parameters/rowFilter.companySettings.allowLowercaseItemIds"
+ },
{
$ref: "#/parameters/preferReturn"
}
@@ -85998,6 +86382,9 @@ export default {
{
$ref: "#/parameters/rowFilter.companySettings.requireMfa"
},
+ {
+ $ref: "#/parameters/rowFilter.companySettings.allowLowercaseItemIds"
+ },
{
$ref: "#/parameters/body.companySettings"
},
@@ -106159,6 +106546,76 @@ export default {
},
type: "object"
},
+ ssoDomain: {
+ required: [
+ "id",
+ "companyId",
+ "connectionId",
+ "domain",
+ "verificationToken",
+ "status",
+ "createdBy",
+ "createdAt"
+ ],
+ properties: {
+ id: {
+ default: "public.id('ssod'::text)",
+ description: "Note:\nThis is a Primary Key.<pk/>",
+ format: "text",
+ type: "string"
+ },
+ companyId: {
+ description:
+ "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",
+ format: "text",
+ type: "string"
+ },
+ connectionId: {
+ format: "text",
+ type: "string"
+ },
+ domain: {
+ format: "text",
+ type: "string"
+ },
+ verificationToken: {
+ format: "text",
+ type: "string"
+ },
+ status: {
+ default: "pending",
+ enum: ["pending", "verified"],
+ format: 'public."ssoDomainStatus"',
+ type: "string"
+ },
+ verifiedAt: {
+ format: "timestamp with time zone",
+ type: "string"
+ },
+ createdBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string"
+ },
+ createdAt: {
+ default: "now()",
+ format: "timestamp with time zone",
+ type: "string"
+ },
+ updatedBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string"
+ },
+ updatedAt: {
+ format: "timestamp with time zone",
+ type: "string"
+ }
+ },
+ type: "object"
+ },
itemUnitSalePrice: {
required: [
"itemId",
@@ -121845,6 +122302,75 @@ export default {
},
type: "object"
},
+ ssoConnection: {
+ required: [
+ "id",
+ "companyId",
+ "providerId",
+ "active",
+ "requireSso",
+ "createdBy",
+ "createdAt"
+ ],
+ properties: {
+ id: {
+ default: "public.id('sso'::text)",
+ description: "Note:\nThis is a Primary Key.<pk/>",
+ format: "text",
+ type: "string"
+ },
+ companyId: {
+ description:
+ "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",
+ format: "text",
+ type: "string"
+ },
+ providerId: {
+ format: "text",
+ type: "string"
+ },
+ metadataUrl: {
+ format: "text",
+ type: "string"
+ },
+ metadataXml: {
+ format: "text",
+ type: "string"
+ },
+ active: {
+ default: true,
+ format: "boolean",
+ type: "boolean"
+ },
+ requireSso: {
+ default: false,
+ format: "boolean",
+ type: "boolean"
+ },
+ createdBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string"
+ },
+ createdAt: {
+ default: "now()",
+ format: "timestamp with time zone",
+ type: "string"
+ },
+ updatedBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string"
+ },
+ updatedAt: {
+ format: "timestamp with time zone",
+ type: "string"
+ }
+ },
+ type: "object"
+ },
gaugeType: {
required: ["id", "name", "customFields", "createdAt", "createdBy"],
properties: {
@@ -126480,6 +127006,8 @@ export default {
type: "string"
},
itemId: {
+ description:
+ "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",
format: "text",
type: "string"
},
@@ -139435,7 +139963,8 @@ export default {
"includeMaterialsOnTraveler",
"returnPickedMaterialTiming",
"showCurrencyTrailingZeros",
- "requireMfa"
+ "requireMfa",
+ "allowLowercaseItemIds"
],
properties: {
id: {
@@ -139691,6 +140220,11 @@ export default {
default: false,
format: "boolean",
type: "boolean"
+ },
+ allowLowercaseItemIds: {
+ default: false,
+ format: "boolean",
+ type: "boolean"
}
},
type: "object"
@@ -148616,6 +149150,81 @@ export default {
in: "query",
type: "string"
},
+ "body.ssoDomain": {
+ name: "ssoDomain",
+ description: "ssoDomain",
+ required: false,
+ in: "body",
+ schema: {
+ $ref: "#/definitions/ssoDomain"
+ }
+ },
+ "rowFilter.ssoDomain.id": {
+ name: "id",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoDomain.companyId": {
+ name: "companyId",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoDomain.connectionId": {
+ name: "connectionId",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoDomain.domain": {
+ name: "domain",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoDomain.verificationToken": {
+ name: "verificationToken",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoDomain.status": {
+ name: "status",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoDomain.verifiedAt": {
+ name: "verifiedAt",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoDomain.createdBy": {
+ name: "createdBy",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoDomain.createdAt": {
+ name: "createdAt",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoDomain.updatedBy": {
+ name: "updatedBy",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoDomain.updatedAt": {
+ name: "updatedAt",
+ required: false,
+ in: "query",
+ type: "string"
+ },
"body.itemUnitSalePrice": {
name: "itemUnitSalePrice",
description: "itemUnitSalePrice",
@@ -166083,6 +166692,81 @@ export default {
in: "query",
type: "string"
},
+ "body.ssoConnection": {
+ name: "ssoConnection",
+ description: "ssoConnection",
+ required: false,
+ in: "body",
+ schema: {
+ $ref: "#/definitions/ssoConnection"
+ }
+ },
+ "rowFilter.ssoConnection.id": {
+ name: "id",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoConnection.companyId": {
+ name: "companyId",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoConnection.providerId": {
+ name: "providerId",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoConnection.metadataUrl": {
+ name: "metadataUrl",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoConnection.metadataXml": {
+ name: "metadataXml",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoConnection.active": {
+ name: "active",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoConnection.requireSso": {
+ name: "requireSso",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoConnection.createdBy": {
+ name: "createdBy",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoConnection.createdAt": {
+ name: "createdAt",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoConnection.updatedBy": {
+ name: "updatedBy",
+ required: false,
+ in: "query",
+ type: "string"
+ },
+ "rowFilter.ssoConnection.updatedAt": {
+ name: "updatedAt",
+ required: false,
+ in: "query",
+ type: "string"
+ },
"body.gaugeType": {
name: "gaugeType",
description: "gaugeType",
@@ -185933,6 +186617,12 @@ export default {
in: "query",
type: "string"
},
+ "rowFilter.companySettings.allowLowercaseItemIds": {
+ name: "allowLowercaseItemIds",
+ required: false,
+ in: "query",
+ type: "string"
+ },
"body.part": {
name: "part",
description: "part",
diff --git a/packages/database/src/types.ts b/packages/database/src/types.ts
index b471ee4124..375606b8e8 100644
--- a/packages/database/src/types.ts
+++ b/packages/database/src/types.ts
@@ -8585,6 +8585,48 @@ export type Database = {
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
+ {
+ foreignKeyName: "costLedger_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "consumables"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "costLedger_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "costLedger_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "materials"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "costLedger_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "parts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "costLedger_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "services"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "costLedger_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "tools"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "costLedger_supplierId_fkey"
columns: ["supplierId", "companyId"]
@@ -50453,6 +50495,295 @@ export type Database = {
},
]
}
+ ssoConnection: {
+ Row: {
+ active: boolean
+ companyId: string
+ createdAt: string
+ createdBy: string
+ id: string
+ metadataUrl: string | null
+ metadataXml: string | null
+ providerId: string
+ requireSso: boolean
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ active?: boolean
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ id?: string
+ metadataUrl?: string | null
+ metadataXml?: string | null
+ providerId: string
+ requireSso?: boolean
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ active?: boolean
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ id?: string
+ metadataUrl?: string | null
+ metadataXml?: string | null
+ providerId?: string
+ requireSso?: boolean
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "ssoConnection_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "ssoConnection_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "ssoConnection_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "ssoConnection_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ ssoDomain: {
+ Row: {
+ companyId: string
+ connectionId: string
+ createdAt: string
+ createdBy: string
+ domain: string
+ id: string
+ status: Database["public"]["Enums"]["ssoDomainStatus"]
+ updatedAt: string | null
+ updatedBy: string | null
+ verificationToken: string
+ verifiedAt: string | null
+ }
+ Insert: {
+ companyId: string
+ connectionId: string
+ createdAt?: string
+ createdBy: string
+ domain: string
+ id?: string
+ status?: Database["public"]["Enums"]["ssoDomainStatus"]
+ updatedAt?: string | null
+ updatedBy?: string | null
+ verificationToken: string
+ verifiedAt?: string | null
+ }
+ Update: {
+ companyId?: string
+ connectionId?: string
+ createdAt?: string
+ createdBy?: string
+ domain?: string
+ id?: string
+ status?: Database["public"]["Enums"]["ssoDomainStatus"]
+ updatedAt?: string | null
+ updatedBy?: string | null
+ verificationToken?: string
+ verifiedAt?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "ssoDomain_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "ssoDomain_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "ssoDomain_connectionId_fkey"
+ columns: ["connectionId", "companyId"]
+ isOneToOne: false
+ referencedRelation: "ssoConnection"
+ referencedColumns: ["id", "companyId"]
+ },
+ {
+ foreignKeyName: "ssoDomain_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "ssoDomain_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
stockTransfer: {
Row: {
assignee: string | null
@@ -68521,14 +68852,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["supplierCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["supplierCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -71948,21 +72279,21 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["shipmentCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["invoiceCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["shipmentCountryCode"]
+ columns: ["invoiceCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -79156,6 +79487,7 @@ export type Database = {
shipmentStatus: "Draft" | "Pending" | "Posted" | "Voided"
shippingCarrier: "UPS" | "FedEx" | "USPS" | "DHL" | "Other"
sourcingType: "Specified" | "Drop Ship" | "Ship from Inventory"
+ ssoDomainStatus: "pending" | "verified"
stockTransferStatus: "Draft" | "Released" | "In Progress" | "Completed"
storageRuleTargetType: "item" | "workCenter"
supersessionMode:
@@ -80587,6 +80919,7 @@ export const Constants = {
shipmentStatus: ["Draft", "Pending", "Posted", "Voided"],
shippingCarrier: ["UPS", "FedEx", "USPS", "DHL", "Other"],
sourcingType: ["Specified", "Drop Ship", "Ship from Inventory"],
+ ssoDomainStatus: ["pending", "verified"],
stockTransferStatus: ["Draft", "Released", "In Progress", "Completed"],
storageRuleTargetType: ["item", "workCenter"],
supersessionMode: [
diff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.ts
index b471ee4124..375606b8e8 100644
--- a/packages/database/supabase/functions/lib/types.ts
+++ b/packages/database/supabase/functions/lib/types.ts
@@ -8585,6 +8585,48 @@ export type Database = {
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
+ {
+ foreignKeyName: "costLedger_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "consumables"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "costLedger_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "costLedger_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "materials"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "costLedger_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "parts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "costLedger_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "services"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "costLedger_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "tools"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "costLedger_supplierId_fkey"
columns: ["supplierId", "companyId"]
@@ -50453,6 +50495,295 @@ export type Database = {
},
]
}
+ ssoConnection: {
+ Row: {
+ active: boolean
+ companyId: string
+ createdAt: string
+ createdBy: string
+ id: string
+ metadataUrl: string | null
+ metadataXml: string | null
+ providerId: string
+ requireSso: boolean
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ active?: boolean
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ id?: string
+ metadataUrl?: string | null
+ metadataXml?: string | null
+ providerId: string
+ requireSso?: boolean
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ active?: boolean
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ id?: string
+ metadataUrl?: string | null
+ metadataXml?: string | null
+ providerId?: string
+ requireSso?: boolean
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "ssoConnection_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "ssoConnection_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "ssoConnection_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "ssoConnection_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoConnection_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ ssoDomain: {
+ Row: {
+ companyId: string
+ connectionId: string
+ createdAt: string
+ createdBy: string
+ domain: string
+ id: string
+ status: Database["public"]["Enums"]["ssoDomainStatus"]
+ updatedAt: string | null
+ updatedBy: string | null
+ verificationToken: string
+ verifiedAt: string | null
+ }
+ Insert: {
+ companyId: string
+ connectionId: string
+ createdAt?: string
+ createdBy: string
+ domain: string
+ id?: string
+ status?: Database["public"]["Enums"]["ssoDomainStatus"]
+ updatedAt?: string | null
+ updatedBy?: string | null
+ verificationToken: string
+ verifiedAt?: string | null
+ }
+ Update: {
+ companyId?: string
+ connectionId?: string
+ createdAt?: string
+ createdBy?: string
+ domain?: string
+ id?: string
+ status?: Database["public"]["Enums"]["ssoDomainStatus"]
+ updatedAt?: string | null
+ updatedBy?: string | null
+ verificationToken?: string
+ verifiedAt?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "ssoDomain_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "ssoDomain_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "ssoDomain_connectionId_fkey"
+ columns: ["connectionId", "companyId"]
+ isOneToOne: false
+ referencedRelation: "ssoConnection"
+ referencedColumns: ["id", "companyId"]
+ },
+ {
+ foreignKeyName: "ssoDomain_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "ssoDomain_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "ssoDomain_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
stockTransfer: {
Row: {
assignee: string | null
@@ -68521,14 +68852,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["supplierCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["supplierCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -71948,21 +72279,21 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["shipmentCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["invoiceCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["shipmentCountryCode"]
+ columns: ["invoiceCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -79156,6 +79487,7 @@ export type Database = {
shipmentStatus: "Draft" | "Pending" | "Posted" | "Voided"
shippingCarrier: "UPS" | "FedEx" | "USPS" | "DHL" | "Other"
sourcingType: "Specified" | "Drop Ship" | "Ship from Inventory"
+ ssoDomainStatus: "pending" | "verified"
stockTransferStatus: "Draft" | "Released" | "In Progress" | "Completed"
storageRuleTargetType: "item" | "workCenter"
supersessionMode:
@@ -80587,6 +80919,7 @@ export const Constants = {
shipmentStatus: ["Draft", "Pending", "Posted", "Voided"],
shippingCarrier: ["UPS", "FedEx", "USPS", "DHL", "Other"],
sourcingType: ["Specified", "Drop Ship", "Ship from Inventory"],
+ ssoDomainStatus: ["pending", "verified"],
stockTransferStatus: ["Draft", "Released", "In Progress", "Completed"],
storageRuleTargetType: ["item", "workCenter"],
supersessionMode: [
diff --git a/packages/database/supabase/migrations/20260820215433_sso-connection.sql b/packages/database/supabase/migrations/20260820215433_sso-connection.sql
new file mode 100644
index 0000000000..737ca79d4b
--- /dev/null
+++ b/packages/database/supabase/migrations/20260820215433_sso-connection.sql
@@ -0,0 +1,163 @@
+-- Enterprise SAML SSO: app-side record binding a GoTrue SSO provider to a company.
+-- GoTrue's auth.sso_providers/auth.sso_domains drive the SAML handshake; this table
+-- is the tenant router and security anchor (providers are project-global in GoTrue,
+-- so the callback verifies providerId -> companyId + email-domain membership here).
+--
+-- "requireSso": when TRUE, users whose email domain is covered by this ACTIVE
+-- connection may only authenticate via SSO — magic link, Google/Azure OAuth, and
+-- passkeys are refused server-side at the login action, the callback, and the
+-- passkey verify routes (ERP + MES). Break-glass for self-hosted operators
+-- (documented in docs/content/docs/platform/single-sign-on.mdx):
+-- UPDATE "ssoConnection" SET "requireSso" = false WHERE "companyId" = '<id>';
+CREATE TABLE IF NOT EXISTS "ssoConnection" (
+ "id" TEXT NOT NULL DEFAULT id('sso'),
+ "companyId" TEXT NOT NULL,
+ "providerId" TEXT NOT NULL,
+ "metadataUrl" TEXT,
+ "metadataXml" TEXT,
+ "active" BOOLEAN NOT NULL DEFAULT TRUE,
+ "requireSso" BOOLEAN NOT NULL DEFAULT FALSE,
+ "createdBy" TEXT NOT NULL REFERENCES "user"("id"),
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ "updatedBy" TEXT REFERENCES "user"("id"),
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+ PRIMARY KEY ("id", "companyId"),
+ FOREIGN KEY ("companyId") REFERENCES "company"("id") ON DELETE CASCADE,
+ CONSTRAINT "ssoConnection_providerId_key" UNIQUE ("providerId"),
+ CONSTRAINT "ssoConnection_metadata_check" CHECK (num_nonnulls("metadataUrl", "metadataXml") = 1)
+);
+
+CREATE INDEX IF NOT EXISTS "ssoConnection_companyId_idx" ON "ssoConnection" ("companyId");
+CREATE INDEX IF NOT EXISTS "ssoConnection_createdBy_idx" ON "ssoConnection" ("createdBy");
+CREATE INDEX IF NOT EXISTS "ssoConnection_updatedBy_idx" ON "ssoConnection" ("updatedBy");
+
+-- One ACTIVE connection per company. Readers use .maybeSingle() (errors on two
+-- rows) and two concurrent upserts could otherwise both pass the app-side check;
+-- this makes the second insert fail loudly instead. Also lives in
+-- 20260826*_sso-connection-active-unique.sql (IF NOT EXISTS) for databases that
+-- applied the pre-squash version of this migration.
+CREATE UNIQUE INDEX IF NOT EXISTS "ssoConnection_companyId_active_key" ON "ssoConnection" ("companyId") WHERE "active" = TRUE;
+
+ALTER TABLE "ssoConnection" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "SELECT" ON "public"."ssoConnection"
+FOR SELECT USING (
+ "companyId" = ANY ((SELECT get_companies_with_employee_role())::text[])
+);
+
+CREATE POLICY "INSERT" ON "public"."ssoConnection"
+FOR INSERT WITH CHECK (
+ "companyId" = ANY ((SELECT get_companies_with_employee_permission('settings_update'))::text[])
+);
+
+CREATE POLICY "UPDATE" ON "public"."ssoConnection"
+FOR UPDATE USING (
+ "companyId" = ANY ((SELECT get_companies_with_employee_permission('settings_update'))::text[])
+);
+
+CREATE POLICY "DELETE" ON "public"."ssoConnection"
+FOR DELETE USING (
+ "companyId" = ANY ((SELECT get_companies_with_employee_permission('settings_update'))::text[])
+);
+
+-- One row per claimed email domain, with a DNS TXT ownership challenge. A
+-- domain routes SSO logins (and enforces "requireSso") ONLY while
+-- status = 'verified' — the GoTrue provider is registered with the verified
+-- set, and every app-side lookup filters on it, so a pending claim is inert.
+-- Verification is one-shot and manual: the admin publishes
+-- _carbon-challenge.<domain> TXT "carbon-domain-verification=<token>"
+-- and clicks Verify; there is no periodic re-check, and the record may be
+-- removed once verified. Exclusivity attaches to VERIFICATION, not the claim:
+-- pending claims may coexist across companies (a free pending row must never
+-- block the rightful owner), and the partial unique index below enforces
+-- first-to-verify-wins race-free.
+DO $$ BEGIN
+ CREATE TYPE "ssoDomainStatus" AS ENUM ('pending', 'verified');
+EXCEPTION WHEN duplicate_object THEN NULL; END $$;
+
+CREATE TABLE IF NOT EXISTS "ssoDomain" (
+ "id" TEXT NOT NULL DEFAULT id('ssod'),
+ "companyId" TEXT NOT NULL,
+ "connectionId" TEXT NOT NULL,
+ "domain" TEXT NOT NULL,
+ "verificationToken" TEXT NOT NULL,
+ "status" "ssoDomainStatus" NOT NULL DEFAULT 'pending',
+ "verifiedAt" TIMESTAMP WITH TIME ZONE,
+ "createdBy" TEXT NOT NULL REFERENCES "user"("id"),
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ "updatedBy" TEXT REFERENCES "user"("id"),
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+ PRIMARY KEY ("id", "companyId"),
+ FOREIGN KEY ("companyId") REFERENCES "company"("id") ON DELETE CASCADE,
+ CONSTRAINT "ssoDomain_connectionId_fkey" FOREIGN KEY ("connectionId", "companyId") REFERENCES "ssoConnection"("id", "companyId") ON DELETE CASCADE,
+ CONSTRAINT "ssoDomain_companyId_domain_key" UNIQUE ("companyId", "domain")
+);
+
+-- First-to-verify-wins: at most one VERIFIED row per domain across companies.
+CREATE UNIQUE INDEX IF NOT EXISTS "ssoDomain_domain_verified_key" ON "ssoDomain" ("domain") WHERE "status" = 'verified';
+
+CREATE INDEX IF NOT EXISTS "ssoDomain_companyId_idx" ON "ssoDomain" ("companyId");
+CREATE INDEX IF NOT EXISTS "ssoDomain_connectionId_idx" ON "ssoDomain" ("connectionId", "companyId");
+CREATE INDEX IF NOT EXISTS "ssoDomain_createdBy_idx" ON "ssoDomain" ("createdBy");
+CREATE INDEX IF NOT EXISTS "ssoDomain_updatedBy_idx" ON "ssoDomain" ("updatedBy");
+
+ALTER TABLE "ssoDomain" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "SELECT" ON "public"."ssoDomain"
+FOR SELECT USING (
+ "companyId" = ANY ((SELECT get_companies_with_employee_role())::text[])
+);
+
+CREATE POLICY "INSERT" ON "public"."ssoDomain"
+FOR INSERT WITH CHECK (
+ "companyId" = ANY ((SELECT get_companies_with_employee_permission('settings_update'))::text[])
+);
+
+CREATE POLICY "UPDATE" ON "public"."ssoDomain"
+FOR UPDATE USING (
+ "companyId" = ANY ((SELECT get_companies_with_employee_permission('settings_update'))::text[])
+);
+
+CREATE POLICY "DELETE" ON "public"."ssoDomain"
+FOR DELETE USING (
+ "companyId" = ANY ((SELECT get_companies_with_employee_permission('settings_update'))::text[])
+);
+
+-- Crash-free public-user creation: an SSO signup whose email already belongs to a
+-- DIFFERENT public."user" row must not violate index_user_email_key inside GoTrue's
+-- transaction (the SAML login would fail opaquely before app code runs). The branch
+-- inserts NOTHING — not even the "userPermission" row, whose id has an FK to the
+-- "user" row this branch declines to create. The SSO callback's migration
+-- transaction owns creating both rows after domain + invite verification
+-- (users.sso.server.ts migrateUserToSso). The existing row is never mutated from
+-- this trigger (a rogue IdP must not be able to touch another account's row).
+CREATE OR REPLACE FUNCTION public.create_public_user()
+RETURNS TRIGGER AS $$
+DECLARE
+ full_name TEXT;
+ name_parts TEXT[];
+ email_owner TEXT;
+BEGIN
+ SELECT "id" INTO email_owner FROM public."user" WHERE "email" = NEW.email;
+ IF email_owner IS NOT NULL AND email_owner <> NEW.id::text THEN
+ RETURN NEW;
+ END IF;
+
+ full_name := NEW.raw_user_meta_data->>'name';
+ IF full_name IS NOT NULL THEN
+ name_parts := regexp_split_to_array(full_name, '\s+');
+ INSERT INTO public."user" ("id","email","active","firstName","lastName","about")
+ VALUES (NEW.id, NEW.email, true,
+ COALESCE(name_parts[1], ''),
+ COALESCE(array_to_string(name_parts[2:], ' '), ''), '')
+ ON CONFLICT (id) DO UPDATE SET email = EXCLUDED.email;
+ ELSE
+ INSERT INTO public."user" ("id","email","active","firstName","lastName","about")
+ VALUES (NEW.id, NEW.email, true, '', '', '')
+ ON CONFLICT (id) DO UPDATE SET email = EXCLUDED.email;
+ END IF;
+
+ INSERT INTO public."userPermission" ("id") VALUES (NEW.id) ON CONFLICT DO NOTHING;
+ RETURN NEW;
+END;
+$$ LANGUAGE plpgsql SECURITY DEFINER;
diff --git a/packages/database/supabase/migrations/20260825185617_sso-connection-active-unique.sql b/packages/database/supabase/migrations/20260825185617_sso-connection-active-unique.sql
new file mode 100644
index 0000000000..6d043ffe5d
--- /dev/null
+++ b/packages/database/supabase/migrations/20260825185617_sso-connection-active-unique.sql
@@ -0,0 +1,24 @@
+-- One ACTIVE SSO connection per company. This index also lives in the squashed
+-- 20260820215433_sso-connection.sql for fresh databases; this migration applies
+-- it to databases that ran the pre-squash version of that file (IF NOT EXISTS
+-- makes both orders converge). Readers use .maybeSingle() — which errors on two
+-- rows — and two concurrent upserts could otherwise both pass the app-side
+-- domain check and leave two active rows; with the index the second insert
+-- fails loudly instead.
+
+-- A pre-squash database may already hold the duplicates the index exists to
+-- prevent; the CREATE INDEX would then abort the whole migration. Keep the
+-- newest active row per company and deactivate the rest first. Deactivate, not
+-- delete: the row still names its GoTrue provider, so an admin can see and
+-- clean up the losing connection instead of it silently vanishing.
+UPDATE "ssoConnection" sc
+SET "active" = FALSE
+WHERE sc."active" = TRUE
+ AND EXISTS (
+ SELECT 1 FROM "ssoConnection" newer
+ WHERE newer."companyId" = sc."companyId"
+ AND newer."active" = TRUE
+ AND (newer."createdAt", newer."id") > (sc."createdAt", sc."id")
+ );
+
+CREATE UNIQUE INDEX IF NOT EXISTS "ssoConnection_companyId_active_key" ON "ssoConnection" ("companyId") WHERE "active" = TRUE;
diff --git a/packages/dev/docker/docker-compose.dev.yml b/packages/dev/docker/docker-compose.dev.yml
index 458efe592b..1d17e2f00c 100644
--- a/packages/dev/docker/docker-compose.dev.yml
+++ b/packages/dev/docker/docker-compose.dev.yml
@@ -82,7 +82,7 @@ services:
GOTRUE_DB_DRIVER: postgres
GOTRUE_DB_DATABASE_URL: postgres://supabase_auth_admin:postgres@postgres:5432/postgres
GOTRUE_SITE_URL: ${ERP_URL}
- GOTRUE_URI_ALLOW_LIST: ${ERP_URL},${MES_URL},${GTM_URL}
+ GOTRUE_URI_ALLOW_LIST: ${ERP_URL},${ERP_URL}/callback,${MES_URL},${MES_URL}/callback,${GTM_URL}
GOTRUE_DISABLE_SIGNUP: "false"
GOTRUE_JWT_SECRET: ${SUPABASE_JWT_SECRET}
GOTRUE_JWT_EXP: 3600
@@ -111,6 +111,8 @@ services:
GOTRUE_MFA_TOTP_ENROLL_ENABLED: "true"
GOTRUE_MFA_TOTP_VERIFY_ENABLED: "true"
GOTRUE_MFA_MAX_ENROLLED_FACTORS: 10
+ GOTRUE_SAML_ENABLED: ${SAML_ENABLED:-false}
+ GOTRUE_SAML_PRIVATE_KEY: ${SAML_PRIVATE_KEY:-}
SSL_CERT_FILE: /etc/ssl/certs/portless-ca.pem
extra_hosts:
- "host.docker.internal:host-gateway"
diff --git a/packages/dev/docker/kong.yml b/packages/dev/docker/kong.yml
index 0590797f78..060e6ac3b0 100644
--- a/packages/dev/docker/kong.yml
+++ b/packages/dev/docker/kong.yml
@@ -57,6 +57,21 @@ services:
plugins:
- name: cors
+ # SAML SSO endpoints at the path GoTrue self-declares. GoTrue builds its SP
+ # entityID and ACS URL from API_EXTERNAL_URL (no /auth/v1 prefix here) and
+ # validates each assertion's Destination against that exact URL — so the
+ # un-prefixed /sso/ path must route, and it is the canonical one to give an
+ # IdP. Public by design: the IdP posts assertions directly to the ACS.
+ - name: auth-v1-sso
+ url: http://gotrue:9999/sso/
+ routes:
+ - name: auth-v1-sso
+ strip_path: true
+ paths:
+ - /sso/
+ plugins:
+ - name: cors
+
- name: rest-v1
url: http://postgrest:3000/
routes:
diff --git a/packages/dev/src/commands/reload.ts b/packages/dev/src/commands/reload.ts
index 986ad752a3..adf1af705c 100644
--- a/packages/dev/src/commands/reload.ts
+++ b/packages/dev/src/commands/reload.ts
@@ -1,4 +1,6 @@
+import { join } from "node:path";
import { intro, log, outro, spinner } from "@clack/prompts";
+import { config as loadDotenv } from "dotenv";
import pc from "picocolors";
import { recreateServices } from "../services/compose.js";
import { getWorktreeRoot, projectName, resolveSlug } from "../worktree.js";
@@ -21,6 +23,12 @@ export async function reload(services: string[]) {
}
const root = await getWorktreeRoot();
+ // Mirror `crbn up`: compose interpolation reads process.env first, so root
+ // .env values referenced by docker-compose.dev.yml (e.g. the GOTRUE_SAML_*
+ // bindings on ${SAML_ENABLED}/${SAML_PRIVATE_KEY}) survive a reload instead
+ // of silently resetting to their defaults. .env.local takes precedence.
+ loadDotenv({ path: join(root, ".env.local"), override: false });
+ loadDotenv({ path: join(root, ".env"), override: false });
const slug = resolveSlug(root);
log.info(
`worktree: ${pc.cyan(slug)} project: ${pc.cyan(projectName(slug))}`
diff --git a/packages/ee/AGENTS.md b/packages/ee/AGENTS.md
index 3b032bf82d..4d9dc9565f 100644
--- a/packages/ee/AGENTS.md
+++ b/packages/ee/AGENTS.md
@@ -1,6 +1,6 @@
# @carbon/ee
-Enterprise edition — integrations registry, accounting sync (Xero, QuickBooks Online, Rillet), plan gating, exchange rates, Slack, email, Jira, Linear, Onshape, and storage rules.
+Enterprise edition — integrations registry, accounting sync (Xero, QuickBooks Online, Rillet), plan gating, exchange rates, Slack, email, Jira, Linear, Onshape, storage rules, and SAML SSO.
## Always
@@ -39,7 +39,8 @@ pnpm --filter @carbon/ee typecheck # tsgo --noEmit
- **Tie-out remote reads**: `accounting/core/remote-journal.ts` `fetchRemoteJournalTotals()` — provider-agnostic debit-signed per-account journal totals for the reconciliation tie-out
- **Dependency sync**: transaction syncers use `ensureDependencySynced()` for JIT deps (e.g. push customer before invoice)
- **Integration pattern**: `defineIntegration()` → config with id, name, settings, OAuth, actions
-- **Exports**: `./accounting`, `./plan`, `./plan.server`, `./exchange-rates.server`, `./slack.server`, `./hooks.server`, `./jira`, `./linear`, `./rillet/hooks.server`, `./xero/hooks.server`, etc.
+- **SAML SSO** (`./sso.server`, `src/sso/`): `isSsoEnabled()` (`gate.ts` — Enterprise edition AND `sso` in `AUTH_PROVIDERS`) is the ONE flag; the connection lookups and admin mutations self-gate on it. `provider.server.ts` = GoTrue admin API wrappers + `getSamlSpUrls`; `connections.server.ts` = `ssoConnection` lookups (each attaches a computed `domains: string[]` of VERIFIED `ssoDomain` claims), `isSsoRequiredForEmail`, `getSsoAwareInviteLink`, upsert/requireSso/deactivate mutations, and the domain-claim flows `addSsoDomain`/`verifySsoDomain`/`removeSsoDomain`; `verification.server.ts` = the DNS TXT ownership challenge (`_carbon-challenge.<domain>` → `carbon-domain-verification=<token>`, `checkDomainVerification` with pinned public resolvers, one-shot manual verify — no polling or re-verification); `session.server.ts` = amr-based session classification (`getSsoProviderIdFromSession` for enforcement, never `getSsoProviderIdFromUser`); `provisioning.server.ts` = identity linking + invite-first migration + `deleteJitSsoUser` (full removal of a rejected throwaway JIT user — auth user AND its trigger-created `user`/`userPermission` rows, guarded on zero memberships; takes a `Kysely<KyselyDatabase>` param — callers pass their own db client). Only verified domains ever reach GoTrue. Full architecture: `.claude/rules/authentication-system.md` (Enterprise SAML SSO section)
+- **Exports**: `./accounting`, `./plan`, `./plan.server`, `./exchange-rates.server`, `./slack.server`, `./hooks.server`, `./sso.server`, `./jira`, `./linear`, `./rillet/hooks.server`, `./xero/hooks.server`, etc.
## Cross-References
diff --git a/packages/ee/package.json b/packages/ee/package.json
index 3d4aa53bec..c4272d3053 100644
--- a/packages/ee/package.json
+++ b/packages/ee/package.json
@@ -21,6 +21,7 @@
"./plan.server": "./src/plan.server.ts",
"./slack.server": "./src/slack.server.ts",
"./slack/messages": "./src/slack/lib/messages.ts",
+ "./sso.server": "./src/sso/index.server.ts",
"./hooks.server": "./src/hooks.server.ts",
"./quickbooks/hooks.server": "./src/quickbooks/hooks.server.ts",
"./rillet/hooks.server": "./src/rillet/hooks.server.ts",
@@ -56,6 +57,7 @@
"axios": "catalog:",
"cookie": "catalog:",
"dompurify": "catalog:",
+ "jose": "catalog:",
"kysely": "catalog:",
"nanoid": "catalog:",
"nodemailer": "6.10.1",
diff --git a/packages/ee/src/sso/connections.server.ts b/packages/ee/src/sso/connections.server.ts
new file mode 100644
index 0000000000..6c80b5a98b
--- /dev/null
+++ b/packages/ee/src/sso/connections.server.ts
@@ -0,0 +1,601 @@
+import type { Database } from "@carbon/database";
+import { getAppUrl } from "@carbon/env";
+import { datetime } from "@carbon/utils";
+import type { SupabaseClient } from "@supabase/supabase-js";
+import { isSsoEnabled } from "./gate";
+import {
+ createGoTrueSsoProvider,
+ deleteGoTrueSsoProvider,
+ updateGoTrueSsoProvider
+} from "./provider.server";
+import {
+ checkDomainVerification,
+ generateVerificationToken
+} from "./verification.server";
+
+// --- "ssoConnection" lookups ----------------------------------------------
+// The one copy shared by ERP, MES, and jobs — domain and provider routing must
+// answer identically at every enforcement point, so none of them keeps its own.
+// The lookups self-gate on isSsoEnabled(): outside Enterprise they answer "no
+// connection" without a query, so every downstream consumer (login refusals,
+// invite links, callbacks) behaves as if SSO does not exist.
+//
+// Domains live in the "ssoDomain" table with a pending → verified lifecycle
+// (DNS TXT ownership challenge — see verification.server.ts). Every lookup
+// here attaches a computed `domains: string[]` of VERIFIED domains only, so an
+// unverified claim is indistinguishable from an unregistered domain at every
+// enforcement point.
+
+const DISABLED_ERROR = "Single sign-on requires Carbon Enterprise edition";
+
+type SsoDomainEmbed = { domain: string; status: string };
+
+/** Flatten the ssoDomain embed into the verified `domains` array consumers read. */
+function attachVerifiedDomains<
+ T extends { ssoDomain?: SsoDomainEmbed[] | null }
+>(row: T): Omit<T, "ssoDomain"> & { domains: string[] } {
+ const { ssoDomain, ...rest } = row;
+ return {
+ ...rest,
+ domains: (ssoDomain ?? [])
+ .filter((d) => d.status === "verified")
+ .map((d) => d.domain)
+ };
+}
+
+export async function getSsoConnection(
+ client: SupabaseClient<Database>,
+ companyId: string
+) {
+ if (!isSsoEnabled()) return { data: null, error: null };
+
+ const result = await client
+ .from("ssoConnection")
+ .select("*, ssoDomain(domain, status)")
+ .eq("companyId", companyId)
+ .eq("active", true)
+ .maybeSingle();
+
+ return {
+ data: result.data ? attachVerifiedDomains(result.data) : null,
+ error: result.error
+ };
+}
+
+export async function getSsoConnectionByDomain(
+ client: SupabaseClient<Database>,
+ domain: string
+) {
+ if (!isSsoEnabled()) return { data: null, error: null };
+
+ const normalized = domain.toLowerCase();
+
+ // !inner makes the embedded filter restrict the parent rows, so this returns
+ // the active connection holding a VERIFIED claim on the domain — or nothing.
+ // The attached `domains` is the matched domain only (sufficient for every
+ // caller: they read companyId / requireSso, or just presence).
+ const result = await client
+ .from("ssoConnection")
+ .select("*, ssoDomain!inner(domain, status)")
+ .eq("ssoDomain.domain", normalized)
+ .eq("ssoDomain.status", "verified")
+ .eq("active", true)
+ .maybeSingle();
+
+ return {
+ data: result.data ? attachVerifiedDomains(result.data) : null,
+ error: result.error
+ };
+}
+
+export async function getSsoConnectionByProviderId(
+ client: SupabaseClient<Database>,
+ providerId: string
+) {
+ if (!isSsoEnabled()) return { data: null, error: null };
+
+ const result = await client
+ .from("ssoConnection")
+ .select("*, ssoDomain(domain, status)")
+ .eq("providerId", providerId)
+ .eq("active", true)
+ .maybeSingle();
+
+ return {
+ data: result.data ? attachVerifiedDomains(result.data) : null,
+ error: result.error
+ };
+}
+
+/**
+ * Pre-auth enforcement helper: TRUE only when the email's domain is covered by
+ * an ACTIVE connection whose "Require SSO" toggle is on. Callers refuse magic
+ * link, OAuth, and passkey logins server-side when this returns true. Only a
+ * VERIFIED domain can enforce — a pending claim must never lock a domain's
+ * users out of their ordinary login methods.
+ */
+export async function isSsoRequiredForEmail(
+ client: SupabaseClient<Database>,
+ email: string
+) {
+ const domain = email.split("@")[1]?.toLowerCase();
+ if (!domain) return false;
+
+ const connection = await getSsoConnectionByDomain(client, domain);
+ return connection.data?.requireSso === true;
+}
+
+/**
+ * SSO-aware invite link. When the invitee's email domain belongs to the
+ * INVITING company's active SSO connection, the invite email points at the
+ * login page (prefilled email; the SSO callback consumes the pending invite —
+ * the code is not needed in the URL). Otherwise it points at the ordinary
+ * code-based invite route. The companyId check matters when another company
+ * owns the domain: the callback consumes invites scoped to the connection's
+ * own company, so routing this company's invite through that SSO login would
+ * strand it — the code link is the one that works.
+ */
+export async function getSsoAwareInviteLink(
+ client: SupabaseClient<Database>,
+ email: string,
+ code: string,
+ companyId: string
+): Promise<string> {
+ const domain = email.split("@")[1];
+ if (domain) {
+ const ssoConnection = await getSsoConnectionByDomain(client, domain);
+ if (ssoConnection.data && ssoConnection.data.companyId === companyId) {
+ return `${getAppUrl()}/login?email=${encodeURIComponent(email)}`;
+ }
+ }
+ return `${getAppUrl()}/invite/${code}`;
+}
+
+// --- "ssoDomain" management ------------------------------------------------
+
+/** Every domain row for the company, pending and verified, for the admin UI. */
+export async function getSsoDomains(
+ client: SupabaseClient<Database>,
+ companyId: string
+) {
+ if (!isSsoEnabled()) return { data: null, error: null };
+
+ return client
+ .from("ssoDomain")
+ .select("*")
+ .eq("companyId", companyId)
+ .order("createdAt", { ascending: true });
+}
+
+async function getVerifiedDomains(
+ serviceRole: SupabaseClient<Database>,
+ connectionId: string,
+ companyId: string
+): Promise<{ data: string[] | null; error: unknown }> {
+ const result = await serviceRole
+ .from("ssoDomain")
+ .select("domain")
+ .eq("connectionId", connectionId)
+ .eq("companyId", companyId)
+ .eq("status", "verified");
+ return {
+ data: result.data ? result.data.map((d) => d.domain) : null,
+ error: result.error
+ };
+}
+
+/**
+ * Push the connection's current VERIFIED domain set to its GoTrue provider —
+ * GoTrue's auth.sso_domains is what routes signInWithSSO({ domain }), so it
+ * must never contain an unverified claim.
+ */
+async function syncGoTrueDomains(
+ serviceRole: SupabaseClient<Database>,
+ connection: {
+ id: string;
+ companyId: string;
+ providerId: string;
+ metadataUrl: string | null;
+ metadataXml: string | null;
+ }
+): Promise<{ error: string | null }> {
+ const verified = await getVerifiedDomains(
+ serviceRole,
+ connection.id,
+ connection.companyId
+ );
+ if (verified.data === null) {
+ return { error: "Failed to read verified domains" };
+ }
+ const provider = await updateGoTrueSsoProvider(connection.providerId, {
+ metadataUrl: connection.metadataUrl ?? undefined,
+ metadataXml: connection.metadataXml ?? undefined,
+ domains: verified.data
+ });
+ return { error: provider.error };
+}
+
+const DOMAIN_ALREADY_ADDED_ERROR =
+ "This domain has already been added — check its status in the Email Domains list";
+// Generic on purpose — a distinct message would let any tenant probe whether
+// a domain is verified elsewhere.
+const DOMAIN_VERIFY_CONFLICT_ERROR = "Failed to verify domain";
+
+export async function addSsoDomain(
+ serviceRole: SupabaseClient<Database>,
+ args: { companyId: string; domain: string; userId: string }
+) {
+ if (!isSsoEnabled()) return { data: null, error: DISABLED_ERROR };
+
+ const connection = await getSsoConnection(serviceRole, args.companyId);
+ if (connection.error) {
+ return { data: null, error: connection.error.message };
+ }
+ if (!connection.data) {
+ return { data: null, error: "No active SAML SSO connection found" };
+ }
+
+ const normalized = args.domain.trim().toLowerCase();
+
+ // Claims are per-company; the unique constraint is the race-safe backstop.
+ const existing = await serviceRole
+ .from("ssoDomain")
+ .select("id")
+ .eq("companyId", args.companyId)
+ .eq("domain", normalized)
+ .maybeSingle();
+ if (existing.error) {
+ return { data: null, error: existing.error.message };
+ }
+ if (existing.data) {
+ return { data: null, error: DOMAIN_ALREADY_ADDED_ERROR };
+ }
+
+ const insert = await serviceRole
+ .from("ssoDomain")
+ .insert({
+ companyId: args.companyId,
+ connectionId: connection.data.id,
+ domain: normalized,
+ verificationToken: generateVerificationToken(),
+ createdBy: args.userId
+ })
+ .select("*")
+ .single();
+ if (insert.error) {
+ return { data: null, error: insert.error.message };
+ }
+ return { data: insert.data, error: null };
+}
+
+/**
+ * Run the DNS TXT check for a pending domain. On success the row flips to
+ * verified and the GoTrue provider's domain list is updated. GoTrue is synced
+ * BEFORE the row flips: if the row update then fails, GoTrue routes the domain
+ * but the callback's verified-domain check still rejects it (safe); the
+ * reverse order could mark a domain enforcing requireSso while signInWithSSO
+ * cannot route it — a lockout.
+ */
+export async function verifySsoDomain(
+ serviceRole: SupabaseClient<Database>,
+ args: { companyId: string; domainId: string; userId: string }
+) {
+ if (!isSsoEnabled()) return { data: null, error: DISABLED_ERROR };
+
+ const row = await serviceRole
+ .from("ssoDomain")
+ .select("*")
+ .eq("id", args.domainId)
+ .eq("companyId", args.companyId)
+ .maybeSingle();
+ if (row.error) {
+ return { data: null, error: row.error.message };
+ }
+ if (!row.data) {
+ return { data: null, error: "Domain not found" };
+ }
+ if (row.data.status === "verified") {
+ return { data: { verified: true as const }, error: null };
+ }
+
+ const connection = await getSsoConnection(serviceRole, args.companyId);
+ if (connection.error || !connection.data) {
+ return {
+ data: null,
+ error: connection.error?.message ?? "No active SAML SSO connection found"
+ };
+ }
+ if (connection.data.id !== row.data.connectionId) {
+ // The row belongs to a deactivated connection — it cannot route logins.
+ return { data: null, error: "Domain is not part of the active connection" };
+ }
+
+ // Another company already verified this domain — refuse before the DNS check.
+ const conflict = await serviceRole
+ .from("ssoDomain")
+ .select("companyId")
+ .eq("domain", row.data.domain)
+ .eq("status", "verified")
+ .neq("companyId", args.companyId)
+ .maybeSingle();
+ if (conflict.error) {
+ return { data: null, error: conflict.error.message };
+ }
+ if (conflict.data) {
+ return { data: null, error: DOMAIN_VERIFY_CONFLICT_ERROR };
+ }
+
+ const check = await checkDomainVerification(
+ row.data.domain,
+ row.data.verificationToken
+ );
+ if (!check.verified) {
+ return { data: check, error: null };
+ }
+
+ const provider = await updateGoTrueSsoProvider(connection.data.providerId, {
+ metadataUrl: connection.data.metadataUrl ?? undefined,
+ metadataXml: connection.data.metadataXml ?? undefined,
+ domains: [...connection.data.domains, row.data.domain]
+ });
+ if (provider.error) {
+ return { data: null, error: provider.error };
+ }
+
+ const update = await serviceRole
+ .from("ssoDomain")
+ .update({
+ status: "verified",
+ verifiedAt: datetime.timestamp(),
+ updatedBy: args.userId,
+ updatedAt: datetime.timestamp()
+ })
+ .eq("id", args.domainId)
+ .eq("companyId", args.companyId)
+ .select("*")
+ .single();
+ if (update.error) {
+ // Compensate: pull the domain back out of GoTrue so routing and the
+ // app-side verified set cannot disagree.
+ await syncGoTrueDomains(serviceRole, connection.data);
+ return { data: null, error: update.error.message };
+ }
+
+ return { data: { verified: true as const }, error: null };
+}
+
+export async function removeSsoDomain(
+ serviceRole: SupabaseClient<Database>,
+ args: { companyId: string; domainId: string }
+) {
+ if (!isSsoEnabled()) return { data: null, error: DISABLED_ERROR };
+
+ const row = await serviceRole
+ .from("ssoDomain")
+ .select("*")
+ .eq("id", args.domainId)
+ .eq("companyId", args.companyId)
+ .maybeSingle();
+ if (row.error) {
+ return { data: null, error: row.error.message };
+ }
+ if (!row.data) {
+ return { data: null, error: "Domain not found" };
+ }
+
+ const wasVerified = row.data.status === "verified";
+
+ const removal = await serviceRole
+ .from("ssoDomain")
+ .delete()
+ .eq("id", args.domainId)
+ .eq("companyId", args.companyId);
+ if (removal.error) {
+ return { data: null, error: removal.error };
+ }
+
+ // Row first, GoTrue second: if the sync fails, GoTrue still routes the
+ // domain but the callback's verified-domain check rejects it (safe), and the
+ // next verify/remove re-syncs. The reverse order's failure mode is a domain
+ // the app treats as covered that signInWithSSO cannot route.
+ if (wasVerified) {
+ const connection = await getSsoConnection(serviceRole, args.companyId);
+ if (connection.data && connection.data.id === row.data.connectionId) {
+ const sync = await syncGoTrueDomains(serviceRole, connection.data);
+ if (sync.error) {
+ return { data: null, error: sync.error };
+ }
+ }
+ }
+
+ return { data: row.data, error: null };
+}
+
+// --- Admin mutations -------------------------------------------------------
+// Service-role only: the GoTrue provider wrappers carry the service-role key,
+// and the route action gates on `update: settings` before calling these.
+
+export async function upsertSsoConnection(
+ serviceRole: SupabaseClient<Database>,
+ args: {
+ companyId: string;
+ metadataUrl?: string;
+ metadataXml?: string;
+ userId: string;
+ }
+) {
+ if (!isSsoEnabled()) return { data: null, error: DISABLED_ERROR };
+
+ const { companyId, metadataUrl, metadataXml, userId } = args;
+
+ const existing = await getSsoConnection(serviceRole, companyId);
+ if (existing.error) {
+ return { data: null, error: existing.error };
+ }
+
+ if (existing.data) {
+ const provider = await updateGoTrueSsoProvider(existing.data.providerId, {
+ metadataUrl,
+ metadataXml,
+ domains: existing.data.domains
+ });
+ if (provider.error) {
+ return { data: null, error: provider.error };
+ }
+
+ return serviceRole
+ .from("ssoConnection")
+ .update({
+ metadataUrl: metadataUrl ?? null,
+ metadataXml: metadataXml ?? null,
+ updatedBy: userId,
+ updatedAt: datetime.timestamp()
+ })
+ .eq("id", existing.data.id)
+ .eq("companyId", companyId)
+ .select("*")
+ .single();
+ }
+
+ // A new connection starts with no domains — they are claimed and DNS-verified
+ // individually afterwards, and only verified domains ever reach GoTrue.
+ const provider = await createGoTrueSsoProvider({
+ metadataUrl,
+ metadataXml,
+ domains: []
+ });
+ if (provider.error !== null) {
+ return { data: null, error: provider.error };
+ }
+
+ const insert = await serviceRole
+ .from("ssoConnection")
+ .insert({
+ companyId,
+ providerId: provider.data.id,
+ metadataUrl: metadataUrl ?? null,
+ metadataXml: metadataXml ?? null,
+ createdBy: userId
+ })
+ .select("*")
+ .single();
+
+ if (insert.error) {
+ // Compensating action — the GoTrue provider sits outside the DB
+ // transaction, so an orphaned provider would linger unreferenced.
+ await deleteGoTrueSsoProvider(provider.data.id);
+ }
+
+ return insert;
+}
+
+export async function updateSsoRequireSso(
+ serviceRole: SupabaseClient<Database>,
+ args: { companyId: string; requireSso: boolean; userId: string }
+) {
+ if (!isSsoEnabled()) return { data: null, error: DISABLED_ERROR };
+
+ const existing = await getSsoConnection(serviceRole, args.companyId);
+ if (existing.error) {
+ return { data: null, error: existing.error };
+ }
+ if (!existing.data) {
+ return { data: null, error: "No active SAML SSO connection found" };
+ }
+
+ return serviceRole
+ .from("ssoConnection")
+ .update({
+ requireSso: args.requireSso,
+ updatedBy: args.userId,
+ updatedAt: datetime.timestamp()
+ })
+ .eq("id", existing.data.id)
+ .eq("companyId", args.companyId)
+ .select("*")
+ .single();
+}
+
+export async function deactivateSsoConnection(
+ serviceRole: SupabaseClient<Database>,
+ args: { companyId: string; userId: string }
+) {
+ if (!isSsoEnabled()) return { data: null, error: DISABLED_ERROR };
+
+ const existing = await getSsoConnection(serviceRole, args.companyId);
+ if (existing.error) {
+ return { data: null, error: existing.error };
+ }
+ if (!existing.data) {
+ return { data: null, error: "No active SAML SSO connection found" };
+ }
+
+ // Flip the row inactive BEFORE deleting the GoTrue provider. The reverse
+ // order has a lockout failure mode: provider deleted, row update fails →
+ // SAML is dead while the still-active row keeps enforcing Require SSO, and
+ // only manual SQL recovers. This order's failure modes are both safe — a
+ // failed row update touches nothing in GoTrue, and a failed provider delete
+ // is compensated below.
+ const update = await serviceRole
+ .from("ssoConnection")
+ .update({
+ active: false,
+ updatedBy: args.userId,
+ updatedAt: datetime.timestamp()
+ })
+ .eq("id", existing.data.id)
+ .eq("companyId", args.companyId)
+ .select("*")
+ .single();
+ if (update.error) {
+ return update;
+ }
+
+ // Release the domain claims: the inactive row survives for audit, but its
+ // domains must not stay claimed under a dead connection — the global
+ // UNIQUE("domain") would otherwise block this company (or the domain's real
+ // owner) from ever registering them again. A re-created connection starts
+ // with no domains and re-verifies, matching the modal's "cannot be undone".
+ const domainRemoval = await serviceRole
+ .from("ssoDomain")
+ .delete()
+ .eq("connectionId", existing.data.id)
+ .eq("companyId", args.companyId);
+ if (domainRemoval.error) {
+ await serviceRole
+ .from("ssoConnection")
+ .update({
+ active: true,
+ updatedBy: args.userId,
+ updatedAt: datetime.timestamp()
+ })
+ .eq("id", existing.data.id)
+ .eq("companyId", args.companyId);
+ return { data: null, error: domainRemoval.error };
+ }
+
+ const removal = await deleteGoTrueSsoProvider(existing.data.providerId);
+ if (removal.error) {
+ // Compensate: restore the row so the admin sees "still active, try again"
+ // rather than an orphaned GoTrue provider squatting on the domains (GoTrue
+ // enforces domain uniqueness, so an orphan blocks re-creating the
+ // connection later). The domain rows are already deleted — after a retry
+ // the admin re-adds and re-verifies them, which is safe; the opposite
+ // leftover (claimed domains under a dead connection) is not. If this
+ // restore ALSO fails, the leftover state is "row inactive + provider
+ // alive" — the safe half: the callback rejects logins against an inactive
+ // connection and nobody is locked out.
+ await serviceRole
+ .from("ssoConnection")
+ .update({
+ active: true,
+ updatedBy: args.userId,
+ updatedAt: datetime.timestamp()
+ })
+ .eq("id", existing.data.id)
+ .eq("companyId", args.companyId);
+ return { data: null, error: removal.error };
+ }
+
+ return update;
+}
diff --git a/packages/ee/src/sso/gate.ts b/packages/ee/src/sso/gate.ts
new file mode 100644
index 0000000000..f135945caf
--- /dev/null
+++ b/packages/ee/src/sso/gate.ts
@@ -0,0 +1,14 @@
+import { CarbonEdition, isAuthProviderEnabled } from "@carbon/env";
+import { Edition } from "@carbon/utils";
+
+/**
+ * The ONE flag for SAML SSO availability: Enterprise edition AND `sso` in
+ * AUTH_PROVIDERS. Every SSO entry point checks this — the login button, the
+ * settings screen/action, the public sso.check endpoint, and the callbacks'
+ * SSO branch — and the connection lookups in this module self-gate on it, so
+ * a Community/Cloud deployment behaves as if SSO does not exist even when an
+ * operator has enabled GoTrue SAML.
+ */
+export function isSsoEnabled(): boolean {
+ return CarbonEdition === Edition.Enterprise && isAuthProviderEnabled("sso");
+}
diff --git a/packages/ee/src/sso/index.server.ts b/packages/ee/src/sso/index.server.ts
new file mode 100644
index 0000000000..5f046d6744
--- /dev/null
+++ b/packages/ee/src/sso/index.server.ts
@@ -0,0 +1,41 @@
+export {
+ addSsoDomain,
+ deactivateSsoConnection,
+ getSsoAwareInviteLink,
+ getSsoConnection,
+ getSsoConnectionByDomain,
+ getSsoConnectionByProviderId,
+ getSsoDomains,
+ isSsoRequiredForEmail,
+ removeSsoDomain,
+ updateSsoRequireSso,
+ upsertSsoConnection,
+ verifySsoDomain
+} from "./connections.server";
+export { isSsoEnabled } from "./gate";
+export {
+ createGoTrueSsoProvider,
+ deleteGoTrueSsoProvider,
+ getGoTrueSsoProvider,
+ getSamlSpUrls,
+ updateGoTrueSsoProvider
+} from "./provider.server";
+export {
+ buildArchivedEmail,
+ deleteJitSsoUser,
+ linkSsoIdentityToUser,
+ mergeInvitePermissions,
+ migrateUserToSso,
+ uncoveredSsoDomainError
+} from "./provisioning.server";
+export {
+ getSsoProviderIdFromSession,
+ getSsoProviderIdFromUser
+} from "./session.server";
+export {
+ checkDomainVerification,
+ generateVerificationToken,
+ getTxtRecord,
+ TXT_HOST_PREFIX,
+ TXT_VALUE_PREFIX
+} from "./verification.server";
diff --git a/packages/ee/src/sso/provider.server.ts b/packages/ee/src/sso/provider.server.ts
new file mode 100644
index 0000000000..2b05666fc7
--- /dev/null
+++ b/packages/ee/src/sso/provider.server.ts
@@ -0,0 +1,142 @@
+import { SUPABASE_SERVICE_ROLE_KEY, SUPABASE_URL } from "@carbon/env";
+import { getLogger } from "@carbon/logger";
+import { isSsoEnabled } from "./gate";
+
+const log = getLogger("ee");
+
+type SsoProviderArgs = {
+ metadataUrl?: string;
+ metadataXml?: string;
+ domains: string[];
+};
+
+type SsoResult<T> = { data: T; error: null } | { data: null; error: string };
+
+// Provider registration goes through the GoTrue admin SSO API — providers are
+// registered per GoTrue instance, at runtime, with the service-role key. The
+// body is `{ type: "saml", metadata_url?, metadata_xml?, domains }`. The
+// app-side company binding lives in the "ssoConnection" table — these wrappers
+// only manage the provider side.
+const adminSsoUrl = (path = "") =>
+ `${SUPABASE_URL}/auth/v1/admin/sso/providers${path}`;
+
+async function ssoProviderRequest<T>(
+ method: "GET" | "POST" | "PUT" | "DELETE",
+ path: string,
+ body?: Record<string, unknown>
+): Promise<SsoResult<T>> {
+ if (!isSsoEnabled()) {
+ return {
+ data: null,
+ error: "Single sign-on requires Carbon Enterprise edition"
+ };
+ }
+
+ const url = adminSsoUrl(path);
+ const headers: Record<string, string> = {
+ apikey: SUPABASE_SERVICE_ROLE_KEY ?? "",
+ Authorization: `Bearer ${SUPABASE_SERVICE_ROLE_KEY}`,
+ "Content-Type": "application/json"
+ };
+
+ try {
+ const response = await fetch(url, {
+ method,
+ headers,
+ body: body ? JSON.stringify(body) : undefined
+ });
+
+ if (!response.ok) {
+ let message = response.statusText;
+ try {
+ const payload = await response.json();
+ message = payload?.msg ?? payload?.message ?? payload?.error ?? message;
+ } catch {
+ // non-JSON error body — keep statusText
+ }
+ log.error("SSO provider request failed", {
+ method,
+ path,
+ status: response.status,
+ message
+ });
+ return { data: null, error: message };
+ }
+
+ return { data: (await response.json()) as T, error: null };
+ } catch (e) {
+ const message =
+ e instanceof Error ? e.message : "SAML SSO provider request failed";
+ log.error("SSO provider request threw", {
+ method,
+ path,
+ message
+ });
+ return { data: null, error: message };
+ }
+}
+
+function toProviderBody(args: SsoProviderArgs) {
+ return {
+ type: "saml",
+ ...(args.metadataUrl ? { metadata_url: args.metadataUrl } : {}),
+ ...(args.metadataXml ? { metadata_xml: args.metadataXml } : {}),
+ domains: args.domains
+ };
+}
+
+export async function createGoTrueSsoProvider(
+ args: SsoProviderArgs
+): Promise<SsoResult<{ id: string }>> {
+ const result = await ssoProviderRequest<{ id: string }>(
+ "POST",
+ "",
+ toProviderBody(args)
+ );
+ if (result.error === null && !result.data?.id) {
+ return {
+ data: null,
+ error: "SAML SSO backend did not return a provider id"
+ };
+ }
+ return result;
+}
+
+export async function updateGoTrueSsoProvider(
+ providerId: string,
+ args: SsoProviderArgs
+): Promise<SsoResult<{ id: string }>> {
+ return ssoProviderRequest<{ id: string }>(
+ "PUT",
+ `/${providerId}`,
+ toProviderBody(args)
+ );
+}
+
+export async function deleteGoTrueSsoProvider(
+ providerId: string
+): Promise<SsoResult<{ id: string }>> {
+ return ssoProviderRequest<{ id: string }>("DELETE", `/${providerId}`);
+}
+
+export async function getGoTrueSsoProvider(
+ providerId: string
+): Promise<SsoResult<{ id: string; domains?: { domain: string }[] }>> {
+ return ssoProviderRequest<{ id: string; domains?: { domain: string }[] }>(
+ "GET",
+ `/${providerId}`
+ );
+}
+
+/**
+ * The SAML Service Provider URLs an IdP admin registers for this deployment.
+ *
+ * The URLs are un-prefixed on purpose: GoTrue self-declares its SP entityID
+ * and ACS from API_EXTERNAL_URL (no /auth/v1 prefix) and validates each
+ * assertion's Destination against that exact URL — Kong routes /sso/ for this
+ * (kong.yml auth-v1-sso).
+ */
+export function getSamlSpUrls(): { acsUrl: string; metadataUrl: string } {
+ const base = `${SUPABASE_URL}/sso/saml`;
+ return { acsUrl: `${base}/acs`, metadataUrl: `${base}/metadata` };
+}
diff --git a/packages/ee/src/sso/provisioning.server.test.ts b/packages/ee/src/sso/provisioning.server.test.ts
new file mode 100644
index 0000000000..8c2610c820
--- /dev/null
+++ b/packages/ee/src/sso/provisioning.server.test.ts
@@ -0,0 +1,263 @@
+import { describe, expect, it, vi } from "vitest";
+
+// Isolation mocks — provisioning's cache/redis/logger dependencies are stubbed
+// so the pure decision logic can be tested without dragging in the full module
+// graph. The Kysely db is a caller-supplied parameter and is not needed here.
+vi.mock("@carbon/auth", () => ({
+ getPermissionCacheKey: vi.fn((id: string) => `permissions:${id}`)
+}));
+
+vi.mock("@carbon/kv", () => ({
+ redis: { del: vi.fn().mockResolvedValue(null) }
+}));
+
+vi.mock("@carbon/logger", () => ({
+ getLogger: () => ({
+ info: vi.fn(),
+ warn: vi.fn(),
+ error: vi.fn(),
+ debug: vi.fn()
+ })
+}));
+
+vi.mock("@carbon/utils", () => ({
+ datetime: { timestamp: vi.fn(() => "2026-01-01T00:00:00.000Z") }
+}));
+
+const {
+ buildArchivedEmail,
+ deleteJitSsoUser,
+ mergeInvitePermissions,
+ uncoveredSsoDomainError
+} = await import("./provisioning.server");
+
+describe("buildArchivedEmail", () => {
+ it("is deterministic for the same inputs", () => {
+ expect(buildArchivedEmail("user_1", "[email protected]")).toEqual(
+ buildArchivedEmail("user_1", "[email protected]")
+ );
+ });
+
+ it("contains the old user id and preserves the full original email as a suffix", () => {
+ const archived = buildArchivedEmail("user_1", "[email protected]");
+ expect(archived).toContain("user_1");
+ expect(archived.endsWith("[email protected]")).toBe(true);
+ });
+
+ it("produces distinct archived emails for distinct old user ids", () => {
+ expect(buildArchivedEmail("user_1", "[email protected]")).not.toEqual(
+ buildArchivedEmail("user_2", "[email protected]")
+ );
+ });
+
+ it("never equals the original email (frees the unique email index)", () => {
+ expect(buildArchivedEmail("user_1", "[email protected]")).not.toEqual(
+ );
+ });
+});
+
+describe("mergeInvitePermissions", () => {
+ it("takes new keys as-is and concatenates existing keys (setUserPermissions semantics)", () => {
+ const merged = mergeInvitePermissions(
+ { sales_view: ["c1"] },
+ { sales_view: ["c2"], parts_view: ["c2"] }
+ );
+ expect(merged).toEqual({
+ sales_view: ["c1", "c2"],
+ parts_view: ["c2"]
+ });
+ });
+
+ it("does not mutate the current permission set", () => {
+ const current = { sales_view: ["c1"] };
+ mergeInvitePermissions(current, { sales_view: ["c2"] });
+ expect(current).toEqual({ sales_view: ["c1"] });
+ });
+
+ it("concatenates duplicates when the same grant is merged twice (matches setUserPermissions, which does not dedupe)", () => {
+ const once = mergeInvitePermissions({}, { sales_view: ["c2"] });
+ const twice = mergeInvitePermissions(once, { sales_view: ["c2"] });
+ expect(twice).toEqual({ sales_view: ["c2", "c2"] });
+ });
+
+ it('keeps "0" wildcard entries untouched when merging', () => {
+ const merged = mergeInvitePermissions(
+ { sales_view: ["0"], parts_update: ["0"] },
+ { sales_view: ["c2"] }
+ );
+ expect(merged).toEqual({
+ sales_view: ["0", "c2"],
+ parts_update: ["0"]
+ });
+ });
+});
+
+// In-memory model of the state the on_auth_user_created trigger leaves behind
+// for a JIT SSO user: an auth user plus its auto-created public."user" and
+// userPermission rows (no FK cascade between the schemas — that gap is the bug).
+function makeJitUserState(userId: string, options?: { memberOf?: string[] }) {
+ return {
+ authUsers: new Set([userId]),
+ publicUsers: new Set([userId]),
+ userPermissions: new Set([userId]),
+ memberships: new Set(options?.memberOf ?? [])
+ };
+}
+
+function makeFakeDb(state: ReturnType<typeof makeJitUserState>) {
+ const deleteFrom = (table: string) => {
+ let targetId: string | undefined;
+ const chain = {
+ where: (_column: string, _op: string, value: string) => {
+ targetId = value;
+ return chain;
+ },
+ execute: async () => {
+ if (targetId === undefined) return [];
+ if (table === "userPermission") state.userPermissions.delete(targetId);
+ if (table === "user") state.publicUsers.delete(targetId);
+ return [];
+ }
+ };
+ return chain;
+ };
+
+ return {
+ selectFrom: (_table: string) => ({
+ select: (_column: string) => ({
+ where: (_c: string, _op: string, value: string) => ({
+ limit: (_n: number) => ({
+ executeTakeFirst: async () =>
+ state.memberships.has(value) ? { companyId: "c1" } : undefined
+ })
+ })
+ })
+ }),
+ transaction: () => ({
+ execute: async (
+ cb: (trx: { deleteFrom: typeof deleteFrom }) => unknown
+ ) => cb({ deleteFrom })
+ })
+ } as never;
+}
+
+function makeFakeServiceRole(state: ReturnType<typeof makeJitUserState>) {
+ return {
+ auth: {
+ admin: {
+ deleteUser: vi.fn(async (id: string) => {
+ state.authUsers.delete(id);
+ return { data: {}, error: null };
+ })
+ }
+ }
+ } as never;
+}
+
+describe("deleteJitSsoUser", () => {
+ // The invite paths refuse when a public."user" row exists whose auth account
+ // is gone (authIdentityExists) — the orphan state this helper must prevent.
+ const isUninvitableOrphan = (
+ state: ReturnType<typeof makeJitUserState>,
+ userId: string
+ ) => state.publicUsers.has(userId) && !state.authUsers.has(userId);
+
+ it("removes the whole throwaway user after a no-invite rejection, so the email stays invitable", async () => {
+ const state = makeJitUserState("jit_user");
+ const result = await deleteJitSsoUser(
+ makeFakeServiceRole(state),
+ makeFakeDb(state),
+ "jit_user"
+ );
+
+ expect(result.error).toBeNull();
+ expect(result.data).toEqual({ deleted: true });
+ expect(state.authUsers.has("jit_user")).toBe(false);
+ expect(state.publicUsers.has("jit_user")).toBe(false);
+ expect(state.userPermissions.has("jit_user")).toBe(false);
+ // The regression: deleting only the auth half left this true, tripping
+ // "This user's auth account no longer exists" on the next invite.
+ expect(isUninvitableOrphan(state, "jit_user")).toBe(false);
+ });
+
+ it("refuses to delete a user with a company membership (never a linked/real account)", async () => {
+ const state = makeJitUserState("real_user", { memberOf: ["real_user"] });
+ const serviceRole = makeFakeServiceRole(state);
+ const result = await deleteJitSsoUser(
+ serviceRole,
+ makeFakeDb(state),
+ "real_user"
+ );
+
+ expect(result.data).toEqual({ deleted: false });
+ expect(result.error).toBeNull();
+ expect(state.authUsers.has("real_user")).toBe(true);
+ expect(state.publicUsers.has("real_user")).toBe(true);
+ expect(state.userPermissions.has("real_user")).toBe(true);
+ expect(
+ (serviceRole as { auth: { admin: { deleteUser: unknown } } }).auth.admin
+ .deleteUser
+ ).not.toHaveBeenCalled();
+ });
+
+ it("returns the auth deletion failure without recreating the orphan state", async () => {
+ const state = makeJitUserState("jit_user");
+ const serviceRole = {
+ auth: {
+ admin: {
+ deleteUser: vi
+ .fn()
+ .mockResolvedValue({ data: {}, error: { message: "gotrue down" } })
+ }
+ }
+ } as never;
+
+ const result = await deleteJitSsoUser(
+ serviceRole,
+ makeFakeDb(state),
+ "jit_user"
+ );
+
+ expect(result.data).toBeNull();
+ expect(result.error).toContain("gotrue down");
+ // Public rows go first: a failed auth delete leaves an auth-only remnant
+ // (self-healing on the next SSO attempt), never the un-invitable orphan.
+ expect(state.publicUsers.has("jit_user")).toBe(false);
+ expect(state.userPermissions.has("jit_user")).toBe(false);
+ expect(isUninvitableOrphan(state, "jit_user")).toBe(false);
+ });
+});
+
+describe("uncoveredSsoDomainError", () => {
+ const domains = ["acme.com", "acme.org"];
+
+ it("allows an email on a covered domain", () => {
+ expect(uncoveredSsoDomainError(domains, "[email protected]")).toBeNull();
+ expect(uncoveredSsoDomainError(domains, "[email protected]")).toBeNull();
+ });
+
+ it("is case-insensitive on the email side (stored domains are already lowercase)", () => {
+ expect(uncoveredSsoDomainError(domains, "[email protected]")).toBeNull();
+ });
+
+ it("refuses an email on an uncovered domain, naming the covered domains", () => {
+ const message = uncoveredSsoDomainError(domains, "[email protected]");
+ expect(message).toContain("acme.com, acme.org");
+ });
+
+ it("does not treat a subdomain as covered (matches GoTrue's exact-domain routing)", () => {
+ expect(
+ uncoveredSsoDomainError(domains, "[email protected]")
+ ).not.toBeNull();
+ });
+
+ it("does not treat a suffix-alike domain as covered", () => {
+ expect(uncoveredSsoDomainError(domains, "[email protected]")).not.toBeNull();
+ });
+
+ it("refuses a malformed email with no domain part", () => {
+ expect(uncoveredSsoDomainError(domains, "jane")).not.toBeNull();
+ expect(uncoveredSsoDomainError(domains, "jane@")).not.toBeNull();
+ });
+});
diff --git a/packages/ee/src/sso/provisioning.server.ts b/packages/ee/src/sso/provisioning.server.ts
new file mode 100644
index 0000000000..4deeef72a3
--- /dev/null
+++ b/packages/ee/src/sso/provisioning.server.ts
@@ -0,0 +1,436 @@
+import { getPermissionCacheKey } from "@carbon/auth";
+import type { Database } from "@carbon/database";
+import type { KyselyDatabase } from "@carbon/database/client";
+import { redis } from "@carbon/kv";
+import { getLogger } from "@carbon/logger";
+import { datetime } from "@carbon/utils";
+import type { SupabaseClient } from "@supabase/supabase-js";
+import type { Kysely } from "kysely";
+import { sql } from "kysely";
+
+const logger = getLogger("ee");
+
+/**
+ * Move the SAML identity GoTrue created for a duplicate auth user onto the
+ * account that already owns the email. This writes the auth schema directly
+ * (self-hosted Supabase — Carbon SSO's only supported deployment).
+ * The caller MUST have verified the asserted email's domain belongs to the
+ * SSO connection first (rogue-IdP defense), and deletes the duplicate auth
+ * user afterwards. After the move, every future SSO login resolves straight
+ * to the existing account — nothing is archived, magic link keeps working.
+ *
+ * Any "sso:" identity ALREADY on the target is deleted first: this function
+ * only runs when GoTrue minted a fresh duplicate, so the identity that just
+ * authenticated lives on `fromUserId` and a pre-existing one on `toUserId`
+ * can only point at a dead provider (deactivate → re-create). Left in place,
+ * getSsoProviderIdFromUser could resolve the stale provider id and lock the
+ * account out of SSO permanently. Both statements share one transaction, so
+ * a failed move never leaves the target with its old identity deleted; if
+ * the move itself fails, the next SSO login re-creates the duplicate and
+ * retries — self-healing.
+ */
+export async function linkSsoIdentityToUser(
+ db: Kysely<KyselyDatabase>,
+ {
+ fromUserId,
+ toUserId
+ }: {
+ fromUserId: string;
+ toUserId: string;
+ }
+): Promise<{ data: { moved: number } | null; error: string | null }> {
+ try {
+ const moved = await db.transaction().execute(async (trx) => {
+ await sql`
+ DELETE FROM auth.identities
+ WHERE user_id = ${toUserId}::uuid AND provider LIKE 'sso:%'
+ `.execute(trx);
+ const result = await sql`
+ UPDATE auth.identities
+ SET user_id = ${toUserId}::uuid, updated_at = now()
+ WHERE user_id = ${fromUserId}::uuid AND provider LIKE 'sso:%'
+ `.execute(trx);
+ return Number(result.numAffectedRows ?? 0);
+ });
+ return {
+ data: { moved },
+ error: null
+ };
+ } catch (err) {
+ logger.error("Failed to link SSO identity", {
+ fromUserId,
+ toUserId,
+ error: err
+ });
+ return {
+ data: null,
+ error:
+ err instanceof Error ? err.message : "Failed to link SAML SSO identity"
+ };
+ }
+}
+
+/**
+ * Remove a throwaway JIT SSO auth user COMPLETELY — the auth user AND the
+ * `public."user"` / `userPermission` rows the `on_auth_user_created` trigger
+ * auto-created for it. `public."user".id` has no FK to `auth.users`, so
+ * deleting only the auth half (what the callback's rejection paths once did)
+ * strands a profile row that trips `authIdentityExists` and makes the email
+ * permanently un-invitable.
+ *
+ * Guarded on zero `userToCompany` memberships — re-checked here, not just at
+ * the caller — so a linked or real account can never be deleted: a membership
+ * means the id was attached to a company and is not a throwaway. Public rows
+ * are deleted BEFORE the auth user: if the auth delete then fails, the remnant
+ * is auth-only, which the next SSO attempt (or invite) resolves by itself —
+ * never the un-invitable orphan.
+ */
+export async function deleteJitSsoUser(
+ serviceRole: SupabaseClient<Database>,
+ db: Kysely<KyselyDatabase>,
+ userId: string
+): Promise<{ data: { deleted: boolean } | null; error: string | null }> {
+ try {
+ const membership = await db
+ .selectFrom("userToCompany")
+ .select("companyId")
+ .where("userId", "=", userId)
+ .limit(1)
+ .executeTakeFirst();
+
+ if (membership) {
+ logger.warn("Refused to delete JIT SSO user with a company membership", {
+ userId
+ });
+ return { data: { deleted: false }, error: null };
+ }
+
+ await db.transaction().execute(async (trx) => {
+ await trx.deleteFrom("userPermission").where("id", "=", userId).execute();
+ await trx.deleteFrom("user").where("id", "=", userId).execute();
+ });
+
+ const removed = await serviceRole.auth.admin.deleteUser(userId);
+ if (removed.error) {
+ logger.error("Failed to delete JIT SSO auth user", {
+ userId,
+ error: removed.error
+ });
+ return { data: null, error: removed.error.message };
+ }
+
+ return { data: { deleted: true }, error: null };
+ } catch (err) {
+ logger.error("Failed to delete JIT SSO user", { userId, error: err });
+ return {
+ data: null,
+ error:
+ err instanceof Error ? err.message : "Failed to delete JIT SSO user"
+ };
+ }
+}
+
+/**
+ * The archived form of an INACTIVE email-holder's address. When a deactivated
+ * `user` row still owns the email an SSO invite needs, `migrateUserToSso`
+ * rewrites it to this form to free `index_user_email_key` for the new SSO
+ * user, while preserving the original email as a suffix (the `employees`
+ * view filters `u.active = TRUE`, so it is never displayed). Active accounts
+ * are never archived — the callback links them instead.
+ */
+export function buildArchivedEmail(oldUserId: string, email: string): string {
+ return `sso-archived+${oldUserId}+${email}`;
+}
+
+/**
+ * Merge invite grants into a user's existing permission set — the same
+ * semantics as `setUserPermissions` in the ERP users module (arrays are
+ * concatenated per key; new keys are taken as-is).
+ */
+export function mergeInvitePermissions(
+ current: Record<string, string[]>,
+ granted: Record<string, string[]>
+): Record<string, string[]> {
+ const merged = { ...current };
+ Object.entries(granted).forEach(([key, value]) => {
+ const existing = merged[key];
+ merged[key] = existing ? [...existing, ...value] : value;
+ });
+ return merged;
+}
+
+/**
+ * The refusal message for an employee invite whose email domain is outside the
+ * company's active SSO connection, or null when the invite may proceed. Match
+ * is exact per domain (a connection covering example.com does not cover
+ * sub.example.com — GoTrue routes SSO logins the same way). Stored domains are
+ * lowercased by the settings validator; the email is lowercased here.
+ */
+export function uncoveredSsoDomainError(
+ domains: string[],
+ email: string
+): string | null {
+ const domain = email.split("@")[1]?.trim().toLowerCase();
+ if (domain && domains.includes(domain)) {
+ return null;
+ }
+ return `Single sign-on is active for ${domains.join(
+ ", "
+ )}. Employees must be invited with an email on a covered domain — or add this domain to the SAML SSO connection in Settings → Security.`;
+}
+
+type InviteRow = Database["public"]["Tables"]["invite"]["Row"];
+
+type MigrateUserToSsoResult = {
+ data: {
+ userId: string;
+ alreadyAccepted: boolean;
+ } | null;
+ error: string | null;
+};
+
+/**
+ * Accept a pending invite for a new SSO auth identity in one transaction:
+ * insert the new `user` row, activate the invite-time account row for the
+ * invite's role (`employee` / `customerAccount` / `supplierAccount`), add
+ * company membership + invite permissions, and accept the invite (guarded by
+ * `acceptedAt IS NULL` under a FOR UPDATE lock).
+ *
+ * Existing ACTIVE accounts never reach this function — the callback's linking
+ * branch moves the SAML identity onto them before the membership check runs.
+ * This function only accepts invites for accounts with no active same-email
+ * predecessor. When an INACTIVE `user` row still holds the email, its address
+ * is rewritten to the archived form inside the transaction to free the unique
+ * email index for the fresh insert.
+ *
+ * Post-commit (best-effort, logged, never thrown): permission-cache
+ * invalidation for the new user id.
+ */
+export async function migrateUserToSso(
+ db: Kysely<KyselyDatabase>,
+ serviceRole: SupabaseClient<Database>,
+ {
+ newUserId,
+ email,
+ companyId,
+ invite
+ }: {
+ newUserId: string;
+ email: string;
+ companyId: string;
+ invite: Pick<InviteRow, "id" | "companyId" | "role" | "permissions">;
+ }
+): Promise<MigrateUserToSsoResult> {
+ // Pre-check outside the transaction (read only): does another `user` row —
+ // active or not — still hold this email? An active holder is a defensive
+ // refusal (the callback's linking branch should have absorbed it); an
+ // inactive holder must have its email freed before the fresh insert, or the
+ // unique email index fails the insert forever.
+ const emailHolderResult = await serviceRole
+ .from("user")
+ .select("id, active")
+ .eq("email", email.toLowerCase())
+ .neq("id", newUserId)
+ .maybeSingle();
+
+ if (emailHolderResult.error) {
+ return { data: null, error: emailHolderResult.error.message };
+ }
+
+ const emailHolder = emailHolderResult.data;
+
+ if (emailHolder?.active) {
+ return {
+ data: null,
+ error:
+ "An active account already owns this email and should have been linked automatically. Sign in with SAML SSO again; contact your administrator if this persists."
+ };
+ }
+
+ let result: { alreadyAccepted: boolean };
+
+ try {
+ result = await db.transaction().execute(async (trx) => {
+ // Lock the invite first: two concurrent SSO callbacks for the same user
+ // serialize here, and the loser sees `acceptedAt` set and does nothing.
+ const lockedInvite = await trx
+ .selectFrom("invite")
+ .select(["id", "acceptedAt", "revokedAt"])
+ .where("id", "=", invite.id)
+ .forUpdate()
+ .executeTakeFirst();
+
+ if (!lockedInvite) {
+ throw new Error("Invite no longer exists");
+ }
+ if (lockedInvite.revokedAt !== null) {
+ throw new Error("Invite has been revoked");
+ }
+ if (lockedInvite.acceptedAt !== null) {
+ return { alreadyAccepted: true };
+ }
+
+ // An inactive email-holder still owns the unique email index the new
+ // row needs — free it first. Guarded on `active = false` so a row that
+ // was reactivated between the pre-check and this statement is never
+ // touched (the insert below then fails loudly instead of silently
+ // hijacking a live account's email).
+ if (emailHolder) {
+ await trx
+ .updateTable("user")
+ .set({ email: buildArchivedEmail(emailHolder.id, email) })
+ .where("id", "=", emailHolder.id)
+ .where("active", "=", false)
+ .execute();
+ }
+
+ // Insert the new user row (the create_public_user trigger skipped it
+ // when another row still held the email).
+ const emailLocalPart = email.split("@")[0] ?? "";
+ await trx
+ .insertInto("user")
+ .values({
+ id: newUserId,
+ email: email.toLowerCase(),
+ active: true,
+ firstName: emailLocalPart,
+ lastName: "",
+ about: ""
+ })
+ .onConflict((oc) => oc.column("id").doNothing())
+ .execute();
+
+ // Activate the invite-time account row for the invite's role — the SSO
+ // path must finish everything acceptInvite's activate* helpers do, or a
+ // covered-domain customer/supplier invite is consumed while its portal
+ // account stays inactive. The row is keyed to this id (also covers a
+ // linked existing account accepting an invite). A missing row is a
+ // refusal, never an insert: `employee.employeeTypeId` and
+ // `customerAccount.customerId` / `supplierAccount.supplierId` are
+ // NOT NULL and the invite doesn't carry them — inventing one would be a
+ // silent privilege decision. Re-inviting recreates the row.
+ if (invite.role === "employee") {
+ const employeeRow = await trx
+ .updateTable("employee")
+ .set({ active: true })
+ .where("id", "=", newUserId)
+ .where("companyId", "=", companyId)
+ .returning("id")
+ .executeTakeFirst();
+
+ if (!employeeRow) {
+ throw new Error(
+ "No employee record exists for this invite. Ask an administrator to re-invite the user."
+ );
+ }
+ } else if (invite.role === "customer") {
+ const customerRow = await trx
+ .updateTable("customerAccount")
+ .set({ active: true })
+ .where("id", "=", newUserId)
+ .where("companyId", "=", companyId)
+ .returning("id")
+ .executeTakeFirst();
+
+ if (!customerRow) {
+ throw new Error(
+ "No customer account exists for this invite. Ask an administrator to re-invite the user."
+ );
+ }
+ } else if (invite.role === "supplier") {
+ const supplierRow = await trx
+ .updateTable("supplierAccount")
+ .set({ active: true })
+ .where("id", "=", newUserId)
+ .where("companyId", "=", companyId)
+ .returning("id")
+ .executeTakeFirst();
+
+ if (!supplierRow) {
+ throw new Error(
+ "No supplier account exists for this invite. Ask an administrator to re-invite the user."
+ );
+ }
+ }
+
+ // Company membership for the new user.
+ await trx
+ .insertInto("userToCompany")
+ .values({ userId: newUserId, companyId, role: invite.role })
+ .onConflict((oc) => oc.columns(["userId", "companyId"]).doNothing())
+ .execute();
+
+ // Merge invite permissions into userPermission (setUserPermissions
+ // semantics), under lock so concurrent grants don't lose writes.
+ const currentPermission = await trx
+ .selectFrom("userPermission")
+ .select("permissions")
+ .where("id", "=", newUserId)
+ .forUpdate()
+ .executeTakeFirst();
+
+ const mergedPermissions = mergeInvitePermissions(
+ (currentPermission?.permissions ?? {}) as Record<string, string[]>,
+ (invite.permissions ?? {}) as Record<string, string[]>
+ );
+ const mergedPermissionsJson = JSON.stringify(mergedPermissions);
+
+ await trx
+ .insertInto("userPermission")
+ .values({ id: newUserId, permissions: mergedPermissionsJson })
+ .onConflict((oc) =>
+ oc.column("id").doUpdateSet({ permissions: mergedPermissionsJson })
+ )
+ .execute();
+
+ // Accept the invite — guarded so a concurrent accept can never
+ // double-apply (we hold the row lock from the SELECT above).
+ await trx
+ .updateTable("invite")
+ .set({ acceptedAt: datetime.timestamp() })
+ .where("id", "=", invite.id)
+ .where("acceptedAt", "is", null)
+ .execute();
+
+ return { alreadyAccepted: false };
+ });
+ } catch (err) {
+ logger.error("SSO user migration failed", {
+ error: err,
+ newUserId,
+ companyId
+ });
+ return {
+ data: null,
+ error: err instanceof Error ? err.message : "Failed to migrate user"
+ };
+ }
+
+ if (result.alreadyAccepted) {
+ // A concurrent accept won the race and owns all side effects.
+ return {
+ data: { userId: newUserId, alreadyAccepted: true },
+ error: null
+ };
+ }
+
+ logger.info("SSO user migration committed", {
+ newUserId,
+ companyId
+ });
+
+ // Post-commit side effect: idempotent, failure-tolerant — log, never throw.
+ try {
+ await redis.del(getPermissionCacheKey(newUserId));
+ } catch (err) {
+ logger.error("Failed to invalidate permission cache after SSO migration", {
+ error: err,
+ userId: newUserId
+ });
+ }
+
+ return {
+ data: { userId: newUserId, alreadyAccepted: false },
+ error: null
+ };
+}
diff --git a/packages/ee/src/sso/session.server.ts b/packages/ee/src/sso/session.server.ts
new file mode 100644
index 0000000000..66db4e38cb
--- /dev/null
+++ b/packages/ee/src/sso/session.server.ts
@@ -0,0 +1,80 @@
+import { getLogger } from "@carbon/logger";
+import type { User } from "@supabase/supabase-js";
+import { decodeJwt } from "jose";
+
+const log = getLogger("ee");
+
+/**
+ * The SSO provider id from a user's IDENTITY LIST, or null when no SSO identity
+ * exists. GoTrue records SAML identities with provider "sso:<providerId>"; the
+ * same value appears on app_metadata.provider for SSO-only users.
+ *
+ * WARNING: this answers "does this user HAVE an SSO identity", NOT "did this
+ * session authenticate via SSO". Once an account is linked, its permanent
+ * "sso:" identity makes every login — including Google OAuth and magic link —
+ * look like SSO through this lens. Session classification (Require SSO
+ * enforcement, MFA skip) must use getSsoProviderIdFromSession, which reads the
+ * session's own `amr` claim.
+ */
+export function getSsoProviderIdFromUser(user: User): string | null {
+ for (const identity of user.identities ?? []) {
+ if (identity.provider?.startsWith("sso:")) {
+ return identity.provider.slice("sso:".length);
+ }
+ }
+ const provider = user.app_metadata?.provider;
+ if (typeof provider === "string" && provider.startsWith("sso:")) {
+ return provider.slice("sso:".length);
+ }
+ return null;
+}
+
+/**
+ * The SSO provider id for THIS SESSION, or null when the session did not
+ * authenticate via SAML — regardless of what identities the user has linked.
+ *
+ * Classification comes from the session JWT's `amr` claim (GoTrue: an array of
+ * `{ method, timestamp }`; a SAML login carries `method: "sso/saml"`). Only
+ * when the session is genuinely SAML-authenticated is the provider id resolved
+ * from the user's identity list. A linked account's Google/magic-link login has
+ * the "sso:" identity but no "sso/saml" amr entry, and correctly returns null.
+ *
+ * The token is decoded WITHOUT verification: it was just minted for us by
+ * GoTrue via the service role, so its integrity is not in question here — only
+ * its claims are read. Defensive failures (undecodable token, missing amr)
+ * return null, failing CLOSED toward the non-SSO path where Require SSO
+ * enforcement lives.
+ */
+export function getSsoProviderIdFromSession(
+ accessToken: string,
+ user: User
+): string | null {
+ let payload: Record<string, unknown>;
+ try {
+ payload = decodeJwt(accessToken);
+ } catch {
+ log.info(
+ "SSO session check: access token could not be decoded; treating session as non-SSO"
+ );
+ return null;
+ }
+
+ const amr = payload.amr;
+ if (!Array.isArray(amr)) {
+ // Unexpected on GoTrue v2.189 — a genuine SAML login always carries amr.
+ log.info(
+ "SSO session check: amr claim missing from access token; treating session as non-SSO"
+ );
+ return null;
+ }
+
+ const isSamlSession = amr.some(
+ (entry) =>
+ typeof entry === "object" &&
+ entry !== null &&
+ (entry as { method?: unknown }).method === "sso/saml"
+ );
+ if (!isSamlSession) return null;
+
+ return getSsoProviderIdFromUser(user);
+}
diff --git a/packages/ee/src/sso/sso.server.test.ts b/packages/ee/src/sso/sso.server.test.ts
new file mode 100644
index 0000000000..6c79169259
--- /dev/null
+++ b/packages/ee/src/sso/sso.server.test.ts
@@ -0,0 +1,447 @@
+import type { User, UserIdentity } from "@supabase/supabase-js";
+import { describe, expect, it, vi } from "vitest";
+
+// Isolation mocks — the SSO module reads env constants and constructs a logger
+// at module load; stub them so the pure logic runs alone. `enabled` makes the
+// isSsoEnabled() gate controllable per test (CarbonEdition stays Enterprise;
+// the AUTH_PROVIDERS half of the gate flips).
+const enabled = { sso: true };
+
+vi.mock("@carbon/env", async () => {
+ const { Edition } =
+ await vi.importActual<typeof import("@carbon/utils")>("@carbon/utils");
+ return {
+ SUPABASE_URL: "http://localhost",
+ SUPABASE_SERVICE_ROLE_KEY: "test-service-role-key",
+ getAppUrl: () => "http://localhost:3000",
+ CarbonEdition: Edition.Enterprise,
+ isAuthProviderEnabled: (provider: string) =>
+ provider === "sso" && enabled.sso
+ };
+});
+
+vi.mock("@carbon/logger", () => ({
+ getLogger: () => ({
+ info: vi.fn(),
+ warn: vi.fn(),
+ error: vi.fn(),
+ debug: vi.fn()
+ })
+}));
+
+// Stub the DNS challenge so no test resolves real TXT records.
+const { checkDomainVerificationMock } = vi.hoisted(() => ({
+ checkDomainVerificationMock: vi.fn()
+}));
+vi.mock("./verification.server", () => ({
+ generateVerificationToken: () => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+ checkDomainVerification: checkDomainVerificationMock
+}));
+
+const { getSsoProviderIdFromSession, getSsoProviderIdFromUser } = await import(
+ "./session.server"
+);
+const {
+ addSsoDomain,
+ getSsoAwareInviteLink,
+ getSsoConnection,
+ isSsoRequiredForEmail,
+ upsertSsoConnection,
+ verifySsoDomain
+} = await import("./connections.server");
+
+function makeUser(overrides: {
+ identityProviders?: string[];
+ appMetadataProvider?: string;
+}): User {
+ const identities = overrides.identityProviders?.map(
+ (provider, i) =>
+ ({
+ id: `identity_${i}`,
+ user_id: "user_1",
+ identity_id: `identity_${i}`,
+ identity_data: {},
+ provider,
+ created_at: "2026-01-01T00:00:00.000Z",
+ last_sign_in_at: "2026-01-01T00:00:00.000Z"
+ }) satisfies UserIdentity
+ );
+
+ return {
+ id: "user_1",
+ aud: "authenticated",
+ app_metadata:
+ overrides.appMetadataProvider !== undefined
+ ? { provider: overrides.appMetadataProvider }
+ : {},
+ user_metadata: {},
+ created_at: "2026-01-01T00:00:00.000Z",
+ ...(identities ? { identities } : {})
+ } as User;
+}
+
+describe("getSsoProviderIdFromUser", () => {
+ it('extracts the provider id from an "sso:"-prefixed identity', () => {
+ const user = makeUser({ identityProviders: ["sso:abc-123"] });
+ expect(getSsoProviderIdFromUser(user)).toBe("abc-123");
+ });
+
+ it("finds the sso identity even when other identities come first", () => {
+ const user = makeUser({ identityProviders: ["google", "sso:abc-123"] });
+ expect(getSsoProviderIdFromUser(user)).toBe("abc-123");
+ });
+
+ it("falls back to app_metadata.provider when no identity is sso-prefixed", () => {
+ const user = makeUser({ appMetadataProvider: "sso:def-456" });
+ expect(getSsoProviderIdFromUser(user)).toBe("def-456");
+ });
+
+ it("returns null for google, azure, and email providers", () => {
+ for (const provider of ["google", "azure", "email"]) {
+ const user = makeUser({
+ identityProviders: [provider],
+ appMetadataProvider: provider
+ });
+ expect(getSsoProviderIdFromUser(user)).toBeNull();
+ }
+ });
+
+ it("returns null when the user has no identities and no provider metadata", () => {
+ const user = makeUser({});
+ expect(getSsoProviderIdFromUser(user)).toBeNull();
+ });
+});
+
+// Unsigned-format JWT: decodeJwt only requires three dot-separated segments and
+// never checks the signature, so a literal placeholder third segment suffices.
+function makeToken(payload: Record<string, unknown>): string {
+ const b64url = (value: Record<string, unknown>) =>
+ Buffer.from(JSON.stringify(value)).toString("base64url");
+ return `${b64url({ alg: "HS256", typ: "JWT" })}.${b64url(payload)}.sig`;
+}
+
+describe("getSsoProviderIdFromSession", () => {
+ const ssoUser = makeUser({ identityProviders: ["google", "sso:abc-123"] });
+
+ it("returns the provider id when the session's amr contains sso/saml", () => {
+ const token = makeToken({
+ amr: [{ method: "sso/saml", timestamp: 1755700000 }]
+ });
+ expect(getSsoProviderIdFromSession(token, ssoUser)).toBe("abc-123");
+ });
+
+ it("returns null for a non-SSO session even when the user HAS an sso identity (linked account)", () => {
+ // The bug case: a linked account logging in via Google/magic link must not
+ // be classified as SSO just because its identity list carries "sso:".
+ const token = makeToken({
+ amr: [{ method: "oauth", timestamp: 1755700000 }]
+ });
+ expect(getSsoProviderIdFromSession(token, ssoUser)).toBeNull();
+ });
+
+ it("returns null when the amr claim is missing (fail closed)", () => {
+ const token = makeToken({ sub: "user_1" });
+ expect(getSsoProviderIdFromSession(token, ssoUser)).toBeNull();
+ });
+
+ it("returns null for a malformed token (fail closed)", () => {
+ expect(getSsoProviderIdFromSession("not-a-jwt", ssoUser)).toBeNull();
+ });
+
+ it("returns null when the session is SAML but the user has no sso identity", () => {
+ const token = makeToken({
+ amr: [{ method: "sso/saml", timestamp: 1755700000 }]
+ });
+ const user = makeUser({ identityProviders: ["google"] });
+ expect(getSsoProviderIdFromSession(token, user)).toBeNull();
+ });
+});
+
+// Chainable supabase-client stub: every builder method records its args and
+// returns the builder; maybeSingle resolves the canned result. Enough surface
+// for the ssoConnection lookups without a real PostgREST client.
+function makeSsoClient(result: { data: unknown; error: unknown }) {
+ const calls: Record<string, unknown[][]> = {};
+ // biome-ignore lint/suspicious/noExplicitAny: test stub
+ const builder: any = {};
+ for (const method of ["from", "select", "contains", "eq"]) {
+ builder[method] = (...args: unknown[]) => {
+ (calls[method] ??= []).push(args);
+ return builder;
+ };
+ }
+ builder.maybeSingle = async () => result;
+ return { client: builder, calls };
+}
+
+describe("getSsoAwareInviteLink", () => {
+ it("routes a covered-domain invite to the login page with the email prefilled", async () => {
+ const { client } = makeSsoClient({
+ data: { id: "sso_1", companyId: "company_1" },
+ error: null
+ });
+ await expect(
+ getSsoAwareInviteLink(client, "[email protected]", "CODE123", "company_1")
+ ).resolves.toBe("http://localhost:3000/login?email=jane%40acme.com");
+ });
+
+ it("routes an uncovered-domain invite to the ordinary code link", async () => {
+ const { client } = makeSsoClient({ data: null, error: null });
+ await expect(
+ getSsoAwareInviteLink(client, "[email protected]", "CODE123", "company_1")
+ ).resolves.toBe("http://localhost:3000/invite/CODE123");
+ });
+
+ it("uses the code link when ANOTHER company's connection covers the domain", async () => {
+ // The SSO callback consumes invites scoped to the connection's own
+ // company, so routing this company's invite through the other tenant's
+ // SSO login would strand it.
+ const { client } = makeSsoClient({
+ data: { id: "sso_1", companyId: "company_other" },
+ error: null
+ });
+ await expect(
+ getSsoAwareInviteLink(client, "[email protected]", "CODE123", "company_1")
+ ).resolves.toBe("http://localhost:3000/invite/CODE123");
+ });
+
+ it("URL-encodes plus-addressed emails in the login link", async () => {
+ const { client } = makeSsoClient({
+ data: { id: "sso_1", companyId: "company_1" },
+ error: null
+ });
+ await expect(
+ getSsoAwareInviteLink(
+ client,
+ "CODE123",
+ "company_1"
+ )
+ ).resolves.toBe("http://localhost:3000/login?email=jane%2Btest%40acme.com");
+ });
+
+ it("falls back to the code link without querying when the email has no domain", async () => {
+ const { client, calls } = makeSsoClient({
+ data: { id: "sso_1", companyId: "company_1" },
+ error: null
+ });
+ await expect(
+ getSsoAwareInviteLink(client, "jane", "CODE123", "company_1")
+ ).resolves.toBe("http://localhost:3000/invite/CODE123");
+ expect(calls.from).toBeUndefined();
+ });
+});
+
+describe("isSsoRequiredForEmail", () => {
+ it("is true only when the covering connection has requireSso on", async () => {
+ const { client } = makeSsoClient({
+ data: { requireSso: true },
+ error: null
+ });
+ await expect(isSsoRequiredForEmail(client, "[email protected]")).resolves.toBe(
+ true
+ );
+ });
+
+ it("is false for a covered connection with requireSso off", async () => {
+ const { client } = makeSsoClient({
+ data: { requireSso: false },
+ error: null
+ });
+ await expect(isSsoRequiredForEmail(client, "[email protected]")).resolves.toBe(
+ false
+ );
+ });
+
+ it("is false when no active connection covers the domain", async () => {
+ const { client } = makeSsoClient({ data: null, error: null });
+ await expect(isSsoRequiredForEmail(client, "[email protected]")).resolves.toBe(
+ false
+ );
+ });
+
+ it("fails open to false on a lookup error (the login refusal must not brick non-SSO tenants)", async () => {
+ const { client } = makeSsoClient({
+ data: null,
+ error: { message: "boom" }
+ });
+ await expect(isSsoRequiredForEmail(client, "[email protected]")).resolves.toBe(
+ false
+ );
+ });
+
+ it("is false without querying when the email has no domain", async () => {
+ const { client, calls } = makeSsoClient({
+ data: { requireSso: true },
+ error: null
+ });
+ await expect(isSsoRequiredForEmail(client, "jane")).resolves.toBe(false);
+ expect(calls.from).toBeUndefined();
+ });
+
+ it("matches the domain case-insensitively (lowercased before the lookup)", async () => {
+ const { client, calls } = makeSsoClient({
+ data: { requireSso: true },
+ error: null
+ });
+ await expect(isSsoRequiredForEmail(client, "[email protected]")).resolves.toBe(
+ true
+ );
+ expect(calls.eq).toContainEqual(["ssoDomain.domain", "acme.com"]);
+ });
+
+ it("only matches VERIFIED domain claims (pending claims must not enforce)", async () => {
+ const { client, calls } = makeSsoClient({
+ data: { requireSso: true },
+ error: null
+ });
+ await expect(isSsoRequiredForEmail(client, "[email protected]")).resolves.toBe(
+ true
+ );
+ expect(calls.eq).toContainEqual(["ssoDomain.status", "verified"]);
+ });
+});
+
+describe("getSsoConnection domains mapping", () => {
+ it("attaches VERIFIED domains only and strips the embed", async () => {
+ const { client } = makeSsoClient({
+ data: {
+ id: "sso_1",
+ companyId: "company_1",
+ ssoDomain: [
+ { domain: "acme.com", status: "verified" },
+ { domain: "pending.com", status: "pending" }
+ ]
+ },
+ error: null
+ });
+ const result = await getSsoConnection(client, "company_1");
+ expect(result.data?.domains).toEqual(["acme.com"]);
+ expect(result.data).not.toHaveProperty("ssoDomain");
+ });
+
+ it("attaches an empty domains array when the connection has no claims", async () => {
+ const { client } = makeSsoClient({
+ data: { id: "sso_1", companyId: "company_1" },
+ error: null
+ });
+ const result = await getSsoConnection(client, "company_1");
+ expect(result.data?.domains).toEqual([]);
+ });
+});
+
+// Exclusivity attaches to verification, not the claim — pending rows never
+// conflict across companies, so squatting is impossible.
+describe("ssoDomain claim exclusivity", () => {
+ const activeConnection = {
+ data: {
+ id: "conn_1",
+ companyId: "c1",
+ providerId: "p1",
+ metadataUrl: null,
+ metadataXml: null,
+ active: true
+ },
+ error: null
+ };
+
+ const chainFor = (result: { data: unknown; error: unknown }) => {
+ const chain = {
+ select: () => chain,
+ eq: () => chain,
+ neq: () => chain,
+ maybeSingle: async () => result
+ };
+ return chain;
+ };
+
+ it("refuses the company's OWN duplicate before inserting (pending claims never conflict across companies)", async () => {
+ const insertSpy = vi.fn();
+ const client = {
+ from: (table: string) => {
+ if (table === "ssoConnection") return chainFor(activeConnection);
+ return {
+ ...chainFor({ data: { id: "dom_1" }, error: null }),
+ insert: insertSpy
+ };
+ }
+ } as never;
+
+ const result = await addSsoDomain(client, {
+ companyId: "c1",
+ domain: "Acme.com",
+ userId: "user_1"
+ });
+ expect(result.data).toBeNull();
+ expect(result.error).toContain("already been added");
+ expect(result.error).not.toContain("another company");
+ expect(insertSpy).not.toHaveBeenCalled();
+ });
+
+ it("refuses verification when another company already verified the domain — with a GENERIC message (no oracle) and no DNS lookup", async () => {
+ checkDomainVerificationMock.mockClear();
+ let ssoDomainCall = 0;
+ const client = {
+ from: (table: string) => {
+ if (table === "ssoConnection") return chainFor(activeConnection);
+ ssoDomainCall += 1;
+ return chainFor(
+ ssoDomainCall === 1
+ ? {
+ data: {
+ id: "dom_1",
+ companyId: "c1",
+ connectionId: "conn_1",
+ domain: "acme.com",
+ verificationToken: "tok",
+ status: "pending"
+ },
+ error: null
+ }
+ : { data: { companyId: "c2" }, error: null }
+ );
+ }
+ } as never;
+
+ const result = await verifySsoDomain(client, {
+ companyId: "c1",
+ domainId: "dom_1",
+ userId: "user_1"
+ });
+ expect(result.data).toBeNull();
+ expect(result.error).toBe("Failed to verify domain");
+ expect(result.error).not.toContain("another company");
+ expect(checkDomainVerificationMock).not.toHaveBeenCalled();
+ });
+});
+
+describe("isSsoEnabled gate (AUTH_PROVIDERS half toggled off)", () => {
+ it("makes the lookups answer 'no connection' WITHOUT querying, and refuses admin mutations", async () => {
+ enabled.sso = false;
+ try {
+ const { client, calls } = makeSsoClient({
+ data: { requireSso: true },
+ error: null
+ });
+ await expect(
+ isSsoRequiredForEmail(client, "[email protected]")
+ ).resolves.toBe(false);
+ await expect(
+ getSsoAwareInviteLink(client, "[email protected]", "CODE123", "c1")
+ ).resolves.toBe("http://localhost:3000/invite/CODE123");
+ expect(calls.from).toBeUndefined();
+
+ const upsert = await upsertSsoConnection(client, {
+ companyId: "c1",
+ metadataUrl: "https://idp.example.com/metadata",
+ userId: "user_1"
+ });
+ expect(upsert.error).toBe(
+ "Single sign-on requires Carbon Enterprise edition"
+ );
+ expect(calls.from).toBeUndefined();
+ } finally {
+ enabled.sso = true;
+ }
+ });
+});
diff --git a/packages/ee/src/sso/verification.server.test.ts b/packages/ee/src/sso/verification.server.test.ts
new file mode 100644
index 0000000000..4b6a098427
--- /dev/null
+++ b/packages/ee/src/sso/verification.server.test.ts
@@ -0,0 +1,120 @@
+import { beforeEach, describe, expect, it, vi } from "vitest";
+
+// The Resolver is the only piece of node:dns the module touches. Each test
+// programs `resolveTxt` and asserts the discriminated result — the module must
+// never throw, whatever the resolver does.
+const resolveTxt = vi.fn();
+const setServers = vi.fn();
+
+vi.mock("node:dns/promises", () => ({
+ Resolver: class {
+ setServers = setServers;
+ resolveTxt = resolveTxt;
+ }
+}));
+
+const {
+ checkDomainVerification,
+ generateVerificationToken,
+ getTxtRecord,
+ TXT_HOST_PREFIX,
+ TXT_VALUE_PREFIX
+} = await import("./verification.server");
+
+function dnsError(code: string) {
+ const e = new Error(code) as NodeJS.ErrnoException;
+ e.code = code;
+ return e;
+}
+
+beforeEach(() => {
+ resolveTxt.mockReset();
+ setServers.mockClear();
+});
+
+describe("generateVerificationToken", () => {
+ it("returns 32 hex chars (128 bits) and never repeats", () => {
+ const a = generateVerificationToken();
+ const b = generateVerificationToken();
+ expect(a).toMatch(/^[0-9a-f]{32}$/);
+ expect(a).not.toBe(b);
+ });
+});
+
+describe("getTxtRecord", () => {
+ it("builds the underscore challenge host and prefixed value", () => {
+ expect(getTxtRecord("acme.com", "abc123")).toEqual({
+ host: `${TXT_HOST_PREFIX}.acme.com`,
+ value: `${TXT_VALUE_PREFIX}=abc123`
+ });
+ });
+});
+
+describe("checkDomainVerification", () => {
+ const token = "a".repeat(32);
+ const expected = `${TXT_VALUE_PREFIX}=${token}`;
+
+ it("verifies when a TXT record matches the token exactly", async () => {
+ resolveTxt.mockResolvedValue([["unrelated"], [expected]]);
+ await expect(checkDomainVerification("acme.com", token)).resolves.toEqual({
+ verified: true
+ });
+ expect(resolveTxt).toHaveBeenCalledWith(`${TXT_HOST_PREFIX}.acme.com`);
+ });
+
+ it("joins a chunked TXT record before comparing (255-byte chunk split)", async () => {
+ const mid = Math.floor(expected.length / 2);
+ resolveTxt.mockResolvedValue([
+ [expected.slice(0, mid), expected.slice(mid)]
+ ]);
+ await expect(checkDomainVerification("acme.com", token)).resolves.toEqual({
+ verified: true
+ });
+ });
+
+ it("reports token_mismatch when records exist but none match", async () => {
+ resolveTxt.mockResolvedValue([[`${TXT_VALUE_PREFIX}=${"b".repeat(32)}`]]);
+ await expect(checkDomainVerification("acme.com", token)).resolves.toEqual({
+ verified: false,
+ reason: "token_mismatch"
+ });
+ });
+
+ it("reports no_record for an empty answer", async () => {
+ resolveTxt.mockResolvedValue([]);
+ await expect(checkDomainVerification("acme.com", token)).resolves.toEqual({
+ verified: false,
+ reason: "no_record"
+ });
+ });
+
+ it("reports no_record for NXDOMAIN (record not published yet)", async () => {
+ resolveTxt.mockRejectedValue(dnsError("ENOTFOUND"));
+ await expect(checkDomainVerification("acme.com", token)).resolves.toEqual({
+ verified: false,
+ reason: "no_record"
+ });
+ });
+
+ it("reports no_record for ENODATA (name exists, no TXT)", async () => {
+ resolveTxt.mockRejectedValue(dnsError("ENODATA"));
+ await expect(checkDomainVerification("acme.com", token)).resolves.toEqual({
+ verified: false,
+ reason: "no_record"
+ });
+ });
+
+ it("reports dns_error for a timeout instead of throwing", async () => {
+ resolveTxt.mockRejectedValue(dnsError("ETIMEOUT"));
+ await expect(checkDomainVerification("acme.com", token)).resolves.toEqual({
+ verified: false,
+ reason: "dns_error"
+ });
+ });
+
+ it("pins the public resolvers", async () => {
+ resolveTxt.mockResolvedValue([]);
+ await checkDomainVerification("acme.com", token);
+ expect(setServers).toHaveBeenCalledWith(["1.1.1.1", "8.8.8.8"]);
+ });
+});
diff --git a/packages/ee/src/sso/verification.server.ts b/packages/ee/src/sso/verification.server.ts
new file mode 100644
index 0000000000..3a1b6f9577
--- /dev/null
+++ b/packages/ee/src/sso/verification.server.ts
@@ -0,0 +1,81 @@
+import { randomBytes } from "node:crypto";
+import { Resolver } from "node:dns/promises";
+
+// DNS TXT ownership challenge for SSO email domains. The admin publishes
+// _carbon-challenge.<domain> TXT "carbon-domain-verification=<token>"
+// and Carbon resolves it server-side. The underscore host keeps the record out
+// of the apex TXT set and cannot collide with a real hostname (RFC 8552); the
+// prefixed value self-identifies among other vendors' records. The token is
+// 128 bits from the CSPRNG and unique per (company, domain) row, so a record
+// one tenant's DNS operator published can never be replayed to claim the
+// domain for another tenant. The check runs against pinned public resolvers
+// rather than the host's — a self-hosted box's resolver may serve an internal
+// view of the zone, and the c-ares defaults can back off for over a minute
+// against a black-holed server.
+
+export const TXT_HOST_PREFIX = "_carbon-challenge";
+export const TXT_VALUE_PREFIX = "carbon-domain-verification";
+
+const DNS_SERVERS = ["1.1.1.1", "8.8.8.8"];
+const DNS_TIMEOUT_MS = 5000;
+const DNS_TRIES = 2;
+
+export function generateVerificationToken(): string {
+ return randomBytes(16).toString("hex");
+}
+
+/** The exact record the admin must publish — the UI and the checker share it. */
+export function getTxtRecord(
+ domain: string,
+ token: string
+): { host: string; value: string } {
+ return {
+ host: `${TXT_HOST_PREFIX}.${domain}`,
+ value: `${TXT_VALUE_PREFIX}=${token}`
+ };
+}
+
+export type DomainVerificationResult =
+ | { verified: true }
+ | {
+ verified: false;
+ reason: "no_record" | "token_mismatch" | "dns_error";
+ };
+
+/**
+ * Resolve the challenge TXT record and require an exact token match. Never
+ * throws — every failure collapses to a reason the action can phrase for the
+ * admin. A TXT record arrives as an array of ≤255-byte chunks; the chunks are
+ * one logical string and are joined before comparison.
+ */
+export async function checkDomainVerification(
+ domain: string,
+ token: string
+): Promise<DomainVerificationResult> {
+ const resolver = new Resolver({ timeout: DNS_TIMEOUT_MS, tries: DNS_TRIES });
+ resolver.setServers(DNS_SERVERS);
+
+ const { host, value } = getTxtRecord(domain, token);
+
+ try {
+ const records = await resolver.resolveTxt(host);
+ const values = records.map((chunks) => chunks.join(""));
+ if (values.includes(value)) {
+ return { verified: true };
+ }
+ return {
+ verified: false,
+ reason: values.length > 0 ? "token_mismatch" : "no_record"
+ };
+ } catch (e) {
+ const code = (e as NodeJS.ErrnoException)?.code;
+ // ENOTFOUND: the challenge hostname does not resolve at all — for a TXT
+ // query that is the ordinary "record not published yet" answer (NXDOMAIN
+ // on _carbon-challenge.<domain> even when <domain> itself exists).
+ // ENODATA: the name exists but holds no TXT records.
+ if (code === "ENOTFOUND" || code === "ENODATA") {
+ return { verified: false, reason: "no_record" };
+ }
+ return { verified: false, reason: "dns_error" };
+ }
+}
diff --git a/packages/env/src/index.ts b/packages/env/src/index.ts
index 74478797fb..e2027c75f1 100644
--- a/packages/env/src/index.ts
+++ b/packages/env/src/index.ts
@@ -115,7 +115,7 @@ export function getEnv(
* Server env
*/
-export type AuthProvider = "email" | "google" | "azure" | "passkey";
+export type AuthProvider = "email" | "google" | "azure" | "passkey" | "sso";
export const AUTH_PROVIDERS =
getEnv("AUTH_PROVIDERS", {
@@ -343,7 +343,6 @@ export const SUPABASE_AUTH_EXTERNAL_GOOGLE_CLIENT_ID = getEnv(
isSecret: true
}
);
-
export const SESSION_SECRET = getEnv("SESSION_SECRET");
export const SESSION_KEY = "auth";
export const SESSION_ERROR_KEY = "error";
diff --git a/packages/glossary/src/terms.ts b/packages/glossary/src/terms.ts
index 5bae9c73a7..376014b9c1 100644
--- a/packages/glossary/src/terms.ts
+++ b/packages/glossary/src/terms.ts
@@ -2017,5 +2017,19 @@ export const terms = {
"workflow-webhook-headers": {
term: msg`Webhook Headers`,
definition: msg`Extra information sent with the request, such as an authorization key; header values are hidden in run history, though the names stay readable.`
+ },
+ "single-sign-on": {
+ term: msg`Single sign-on (SSO)`,
+ definition: msg`An Enterprise sign-in method where everyone on a company's registered email domains authenticates through the company's own SAML identity provider instead of a magic link, so IT grants and revokes access centrally.`,
+ href: "/docs/platform/single-sign-on"
+ },
+ "identity-provider": {
+ term: msg`Identity provider (IdP)`,
+ definition: msg`The system a company uses to manage its people's logins — Okta, Entra ID, or Google Workspace — which vouches for who someone is when they sign in to Carbon via SSO.`,
+ href: "/docs/platform/single-sign-on"
+ },
+ "magic-link": {
+ term: msg`Magic link`,
+ definition: msg`Carbon's default passwordless sign-in: an emailed one-time link that signs you in when opened, with no password to remember or leak.`
}
} as const satisfies Record<string, GlossaryEntry>;
diff --git a/packages/jobs/src/inngest/functions/tasks/user-admin.ts b/packages/jobs/src/inngest/functions/tasks/user-admin.ts
index 6583613ed1..998fe28180 100644
--- a/packages/jobs/src/inngest/functions/tasks/user-admin.ts
+++ b/packages/jobs/src/inngest/functions/tasks/user-admin.ts
@@ -2,10 +2,10 @@ import type { Result } from "@carbon/auth";
import { getCarbonServiceRole } from "@carbon/auth/client.server";
import { deactivateUser } from "@carbon/auth/users.server";
import { InviteEmail } from "@carbon/documents/email";
+import { getSsoAwareInviteLink } from "@carbon/ee/sso.server";
import {
CarbonEdition,
CONTROLLED_ENVIRONMENT,
- getAppUrl,
RESEND_DOMAIN
} from "@carbon/env";
import { sendEmail } from "@carbon/lib/resend.server";
@@ -97,6 +97,13 @@ export const userAdminFunction = inngest.createFunction(
.eq("id", existingInvite.data.createdBy)
.single();
+ const inviteLink = await getSsoAwareInviteLink(
+ serviceRole,
+ user.data.email,
+ refreshed.data.code,
+ companyId
+ );
+
await sendEmail({
from: `Carbon <no-reply@${RESEND_DOMAIN}>`,
to: user.data.email,
@@ -111,7 +118,7 @@ export const userAdminFunction = inngest.createFunction(
email: user.data.email,
name: user.data.fullName ?? "",
companyName: company.data.name,
- inviteLink: `${getAppUrl()}/invite/${refreshed.data.code}`,
+ inviteLink,
ip,
location,
controlledEnvironment: CONTROLLED_ENVIRONMENT
diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.po
index e2416e05c2..6ffd5f03d6 100644
--- a/packages/locale/locales/de/erp.po
+++ b/packages/locale/locales/de/erp.po
@@ -475,9 +475,6 @@ msgstr "Eine Auftragfertigungskomponente, deren Teile zusammen in den übergeord
msgid "A managed cloud-hosted version of Carbon"
msgstr "Eine verwaltete, cloud-gehostete Version von Carbon."
-msgid "A managed version with all the advanced features"
-msgstr "Eine verwaltete Version mit allen erweiterten Funktionen."
-
msgid "A managed version with all the advanced features"
msgstr "Eine verwaltete Version mit allen erweiterten Funktionen"
@@ -977,6 +974,9 @@ msgstr "Anschaffungskosten"
msgid "Acquisition Date"
msgstr "Anschaffungsdatum"
+msgid "ACS URL"
+msgstr "ACS-URL"
+
msgid "Action"
msgstr "Aktion"
@@ -1055,6 +1055,9 @@ msgstr "Einen Kommentar hinzufügen..."
msgid "Add a custom pricing row to override quantity, price, shipping, lead time, and tax"
msgstr "Benutzerdefinierten Preiszeile hinzufügen, um Menge, Preis, Versand, Beschaffungszeit und Steuer zu übersteuern"
+msgid "Add a domain"
+msgstr "Domäne hinzufügen"
+
msgid "Add a materials section that lists each item on the bill of materials with its quantity."
msgstr "Materialien-Abschnitt hinzufügen, der jeden Artikel auf der Stückliste mit seiner Menge auflistet."
@@ -1235,6 +1238,9 @@ msgstr "Lieferant hinzufügen"
msgid "Add the next capability on the same system instead of buying another tool."
msgstr "Füge die nächste Fähigkeit auf demselben System hinzu, anstatt ein anderes Werkzeug zu kaufen."
+msgid "Add this TXT record at your DNS host, then click Verify. DNS changes can take a few minutes to propagate."
+msgstr "Fügen Sie diesen TXT-Eintrag bei Ihrem DNS-Host hinzu, klicken Sie dann auf Verifizieren. DNS-Änderungen können einige Minuten dauern, um sich auszubreiten."
+
msgid "Add Timecard"
msgstr "Zeitkarte hinzufügen"
@@ -1442,6 +1448,9 @@ msgstr "Eine Automatisierung, die Sie auf einer Leinwand erstellen: ein Auslöse
msgid "An engineering change: the affected items whose methods are revised on a draft and released together, superseding the versions they replace."
msgstr "Eine technische Änderung: die betroffenen Elemente, deren Methoden in einem Entwurf überarbeitet und zusammen freigegeben werden, und dabei die Versionen ersetzen, die sie ersetzen."
+msgid "An Enterprise sign-in method where everyone on a company's registered email domains authenticates through the company's own SAML identity provider instead of a magic link, so IT grants and revokes access centrally."
+msgstr "Eine Unternehmens-Anmeldemethode, bei der sich alle Benutzer in registrierten E-Mail-Domänen eines Unternehmens über den SAML-Identitätsanbieter des Unternehmens anmelden, statt über einen Magic Link, sodass die IT den Zugriff zentral gewähren und widerrufen kann."
+
msgid "An https request Carbon sends to a system of yours when a workflow reaches that step, carrying whatever headers and body you configured."
msgstr "Eine HTTPS-Anfrage, die Carbon an Ihr System sendet, wenn ein Workflow diesen Schritt erreicht, mit den von Ihnen konfigurierten Headern und Text."
@@ -1785,6 +1794,9 @@ msgstr "Möchten Sie Fertigungsaufträge für diesen Kundenauftrag wirklich erst
msgid "Are you sure you want to deactivate {0}?"
msgstr "Sind Sie sicher, dass Sie {0} deaktivieren möchten?"
+msgid "Are you sure you want to deactivate SAML SSO? Users on your registered domains will no longer be able to sign in through your identity provider. This cannot be undone."
+msgstr "Sind Sie sicher, dass Sie SAML SSO deaktivieren möchten? Benutzer auf Ihren registrierten Domänen können sich nicht mehr über Ihren Identitätsanbieter anmelden. Dies kann nicht rückgängig gemacht werden."
+
#. placeholder {0}: selectedCategory?.name
msgid "Are you sure you want to deactivate the {0} attribute category?"
msgstr "Sind Sie sicher, dass Sie die Attributkategorie {0} deaktivieren möchten?"
@@ -2890,6 +2902,9 @@ msgstr "Nur für Carbon · Geben Sie echte Ziele für diesen Kunden ein. Sie seh
msgid "Carbon-only · the customer sees this text, locked."
msgstr "Nur für Carbon · der Kunde sieht diesen Text, gesperrt."
+msgid "Carbon's default passwordless sign-in: an emailed one-time link that signs you in when opened, with no password to remember or leak."
+msgstr "Carbons standardmäßige passwortlose Anmeldung: Ein per E-Mail versendeter Einmal-Link, der Sie anmeldet, wenn Sie ihn öffnen, ohne dass Sie sich ein Passwort merken oder preisgeben müssen."
+
msgid "Carbon's name for a bill of material and bill of process (routing): the components plus the operations that make a part."
msgstr "Carbons Name für eine Stückliste und Arbeitsgangliste (Arbeitsplan): die Komponenten plus die Arbeitsgänge, die einen Teil ausmachen."
@@ -3459,6 +3474,9 @@ msgstr "Bestätigt, dass jede gebuchte Buchungszeile in der Periode gleiche Soll
msgid "Conflict reason"
msgstr "Konfliktgrund"
+msgid "Connect"
+msgstr "Verbinden"
+
msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."
msgstr "Verbinden Sie Carbon mit Ihren Buchhaltungs-, Projektmanagement- und CAD-Tools und vielem mehr."
@@ -3477,6 +3495,9 @@ msgstr "Verbinden Sie das Otherwise-Handle mit einem Knoten, um auszuführen, we
msgid "Connect the outside tools your company already runs on"
msgstr "Verbinden Sie die externen Tools, die Ihr Unternehmen bereits nutzt"
+msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."
+msgstr "Verbinden Sie Ihren Identitätsanbieter, indem Sie entweder seine Metadaten-URL oder sein Rohmetadaten-XML einfügen — genau eins von beiden."
+
msgid "Connected to"
msgstr "Verbunden mit"
@@ -3552,6 +3573,9 @@ msgstr "Inhalt"
msgid "Context"
msgstr "Kontext"
+msgid "Continue"
+msgstr "Weiter"
+
msgid "Contra-asset account for total depreciation of fixed assets"
msgstr "Gegenkonto für die gesamte Abschreibung von Anlagevermögen"
@@ -4561,6 +4585,9 @@ msgstr "Mitarbeiter deaktivieren"
msgid "Deactivate Process"
msgstr "Prozess deaktivieren"
+msgid "Deactivate Single Sign-On"
+msgstr "Single Sign-On deaktivieren"
+
msgid "Deactivate Supplier"
msgstr "Lieferant deaktivieren"
@@ -5881,6 +5908,9 @@ msgstr "E-Mail"
msgid "Email Address"
msgstr "E-Mail-Adresse"
+msgid "Email Domains"
+msgstr "E-Mail-Domänen"
+
msgid "Email notifications are not included in your company's current plan; email preferences will apply if they are enabled."
msgstr "E-Mail-Benachrichtigungen sind nicht in Ihrem aktuellen Unternehmensplan enthalten; E-Mail-Einstellungen werden angewendet, falls sie aktiviert sind."
@@ -7435,6 +7465,9 @@ msgstr "Telefon zu Hause"
msgid "Hop {depth}"
msgstr "Ebene {depth}"
+msgid "Host"
+msgstr "Host"
+
msgid "Host, secure, and back up the platform"
msgstr "Plattform hosten, sichern und sichern"
@@ -7594,6 +7627,18 @@ msgstr "Idempotenz-Schlüssel"
msgid "Identifiers"
msgstr "Bezeichner"
+msgid "Identity Provider"
+msgstr "Identitätsanbieter"
+
+msgid "Identity provider (IdP)"
+msgstr "Identitätsanbieter (IdP)"
+
+msgid "IdP Metadata URL"
+msgstr "IdP-Metadaten-URL"
+
+msgid "IdP Metadata XML"
+msgstr "IdP-Metadaten-XML"
+
msgid "IDs and descriptions are generated for raw materials."
msgstr "IDs und Beschreibungen werden für Rohstoffe generiert."
@@ -8503,6 +8548,9 @@ msgstr "Weniger manuelle Arbeit"
msgid "Less manual work, fewer errors"
msgstr "Weniger manuelle Arbeit, weniger Fehler"
+msgid "Let members sign in through your identity provider with SAML."
+msgstr "Ermöglichen Sie Mitgliedern, sich über Ihren Identitätsanbieter mit SAML anzumelden."
+
msgid "Let's Build"
msgstr "Bauen wir"
@@ -8793,6 +8841,9 @@ msgstr "MACRS-Konvention"
msgid "MACRS Property Class"
msgstr "MACRS-Eigenschaftsklasse"
+msgid "Magic link"
+msgstr "Magic Link"
+
msgid "Maintain a single part and item master"
msgstr "Verwalten Sie einen einzigen Teil- und Artikelstamm"
@@ -8871,6 +8922,9 @@ msgstr "Macht dieses Dokument aktiv und sichtbar."
msgid "Manage"
msgstr "Verwalten"
+msgid "Manage authentication and sign-in requirements for your company."
+msgstr "Verwalten Sie die Authentifizierungs- und Anmeldeanforderungen für Ihr Unternehmen."
+
msgid "Manage how shelf life is tracked, computed, and enforced across inventory."
msgstr "Verwalten Sie, wie die Haltbarkeit in Ihrem Bestand verfolgt, berechnet und durchgesetzt wird."
@@ -8904,9 +8958,6 @@ msgstr "Fertigung"
msgid "Map accounts"
msgstr "Konten zuordnen"
-msgid "Map Carbon accounts to the provider's chart of accounts. Posted journals push using the mapped provider account code."
-msgstr "Ordnen Sie Carbon-Konten dem Kontenplan des Anbieters zu. Gebuchte Buchungssätze werden mit der zugeordneten Anbieter-Kontonummer übertragen."
-
msgid "Map Extracted Invoice Lines"
msgstr "Extrahierte Rechnungspositionen zuordnen"
@@ -10210,6 +10261,9 @@ msgstr "Nicht eine Tabelle, sondern ein Hauptbuch-Saldo: Kosten sammeln sich, we
msgid "Not certified"
msgstr "Nicht zertifiziert"
+msgid "Not configured"
+msgstr "Nicht konfiguriert"
+
msgid "Not enough jobs to cover quantity"
msgstr "Nicht genug Fertigungsaufträge zur Abdeckung der Menge"
@@ -10927,6 +10981,9 @@ msgstr "Passkeys"
msgid "Passkeys are disabled"
msgstr "Passkeys sind deaktiviert"
+msgid "Paste the metadata XML if your identity provider does not publish a metadata URL"
+msgstr "Fügen Sie die Metadaten-XML ein, wenn Ihr Identitätsanbieter keine Metadaten-URL veröffentlicht"
+
msgid "Path"
msgstr "Pfad"
@@ -11606,9 +11663,15 @@ msgstr "Schützen Sie Ihr Unternehmen mit erweiterten Sicherheitskontrollen wie
msgid "Protects your company's data"
msgstr "Schützt die Daten Ihres Unternehmens"
+msgid "Prove ownership of each email domain with a DNS TXT record before it can route SAML SSO sign-ins. Add the record at DNS host, then click Verify — only verified domains participate in single sign-on."
+msgstr "Weisen Sie den Besitz jeder E-Mail-Domäne mit einem DNS-TXT-Eintrag nach, bevor sie SAML-SSO-Anmeldungen weiterleiten kann. Fügen Sie den Eintrag bei DNS-Host hinzu, klicken Sie dann auf Verifizieren – nur verifizierte Domänen nehmen an Single Sign-On teil."
+
msgid "Provide process knowledge and inputs"
msgstr "Prozesswissen und Eingaben bereitstellen"
+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."
+msgstr "Stellen Sie diese URLs Ihrem Identitätsanbieter (Okta, Entra ID, Google Workspace, usw.) zur Verfügung, wenn Sie Carbon als SAML-Anwendung registrieren."
+
msgid "Provider"
msgstr "Provider"
@@ -12479,9 +12542,6 @@ msgstr "Wunschtermin"
msgid "Require a 6-digit code from an authenticator app when signing in."
msgstr "Erfordert einen 6-stelligen Code aus einer Authentifikator-App beim Anmelden."
-msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected."
-msgstr "Eine Authentifizierungs-App ist erforderlich, bevor jemand dieses Unternehmen öffnen kann. Ihre anderen Unternehmen sind davon nicht betroffen."
-
msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."
msgstr "Erfordert eine Authentifizierungs-App, bevor jemand dieses Unternehmen öffnen kann. Ihre anderen Unternehmen sind nicht betroffen. Besuchen Sie die <0>Seite mit den Mitarbeiterkonten</0>, um den Status jeder Person zu sehen."
@@ -12494,6 +12554,9 @@ msgstr "Genehmigung für Bestellungen basierend auf Schwellenwertbeträgen erfor
msgid "Require approval for quality documents in your workflow"
msgstr "Genehmigung für Qualitätsdokumente in Ihrem Workflow erforderlich"
+msgid "Require SAML SSO"
+msgstr "SAML SSO erforderlich"
+
msgid "Require two-factor authentication"
msgstr "Zwei-Faktor-Authentifizierung erforderlich"
@@ -13035,6 +13098,9 @@ msgstr "Speichern und Überschreiben"
msgid "Save applications"
msgstr "Anwendungen speichern"
+msgid "Save changes"
+msgstr "Änderungen speichern"
+
msgid "Save contacts"
msgstr "Kontakte speichern"
@@ -13478,9 +13544,6 @@ msgstr "Selbst verwaltet"
msgid "Self-hosted or managed"
msgstr "Selbstgehostet oder verwaltet"
-msgid "Self-onboarding"
-msgstr "Selbstgesteuertes Onboarding"
-
msgid "Self-onboarding"
msgstr "Selbst-Onboarding"
@@ -13580,6 +13643,9 @@ msgstr "Dienstleistungsdetails"
msgid "Service ID"
msgstr "Service-ID"
+msgid "Service Provider Details"
+msgstr "Service-Provider-Details"
+
msgid "services"
msgstr "Dienstleistungen"
@@ -13909,9 +13975,6 @@ msgstr "Bei Carbon anmelden"
msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."
msgstr "Melden Sie sich mit Biometrie statt mit einem Magic Link an. Passkeys sind durch Face ID, Touch ID oder Ihre Geräte-PIN gesichert."
-msgid "Sign in with Email"
-msgstr "Mit E-Mail anmelden"
-
msgid "Sign in with Google"
msgstr "Mit Google anmelden"
@@ -13948,6 +14011,12 @@ msgstr "Die Anmeldung erfordert auch einen Einmalcode aus Ihrer Authentifizierun
msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."
msgstr "Die Anmeldung erfordert keinen Code mehr. Geben Sie den aktuellen 6-stelligen Code aus Ihrer Authentifikator-App ein, um zu bestätigen."
+msgid "Single Sign-On"
+msgstr "Single Sign-On"
+
+msgid "Single sign-on (SSO)"
+msgstr "Single Sign-On (SSO)"
+
msgid "Sites & locations"
msgstr "Standorte & Lagerorte"
@@ -14071,6 +14140,9 @@ msgstr "Beschaffungstyp"
msgid "Sourcing Type"
msgstr "Beschaffungstyp"
+msgid "SP Metadata URL"
+msgstr "SP-Metadaten-URL"
+
msgid "Spare Part Consumption"
msgstr "Ersatzteilverbrauch"
@@ -14334,9 +14406,6 @@ msgstr "Stripe sendet die Rechnung per E-Mail an den Kunden, daher ist eine Adre
msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
msgstr "Stripe hat noch keinen Kunden für diesen Carbon-Kunden. Beim Buchen wird einer auf Ihrem verbundenen Konto erstellt."
-msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
-msgstr "Stripe hat noch keinen Kunden für diesen Carbon-Kunden. Beim Buchen wird einer auf Ihrem verbundenen Konto erstellt."
-
msgid "Style of kanban output to show in the Kanban table"
msgstr "Stil der Kanban-Ausgabe, die in der Kanban-Tabelle angezeigt werden soll"
@@ -15390,6 +15459,9 @@ msgstr "Die Revisionsnummer des Teils"
msgid "The sales order line this job was created to supply, tying the job to the customer demand behind it."
msgstr "Die Kundenauftragsposition, für die dieser Fertigungsauftrag erstellt wurde und die den Fertigungsauftrag an die dahinter stehende Kundennachfrage koppelt."
+msgid "The SAML metadata URL published by your identity provider"
+msgstr "Die von Ihrem Identitätsanbieter veröffentlichte SAML-Metadaten-URL"
+
msgid "The schedule used to spread this asset's cost over its useful life (straight-line, declining balance, units of production)."
msgstr "Der Zeitplan, der verwendet wird, um die Kosten dieses Vermögenswerts über seine Nutzungsdauer zu verteilen (linear, degressiv, Produktionseinheiten)."
@@ -15480,6 +15552,9 @@ msgstr "Die Lieferanten, die diese Anfrage erhalten; jeder erhält seine eigene
msgid "The surface finishes available on your materials"
msgstr "Die auf Ihren Materialien verfügbaren Oberflächenfinishes"
+msgid "The system a company uses to manage its people's logins — Okta, Entra ID, or Google Workspace — which vouches for who someone is when they sign in to Carbon via SSO."
+msgstr "Das System, das ein Unternehmen zur Verwaltung der Anmeldungen seiner Mitarbeiter nutzt – Okta, Entra ID oder Google Workspace – das die Identität von Benutzern bestätigt, die sich über SSO bei Carbon anmelden."
+
msgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."
msgstr "Das System besteht jeden relevanten Akzeptanztest in Ihrem konfigurierten System mit Ihren Daten; die Daten werden validiert; und Sie geben die Freigabe. Dann Go-live."
@@ -15627,6 +15702,9 @@ msgstr "Diese Datei ist nicht mehr verfügbar, oder Sie haben keine Berechtigung
msgid "This Fiscal Year"
msgstr "Dieses Geschäftsjahr"
+msgid "This has no effect until an email domain is verified below."
+msgstr "Dies hat keine Auswirkung, bis eine E-Mail-Domäne unten verifiziert wird."
+
msgid "This information will be used on document headers"
msgstr "Diese Informationen werden in Dokumentkopfzeilen verwendet"
@@ -15643,9 +15721,6 @@ msgstr "Diese Einladung zum Beitritt zu {0} ist abgelaufen. Sie können eine neu
msgid "This invoice has no usable due date — choose one for Stripe."
msgstr "Diese Rechnung hat kein nutzbares Fälligkeitsdatum – wählen Sie eines für Stripe."
-msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
-msgstr "Diese Rechnung wird dem Stripe-Kunden in Rechnung gestellt, der bereits mit diesem Carbon-Kunden verknüpft ist. Um die Details zu ändern, bearbeiten Sie diese im Stripe Dashboard."
-
msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
msgstr "Diese Rechnung wird dem Stripe-Kunden in Rechnung gestellt, der bereits mit diesem Carbon-Kunden verknüpft ist. Um die Details zu ändern, bearbeiten Sie sie im Stripe-Dashboard."
@@ -16641,6 +16716,9 @@ msgstr "Benutzer und Gruppen, die dieses Dokument umbenennen, ersetzen oder neu
msgid "Users can update this value for themselves"
msgstr "Benutzer können diesen Wert für sich selbst aktualisieren"
+msgid "Users on covered domains can sign in only with SAML SSO; magic link, Google, and passkeys are refused."
+msgstr "Benutzer auf abgedeckten Domänen können sich nur mit SAML SSO anmelden; Magic Link, Google und Passkeys werden abgelehnt."
+
msgid "Users to Update"
msgstr "Benutzer zum Aktualisieren"
@@ -16725,6 +16803,9 @@ msgstr "Verifizierungsfehler"
msgid "Verification failed"
msgstr "Verifizierung fehlgeschlagen"
+msgid "Verified"
+msgstr "Verifiziert"
+
msgid "Verify"
msgstr "Verifizieren"
@@ -17656,6 +17737,9 @@ msgstr "Ihre kundenorientierten Preislisten"
msgid "Your data is accessible and reasonably clean"
msgstr "Ihre Daten sind zugänglich und angemessen bereinigt"
+msgid "Your DNS provider may auto-append your domain to the record name — if so, enter only the part before it (e.g. _carbon-challenge plus any subdomain)."
+msgstr "Ihr DNS-Anbieter kann Ihre Domäne möglicherweise automatisch an den Eintragsnamen anhängen – geben Sie in diesem Fall nur den Teil davor ein (z. B. _carbon-challenge plus eine beliebige Subdomain)."
+
msgid "Your Email"
msgstr "Ihre E-Mail"
diff --git a/packages/locale/locales/de/mes.po b/packages/locale/locales/de/mes.po
index bdcb2bfaf0..a42a37dc6e 100644
--- a/packages/locale/locales/de/mes.po
+++ b/packages/locale/locales/de/mes.po
@@ -280,6 +280,9 @@ msgstr "Verbraucht"
msgid "Consumed expired"
msgstr "Verbrauchte abgelaufen"
+msgid "Continue"
+msgstr "Weiter"
+
#. placeholder {0}: board.unplannedCost.days
msgid "Cost of unplanned maintenance, last {0} days"
msgstr "Kosten der ungeplanten Instandhaltung der letzten {0} Tage"
@@ -1269,9 +1272,6 @@ msgstr "Fehlbestand"
msgid "Short pick {itemName}"
msgstr "Kurzkommissionierung {itemName}"
-msgid "Sign in with Email"
-msgstr "Mit E-Mail anmelden"
-
msgid "Sign in with Google"
msgstr "Mit Google anmelden"
diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.po
index 965e6c9130..e9a634941e 100644
--- a/packages/locale/locales/en/erp.po
+++ b/packages/locale/locales/en/erp.po
@@ -974,6 +974,9 @@ msgstr "Acquisition Cost"
msgid "Acquisition Date"
msgstr "Acquisition Date"
+msgid "ACS URL"
+msgstr "ACS URL"
+
msgid "Action"
msgstr "Action"
@@ -1052,6 +1055,9 @@ msgstr "Add a comment..."
msgid "Add a custom pricing row to override quantity, price, shipping, lead time, and tax"
msgstr "Add a custom pricing row to override quantity, price, shipping, lead time, and tax"
+msgid "Add a domain"
+msgstr "Add a domain"
+
msgid "Add a materials section that lists each item on the bill of materials with its quantity."
msgstr "Add a materials section that lists each item on the bill of materials with its quantity."
@@ -1232,6 +1238,9 @@ msgstr "Add Supplier"
msgid "Add the next capability on the same system instead of buying another tool."
msgstr "Add the next capability on the same system instead of buying another tool."
+msgid "Add this TXT record at your DNS host, then click Verify. DNS changes can take a few minutes to propagate."
+msgstr "Add this TXT record at your DNS host, then click Verify. DNS changes can take a few minutes to propagate."
+
msgid "Add Timecard"
msgstr "Add Timecard"
@@ -1439,6 +1448,9 @@ msgstr "An automation you build on a canvas: one trigger, then steps that check
msgid "An engineering change: the affected items whose methods are revised on a draft and released together, superseding the versions they replace."
msgstr "An engineering change: the affected items whose methods are revised on a draft and released together, superseding the versions they replace."
+msgid "An Enterprise sign-in method where everyone on a company's registered email domains authenticates through the company's own SAML identity provider instead of a magic link, so IT grants and revokes access centrally."
+msgstr "An Enterprise sign-in method where everyone on a company's registered email domains authenticates through the company's own SAML identity provider instead of a magic link, so IT grants and revokes access centrally."
+
msgid "An https request Carbon sends to a system of yours when a workflow reaches that step, carrying whatever headers and body you configured."
msgstr "An https request Carbon sends to a system of yours when a workflow reaches that step, carrying whatever headers and body you configured."
@@ -1782,6 +1794,9 @@ msgstr "Are you sure you want to create jobs for this sales order? This will cre
msgid "Are you sure you want to deactivate {0}?"
msgstr "Are you sure you want to deactivate {0}?"
+msgid "Are you sure you want to deactivate SAML SSO? Users on your registered domains will no longer be able to sign in through your identity provider. This cannot be undone."
+msgstr "Are you sure you want to deactivate SAML SSO? Users on your registered domains will no longer be able to sign in through your identity provider. This cannot be undone."
+
#. placeholder {0}: selectedCategory?.name
msgid "Are you sure you want to deactivate the {0} attribute category?"
msgstr "Are you sure you want to deactivate the {0} attribute category?"
@@ -2887,6 +2902,9 @@ msgstr "Carbon-only · fill in real targets for this customer. They see the valu
msgid "Carbon-only · the customer sees this text, locked."
msgstr "Carbon-only · the customer sees this text, locked."
+msgid "Carbon's default passwordless sign-in: an emailed one-time link that signs you in when opened, with no password to remember or leak."
+msgstr "Carbon's default passwordless sign-in: an emailed one-time link that signs you in when opened, with no password to remember or leak."
+
msgid "Carbon's name for a bill of material and bill of process (routing): the components plus the operations that make a part."
msgstr "Carbon's name for a bill of material and bill of process (routing): the components plus the operations that make a part."
@@ -3456,6 +3474,9 @@ msgstr "Confirms every posted journal entry in the period has equal debits and c
msgid "Conflict reason"
msgstr "Conflict reason"
+msgid "Connect"
+msgstr "Connect"
+
msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."
msgstr "Connect Carbon to your accounting, project management, and CAD tools and much more."
@@ -3474,6 +3495,9 @@ msgstr "Connect the Otherwise handle to a node to run when no condition matches.
msgid "Connect the outside tools your company already runs on"
msgstr "Connect the outside tools your company already runs on"
+msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."
+msgstr "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."
+
msgid "Connected to"
msgstr "Connected to"
@@ -3549,6 +3573,9 @@ msgstr "Content"
msgid "Context"
msgstr "Context"
+msgid "Continue"
+msgstr "Continue"
+
msgid "Contra-asset account for total depreciation of fixed assets"
msgstr "Contra-asset account for total depreciation of fixed assets"
@@ -4558,6 +4585,9 @@ msgstr "Deactivate Employees"
msgid "Deactivate Process"
msgstr "Deactivate Process"
+msgid "Deactivate Single Sign-On"
+msgstr "Deactivate Single Sign-On"
+
msgid "Deactivate Supplier"
msgstr "Deactivate Supplier"
@@ -5878,6 +5908,9 @@ msgstr "Email"
msgid "Email Address"
msgstr "Email Address"
+msgid "Email Domains"
+msgstr "Email Domains"
+
msgid "Email notifications are not included in your company's current plan; email preferences will apply if they are enabled."
msgstr "Email notifications are not included in your company's current plan; email preferences will apply if they are enabled."
@@ -7432,6 +7465,9 @@ msgstr "Home Phone"
msgid "Hop {depth}"
msgstr "Hop {depth}"
+msgid "Host"
+msgstr "Host"
+
msgid "Host, secure, and back up the platform"
msgstr "Host, secure, and back up the platform"
@@ -7591,6 +7627,18 @@ msgstr "Idempotency key"
msgid "Identifiers"
msgstr "Identifiers"
+msgid "Identity Provider"
+msgstr "Identity Provider"
+
+msgid "Identity provider (IdP)"
+msgstr "Identity provider (IdP)"
+
+msgid "IdP Metadata URL"
+msgstr "IdP Metadata URL"
+
+msgid "IdP Metadata XML"
+msgstr "IdP Metadata XML"
+
msgid "IDs and descriptions are generated for raw materials."
msgstr "IDs and descriptions are generated for raw materials."
@@ -8500,6 +8548,9 @@ msgstr "Less manual work"
msgid "Less manual work, fewer errors"
msgstr "Less manual work, fewer errors"
+msgid "Let members sign in through your identity provider with SAML."
+msgstr "Let members sign in through your identity provider with SAML."
+
msgid "Let's Build"
msgstr "Let's Build"
@@ -8790,6 +8841,9 @@ msgstr "MACRS Convention"
msgid "MACRS Property Class"
msgstr "MACRS Property Class"
+msgid "Magic link"
+msgstr "Magic link"
+
msgid "Maintain a single part and item master"
msgstr "Maintain a single part and item master"
@@ -8868,6 +8922,9 @@ msgstr "Makes this document active and visible."
msgid "Manage"
msgstr "Manage"
+msgid "Manage authentication and sign-in requirements for your company."
+msgstr "Manage authentication and sign-in requirements for your company."
+
msgid "Manage how shelf life is tracked, computed, and enforced across inventory."
msgstr "Manage how shelf life is tracked, computed, and enforced across inventory."
@@ -10204,6 +10261,9 @@ msgstr "Not a table but a general-ledger balance: cost accumulates as job materi
msgid "Not certified"
msgstr "Not certified"
+msgid "Not configured"
+msgstr "Not configured"
+
msgid "Not enough jobs to cover quantity"
msgstr "Not enough jobs to cover quantity"
@@ -10921,6 +10981,9 @@ msgstr "Passkeys"
msgid "Passkeys are disabled"
msgstr "Passkeys are disabled"
+msgid "Paste the metadata XML if your identity provider does not publish a metadata URL"
+msgstr "Paste the metadata XML if your identity provider does not publish a metadata URL"
+
msgid "Path"
msgstr "Path"
@@ -11600,9 +11663,15 @@ msgstr "Protect your company with advanced security controls like two-factor aut
msgid "Protects your company's data"
msgstr "Protects your company's data"
+msgid "Prove ownership of each email domain with a DNS TXT record before it can route SAML SSO sign-ins. Add the record at DNS host, then click Verify — only verified domains participate in single sign-on."
+msgstr "Prove ownership of each email domain with a DNS TXT record before it can route SAML SSO sign-ins. Add the record at DNS host, then click Verify — only verified domains participate in single sign-on."
+
msgid "Provide process knowledge and inputs"
msgstr "Provide process knowledge and inputs"
+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."
+msgstr "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."
+
msgid "Provider"
msgstr "Provider"
@@ -12473,9 +12542,6 @@ msgstr "Requested Date"
msgid "Require a 6-digit code from an authenticator app when signing in."
msgstr "Require a 6-digit code from an authenticator app when signing in."
-msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected."
-msgstr "Require an authenticator app before anyone can open this company. Their other companies are unaffected."
-
msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."
msgstr "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."
@@ -12488,6 +12554,9 @@ msgstr "Require approval for purchase orders based on amount thresholds"
msgid "Require approval for quality documents in your workflow"
msgstr "Require approval for quality documents in your workflow"
+msgid "Require SAML SSO"
+msgstr "Require SAML SSO"
+
msgid "Require two-factor authentication"
msgstr "Require two-factor authentication"
@@ -13029,6 +13098,9 @@ msgstr "Save and Overwrite"
msgid "Save applications"
msgstr "Save applications"
+msgid "Save changes"
+msgstr "Save changes"
+
msgid "Save contacts"
msgstr "Save contacts"
@@ -13571,6 +13643,9 @@ msgstr "Service Details"
msgid "Service ID"
msgstr "Service ID"
+msgid "Service Provider Details"
+msgstr "Service Provider Details"
+
msgid "services"
msgstr "services"
@@ -13900,9 +13975,6 @@ msgstr "Sign in to Carbon"
msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."
msgstr "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."
-msgid "Sign in with Email"
-msgstr "Sign in with Email"
-
msgid "Sign in with Google"
msgstr "Sign in with Google"
@@ -13939,6 +14011,12 @@ msgstr "Signing in also requires a one-time code from your authenticator app"
msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."
msgstr "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."
+msgid "Single Sign-On"
+msgstr "Single Sign-On"
+
+msgid "Single sign-on (SSO)"
+msgstr "Single sign-on (SSO)"
+
msgid "Sites & locations"
msgstr "Sites & locations"
@@ -14062,6 +14140,9 @@ msgstr "Sourcing type"
msgid "Sourcing Type"
msgstr "Sourcing Type"
+msgid "SP Metadata URL"
+msgstr "SP Metadata URL"
+
msgid "Spare Part Consumption"
msgstr "Spare Part Consumption"
@@ -15378,6 +15459,9 @@ msgstr "The revision number of the part"
msgid "The sales order line this job was created to supply, tying the job to the customer demand behind it."
msgstr "The sales order line this job was created to supply, tying the job to the customer demand behind it."
+msgid "The SAML metadata URL published by your identity provider"
+msgstr "The SAML metadata URL published by your identity provider"
+
msgid "The schedule used to spread this asset's cost over its useful life (straight-line, declining balance, units of production)."
msgstr "The schedule used to spread this asset's cost over its useful life (straight-line, declining balance, units of production)."
@@ -15468,6 +15552,9 @@ msgstr "The suppliers receiving this RFQ; each gets its own line on the RFQ that
msgid "The surface finishes available on your materials"
msgstr "The surface finishes available on your materials"
+msgid "The system a company uses to manage its people's logins — Okta, Entra ID, or Google Workspace — which vouches for who someone is when they sign in to Carbon via SSO."
+msgstr "The system a company uses to manage its people's logins — Okta, Entra ID, or Google Workspace — which vouches for who someone is when they sign in to Carbon via SSO."
+
msgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."
msgstr "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."
@@ -15615,6 +15702,9 @@ msgstr "This file is no longer available, or you don't have permission to downlo
msgid "This Fiscal Year"
msgstr "This Fiscal Year"
+msgid "This has no effect until an email domain is verified below."
+msgstr "This has no effect until an email domain is verified below."
+
msgid "This information will be used on document headers"
msgstr "This information will be used on document headers"
@@ -16626,6 +16716,9 @@ msgstr "Users and groups allowed to rename, replace, or re-label this document;
msgid "Users can update this value for themselves"
msgstr "Users can update this value for themselves"
+msgid "Users on covered domains can sign in only with SAML SSO; magic link, Google, and passkeys are refused."
+msgstr "Users on covered domains can sign in only with SAML SSO; magic link, Google, and passkeys are refused."
+
msgid "Users to Update"
msgstr "Users to Update"
@@ -16710,6 +16803,9 @@ msgstr "Verification Error"
msgid "Verification failed"
msgstr "Verification failed"
+msgid "Verified"
+msgstr "Verified"
+
msgid "Verify"
msgstr "Verify"
@@ -17645,6 +17741,9 @@ msgstr "Your customer-facing price lists"
msgid "Your data is accessible and reasonably clean"
msgstr "Your data is accessible and reasonably clean"
+msgid "Your DNS provider may auto-append your domain to the record name — if so, enter only the part before it (e.g. _carbon-challenge plus any subdomain)."
+msgstr "Your DNS provider may auto-append your domain to the record name — if so, enter only the part before it (e.g. _carbon-challenge plus any subdomain)."
+
msgid "Your Email"
msgstr "Your Email"
diff --git a/packages/locale/locales/en/mes.po b/packages/locale/locales/en/mes.po
index 9bdf82adaf..4e3b325838 100644
--- a/packages/locale/locales/en/mes.po
+++ b/packages/locale/locales/en/mes.po
@@ -280,6 +280,9 @@ msgstr "Consumed"
msgid "Consumed expired"
msgstr "Consumed expired"
+msgid "Continue"
+msgstr "Continue"
+
#. placeholder {0}: board.unplannedCost.days
msgid "Cost of unplanned maintenance, last {0} days"
msgstr "Cost of unplanned maintenance, last {0} days"
@@ -1269,9 +1272,6 @@ msgstr "Short"
msgid "Short pick {itemName}"
msgstr "Short pick {itemName}"
-msgid "Sign in with Email"
-msgstr "Sign in with Email"
-
msgid "Sign in with Google"
msgstr "Sign in with Google"
diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.po
index 3253f32ae2..a585710cab 100644
--- a/packages/locale/locales/es/erp.po
+++ b/packages/locale/locales/es/erp.po
@@ -475,9 +475,6 @@ msgstr "Un componente de Fabricación bajo pedido cuyas piezas se emiten juntas
msgid "A managed cloud-hosted version of Carbon"
msgstr "Una versión de Carbon alojada en la nube y administrada"
-msgid "A managed version with all the advanced features"
-msgstr "Una versión administrada con todas las características avanzadas"
-
msgid "A managed version with all the advanced features"
msgstr "Una versión administrada con todas las funciones avanzadas"
@@ -941,9 +938,6 @@ msgstr "Cuentas por cobrar"
msgid "Accounts receivable for amounts owed by customers"
msgstr "Cuentas por cobrar para montos adeudados por clientes."
-msgid "Accounts referenced by posting defaults or journal history that have no provider mapping yet."
-msgstr "Cuentas referenciadas por predeterminados de contabilización o historial de asientos que aún no tienen asignación de proveedor."
-
msgid "Accumulated Depreciation"
msgstr "Depreciación acumulada"
@@ -980,6 +974,9 @@ msgstr "Costo de adquisición"
msgid "Acquisition Date"
msgstr "Fecha de adquisición"
+msgid "ACS URL"
+msgstr "URL de ACS"
+
msgid "Action"
msgstr "Acción"
@@ -1058,6 +1055,9 @@ msgstr "Agregue un comentario..."
msgid "Add a custom pricing row to override quantity, price, shipping, lead time, and tax"
msgstr "Agregue una fila de fijación de precios personalizada para sobrescribir cantidad, precio, envío, plazo de entrega e impuesto"
+msgid "Add a domain"
+msgstr "Añadir un dominio"
+
msgid "Add a materials section that lists each item on the bill of materials with its quantity."
msgstr "Agregue una sección de materiales que enumere cada artículo en la lista de materiales con su cantidad."
@@ -1238,6 +1238,9 @@ msgstr "Agregar Proveedor"
msgid "Add the next capability on the same system instead of buying another tool."
msgstr "Agregue la siguiente capacidad en el mismo sistema en lugar de comprar otra herramienta."
+msgid "Add this TXT record at your DNS host, then click Verify. DNS changes can take a few minutes to propagate."
+msgstr "Añade este registro TXT en tu proveedor DNS y luego haz clic en Verificar. Los cambios de DNS pueden tardar unos minutos en propagarse."
+
msgid "Add Timecard"
msgstr "Agregar Tarjeta de Tiempo"
@@ -1369,9 +1372,6 @@ msgstr "Todas las Ubicaciones"
msgid "All members of selected groups and selected individuals will be able to approve requests"
msgstr "Todos los miembros de los grupos seleccionados e individuos seleccionados podrán aprobar solicitudes"
-msgid "All posting accounts are mapped"
-msgstr "Todas las cuentas de contabilización están asignadas"
-
msgid "All rows imported — {inserted} inserted, {updated} updated."
msgstr "Todas las filas importadas — {inserted} insertadas, {updated} actualizadas."
@@ -1448,6 +1448,9 @@ msgstr "Una automatización que construyes en un lienzo: un desencadenante, lueg
msgid "An engineering change: the affected items whose methods are revised on a draft and released together, superseding the versions they replace."
msgstr "Un cambio de ingeniería: los elementos afectados cuyos métodos se revisan en un borrador y se lanzan juntos, reemplazando las versiones que sustituyen."
+msgid "An Enterprise sign-in method where everyone on a company's registered email domains authenticates through the company's own SAML identity provider instead of a magic link, so IT grants and revokes access centrally."
+msgstr "Un método de inicio de sesión empresarial donde todos en los dominios de correo electrónico registrados de una empresa se autentican a través del proveedor de identidad SAML propio de la empresa en lugar de un enlace mágico, permitiendo a TI otorgar y revocar acceso centralmente."
+
msgid "An https request Carbon sends to a system of yours when a workflow reaches that step, carrying whatever headers and body you configured."
msgstr "Una solicitud https que Carbon envía a un sistema tuyo cuando un flujo de trabajo llega a ese paso, llevando los encabezados y el cuerpo que configuraste."
@@ -1791,6 +1794,9 @@ msgstr "¿Está seguro de que desea crear órdenes de trabajo para este pedido d
msgid "Are you sure you want to deactivate {0}?"
msgstr "¿Estás seguro de que deseas desactivar {0}?"
+msgid "Are you sure you want to deactivate SAML SSO? Users on your registered domains will no longer be able to sign in through your identity provider. This cannot be undone."
+msgstr "¿Estás seguro de que deseas desactivar SAML SSO? Los usuarios en tus dominios registrados ya no podrán iniciar sesión a través de tu proveedor de identidad. Esto no se puede deshacer."
+
#. placeholder {0}: selectedCategory?.name
msgid "Are you sure you want to deactivate the {0} attribute category?"
msgstr "¿Estás seguro de que deseas desactivar la categoría de atributo {0}?"
@@ -2896,6 +2902,9 @@ msgstr "Solo de Carbon · rellena objetivos reales para este cliente. Ven los va
msgid "Carbon-only · the customer sees this text, locked."
msgstr "Solo de Carbon · el cliente ve este texto, bloqueado."
+msgid "Carbon's default passwordless sign-in: an emailed one-time link that signs you in when opened, with no password to remember or leak."
+msgstr "Inicio de sesión sin contraseña predeterminado de Carbon: un enlace único enviado por correo electrónico que lo inicia sesión cuando se abre, sin contraseña que recordar o filtrar."
+
msgid "Carbon's name for a bill of material and bill of process (routing): the components plus the operations that make a part."
msgstr "El nombre de Carbon para una lista de materiales y lista de procesos (enrutamiento): los componentes más las operaciones que fabrican una pieza."
@@ -3465,6 +3474,9 @@ msgstr "Confirma que cada apunte contabilizado en el período tiene igual debe y
msgid "Conflict reason"
msgstr "Razón del conflicto"
+msgid "Connect"
+msgstr "Conectar"
+
msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."
msgstr "Conecta Carbon a tus herramientas de contabilidad, gestión de proyectos, CAD y mucho más."
@@ -3483,6 +3495,9 @@ msgstr "Conecta el manejador Otherwise a un nodo para ejecutarlo cuando ninguna
msgid "Connect the outside tools your company already runs on"
msgstr "Conecta las herramientas externas que tu empresa ya utiliza"
+msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."
+msgstr "Conecte su proveedor de identidad pegando su URL de metadatos o su XML de metadatos sin procesar — exactamente uno de los dos."
+
msgid "Connected to"
msgstr "Conectado a"
@@ -3558,6 +3573,9 @@ msgstr "Contenido"
msgid "Context"
msgstr "Contexto"
+msgid "Continue"
+msgstr "Continuar"
+
msgid "Contra-asset account for total depreciation of fixed assets"
msgstr "Cuenta contra activos para depreciación total de activos fijos"
@@ -4567,6 +4585,9 @@ msgstr "Desactivar Empleados"
msgid "Deactivate Process"
msgstr "Desactivar Proceso"
+msgid "Deactivate Single Sign-On"
+msgstr "Desactivar inicio de sesión único"
+
msgid "Deactivate Supplier"
msgstr "Desactivar Proveedor"
@@ -5887,6 +5908,9 @@ msgstr "Correo electrónico"
msgid "Email Address"
msgstr "Dirección de Correo Electrónico"
+msgid "Email Domains"
+msgstr "Dominios de correo electrónico"
+
msgid "Email notifications are not included in your company's current plan; email preferences will apply if they are enabled."
msgstr "Las notificaciones por correo electrónico no se incluyen en el plan actual de su empresa; las preferencias de correo electrónico se aplicarán si se habilitan."
@@ -7441,6 +7465,9 @@ msgstr "Teléfono de Casa"
msgid "Hop {depth}"
msgstr "Salto {depth}"
+msgid "Host"
+msgstr "Host"
+
msgid "Host, secure, and back up the platform"
msgstr "Alojar, asegurar y hacer copia de seguridad de la plataforma"
@@ -7600,6 +7627,18 @@ msgstr "Clave de Idempotencia"
msgid "Identifiers"
msgstr "Identificadores"
+msgid "Identity Provider"
+msgstr "Proveedor de identidad"
+
+msgid "Identity provider (IdP)"
+msgstr "Proveedor de identidad (IdP)"
+
+msgid "IdP Metadata URL"
+msgstr "URL de metadatos de IdP"
+
+msgid "IdP Metadata XML"
+msgstr "XML de metadatos de IdP"
+
msgid "IDs and descriptions are generated for raw materials."
msgstr "Los IDs y descripciones se generan para materias primas."
@@ -8509,6 +8548,9 @@ msgstr "Menos trabajo manual"
msgid "Less manual work, fewer errors"
msgstr "Menos trabajo manual, menos errores"
+msgid "Let members sign in through your identity provider with SAML."
+msgstr "Permite que los miembros inicien sesión a través de su proveedor de identidad con SAML."
+
msgid "Let's Build"
msgstr "Construyamos"
@@ -8799,6 +8841,9 @@ msgstr "Convención MACRS"
msgid "MACRS Property Class"
msgstr "Clase de Propiedad MACRS"
+msgid "Magic link"
+msgstr "Enlace mágico"
+
msgid "Maintain a single part and item master"
msgstr "Mantener un único maestro de partes y artículos"
@@ -8877,6 +8922,9 @@ msgstr "Hace que este documento esté activo y visible."
msgid "Manage"
msgstr "Gestionar"
+msgid "Manage authentication and sign-in requirements for your company."
+msgstr "Administra los requisitos de autenticación e inicio de sesión para tu empresa."
+
msgid "Manage how shelf life is tracked, computed, and enforced across inventory."
msgstr "Administre cómo se rastrea, se calcula y se aplica la vida de anaquel en todo el inventario."
@@ -8910,9 +8958,6 @@ msgstr "Manufactura"
msgid "Map accounts"
msgstr "Asignar cuentas"
-msgid "Map Carbon accounts to the provider's chart of accounts. Posted journals push using the mapped provider account code."
-msgstr "Mapee las cuentas de Carbon al plan de cuentas del proveedor. Los asientos contabilizados se envían utilizando el código de cuenta del proveedor mapeado."
-
msgid "Map Extracted Invoice Lines"
msgstr "Mapear Líneas de Factura Extraídas"
@@ -10216,6 +10261,9 @@ msgstr "No es una tabla, sino un saldo del mayor general: el costo se acumula cu
msgid "Not certified"
msgstr "No certificado"
+msgid "Not configured"
+msgstr "No configurado"
+
msgid "Not enough jobs to cover quantity"
msgstr "No hay suficientes órdenes de trabajo para cubrir la cantidad"
@@ -10933,6 +10981,9 @@ msgstr "Llaves de acceso"
msgid "Passkeys are disabled"
msgstr "Las llaves de acceso están deshabilitadas"
+msgid "Paste the metadata XML if your identity provider does not publish a metadata URL"
+msgstr "Pegue el XML de metadatos si su proveedor de identidad no publica una URL de metadatos"
+
msgid "Path"
msgstr "Ruta"
@@ -11612,9 +11663,15 @@ msgstr "Proteja su empresa con controles de seguridad avanzados como la autentic
msgid "Protects your company's data"
msgstr "Protege los datos de tu empresa"
+msgid "Prove ownership of each email domain with a DNS TXT record before it can route SAML SSO sign-ins. Add the record at DNS host, then click Verify — only verified domains participate in single sign-on."
+msgstr "Prueba la propiedad de cada dominio de correo electrónico con un registro TXT de DNS antes de que pueda enrutar inicios de sesión de SAML SSO. Añade el registro en tu proveedor DNS y luego haz clic en Verificar — solo los dominios verificados participan en el inicio de sesión único."
+
msgid "Provide process knowledge and inputs"
msgstr "Proporcionar conocimiento del proceso e información"
+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."
+msgstr "Proporcione estas URL a su proveedor de identidad (Okta, Entra ID, Google Workspace, etc.) al registrar Carbon como una aplicación SAML."
+
msgid "Provider"
msgstr "Proveedor"
@@ -12485,9 +12542,6 @@ msgstr "Fecha Solicitada"
msgid "Require a 6-digit code from an authenticator app when signing in."
msgstr "Requerir un código de 6 dígitos de una aplicación de autenticación al iniciar sesión."
-msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected."
-msgstr "Requiere una aplicación autenticadora antes de que alguien pueda abrir esta empresa. Sus otras empresas no se ven afectadas."
-
msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."
msgstr "Requiere una aplicación autenticadora antes de que alguien pueda abrir esta empresa. Sus otras empresas no se ven afectadas. Visita la <0>página de cuentas de empleados</0> para ver el estado de cada persona."
@@ -12500,6 +12554,9 @@ msgstr "Requerir aprobación para órdenes de compra basadas en umbrales de cant
msgid "Require approval for quality documents in your workflow"
msgstr "Requerir aprobación para documentos de calidad en su flujo de trabajo"
+msgid "Require SAML SSO"
+msgstr "Requerir SAML SSO"
+
msgid "Require two-factor authentication"
msgstr "Requerir autenticación de dos factores"
@@ -13041,6 +13098,9 @@ msgstr "Guardar y Sobrescribir"
msgid "Save applications"
msgstr "Guardar aplicaciones"
+msgid "Save changes"
+msgstr "Guardar cambios"
+
msgid "Save contacts"
msgstr "Guardar contactos"
@@ -13484,9 +13544,6 @@ msgstr "Autogestionado"
msgid "Self-hosted or managed"
msgstr "Autohospedado o gestionado"
-msgid "Self-onboarding"
-msgstr "Autoincorporación"
-
msgid "Self-onboarding"
msgstr "Incorporación automática"
@@ -13586,6 +13643,9 @@ msgstr "Detalles del servicio"
msgid "Service ID"
msgstr "ID del Servicio"
+msgid "Service Provider Details"
+msgstr "Detalles del proveedor de servicios"
+
msgid "services"
msgstr "servicios"
@@ -13915,9 +13975,6 @@ msgstr "Inicie sesión en Carbon"
msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."
msgstr "Inicie sesión con biometría en lugar de un enlace mágico. Las llaves de acceso se aseguran con Face ID, Touch ID o su PIN de dispositivo."
-msgid "Sign in with Email"
-msgstr "Iniciar sesión con correo electrónico"
-
msgid "Sign in with Google"
msgstr "Iniciar sesión con Google"
@@ -13954,6 +14011,12 @@ msgstr "Iniciar sesión también requiere un código de un solo uso de tu aplica
msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."
msgstr "Iniciar sesión ya no requerirá un código. Ingrese el código de 6 dígitos actual de su aplicación de autenticación para confirmar."
+msgid "Single Sign-On"
+msgstr "Inicio de sesión único"
+
+msgid "Single sign-on (SSO)"
+msgstr "Inicio de sesión único (SSO)"
+
msgid "Sites & locations"
msgstr "Sitios y ubicaciones"
@@ -14077,6 +14140,9 @@ msgstr "Tipo de abastecimiento"
msgid "Sourcing Type"
msgstr "Tipo de Abastecimiento"
+msgid "SP Metadata URL"
+msgstr "URL de metadatos de SP"
+
msgid "Spare Part Consumption"
msgstr "Consumo de Piezas de Repuesto"
@@ -14334,12 +14400,6 @@ msgstr "Stripe ya tiene un cliente con este correo electrónico"
msgid "Stripe Due Date"
msgstr "Fecha de vencimiento de Stripe"
-msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."
-msgstr "Stripe envía la factura al cliente por correo electrónico, por lo que se requiere una dirección. Esta también se guardará en el contacto en Carbon."
-
-msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
-msgstr "Stripe aún no tiene un cliente para este cliente de Carbon. La contabilización creará uno en su cuenta conectada."
-
msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."
msgstr "Stripe envía la factura por correo electrónico al cliente, por lo que se requiere una dirección. Esto también se guardará en el contacto en Carbon."
@@ -15399,6 +15459,9 @@ msgstr "El número de revisión de la pieza"
msgid "The sales order line this job was created to supply, tying the job to the customer demand behind it."
msgstr "La línea de pedido de venta que esta orden de trabajo fue creada para surtir, vinculando la orden de trabajo a la demanda del cliente detrás de ella."
+msgid "The SAML metadata URL published by your identity provider"
+msgstr "La URL de metadatos SAML publicada por su proveedor de identidad"
+
msgid "The schedule used to spread this asset's cost over its useful life (straight-line, declining balance, units of production)."
msgstr "El cronograma utilizado para distribuir el costo de este activo durante su vida útil (línea recta, saldo decreciente, unidades de producción)."
@@ -15489,6 +15552,9 @@ msgstr "Los proveedores que reciben esta RFQ; cada uno obtiene su propia línea
msgid "The surface finishes available on your materials"
msgstr "Los acabados de superficie disponibles en tus materiales"
+msgid "The system a company uses to manage its people's logins — Okta, Entra ID, or Google Workspace — which vouches for who someone is when they sign in to Carbon via SSO."
+msgstr "El sistema que una empresa utiliza para administrar los inicios de sesión de sus personas — Okta, Entra ID o Google Workspace — que respalda quién es alguien cuando inicia sesión en Carbon a través de SSO."
+
msgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."
msgstr "El sistema pasa todas las pruebas de aceptación dentro del alcance en tu sistema configurado, con tus datos; los datos se validan; y das tu aprobación. Luego, lanzamiento."
@@ -15636,6 +15702,9 @@ msgstr "Este archivo ya no está disponible, o no tienes permiso para descargarl
msgid "This Fiscal Year"
msgstr "Este Ejercicio fiscal"
+msgid "This has no effect until an email domain is verified below."
+msgstr "Esto no tiene efecto hasta que se verifique un dominio de correo electrónico a continuación."
+
msgid "This information will be used on document headers"
msgstr "Esta información se utilizará en los encabezados de documentos"
@@ -15650,7 +15719,7 @@ msgid "This invitation to join {0} has expired. You can request a new invite to
msgstr "Esta invitación para unirse a {0} ha vencido. Puedes solicitar que se envíe una nueva invitación a tu correo electrónico."
msgid "This invoice has no usable due date — choose one for Stripe."
-msgstr "Esta factura no tiene una fecha de vencimiento utilizable — elige una para Stripe."
+msgstr "Esta factura no tiene una fecha de vencimiento utilizable: elige una para Stripe."
msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
msgstr "Esta factura se facturará al cliente de Stripe ya vinculado a este cliente de Carbon. Para cambiar sus detalles, edítalo en el panel de Stripe."
@@ -15792,9 +15861,6 @@ msgstr "Esta versión no se puede abrir"
msgid "This version is published"
msgstr "Esta versión está publicada"
-msgid "This version is published. Create a new version to edit."
-msgstr "Esta versión está publicada. Cree una nueva versión para editar."
-
msgid "This version is published. Create a new version to edit."
msgstr "Esta versión se ha publicado. Crea una nueva versión para editar."
@@ -16387,7 +16453,7 @@ msgid "Unposted Documents"
msgstr "Documentos No Contabilizados"
msgid "Unpublish"
-msgstr "Despublicar"
+msgstr "Anular la publicación"
msgid "Unpublish {name}?"
msgstr "¿Despublicar {name}?"
@@ -16650,6 +16716,9 @@ msgstr "Usuarios y grupos autorizados a renombrar, reemplazar o reetiquetar este
msgid "Users can update this value for themselves"
msgstr "Los usuarios pueden actualizar este valor por sí mismos"
+msgid "Users on covered domains can sign in only with SAML SSO; magic link, Google, and passkeys are refused."
+msgstr "Los usuarios en dominios cubiertos solo pueden iniciar sesión con SAML SSO; se rechaza el enlace mágico, Google y las contraseñas."
+
msgid "Users to Update"
msgstr "Usuarios a Actualizar"
@@ -16734,6 +16803,9 @@ msgstr "Error de verificación"
msgid "Verification failed"
msgstr "La verificación falló"
+msgid "Verified"
+msgstr "Verificado"
+
msgid "Verify"
msgstr "Verificar"
@@ -17665,6 +17737,9 @@ msgstr "Sus listas de precios visibles para clientes"
msgid "Your data is accessible and reasonably clean"
msgstr "Sus datos son accesibles y razonablemente limpios"
+msgid "Your DNS provider may auto-append your domain to the record name — if so, enter only the part before it (e.g. _carbon-challenge plus any subdomain)."
+msgstr "Tu proveedor de DNS puede añadir automáticamente tu dominio al nombre del registro — si es así, introduce solo la parte anterior (p. ej. _carbon-challenge más cualquier subdominio)."
+
msgid "Your Email"
msgstr "Tu correo electrónico"
diff --git a/packages/locale/locales/es/mes.po b/packages/locale/locales/es/mes.po
index 9ae109330a..2c504b5e6e 100644
--- a/packages/locale/locales/es/mes.po
+++ b/packages/locale/locales/es/mes.po
@@ -280,6 +280,9 @@ msgstr "Consumido"
msgid "Consumed expired"
msgstr "Consumido vencido"
+msgid "Continue"
+msgstr "Continuar"
+
#. placeholder {0}: board.unplannedCost.days
msgid "Cost of unplanned maintenance, last {0} days"
msgstr "Costo del mantenimiento no planificado, últimos {0} días"
@@ -1269,9 +1272,6 @@ msgstr "Faltante"
msgid "Short pick {itemName}"
msgstr "Picking corto {itemName}"
-msgid "Sign in with Email"
-msgstr "Iniciar sesión con correo electrónico"
-
msgid "Sign in with Google"
msgstr "Iniciar sesión con Google"
diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.po
index 0d83501656..223ca6a5d5 100644
--- a/packages/locale/locales/fr/erp.po
+++ b/packages/locale/locales/fr/erp.po
@@ -475,9 +475,6 @@ msgstr "Un composant de fabrication à la commande dont les pièces sont émises
msgid "A managed cloud-hosted version of Carbon"
msgstr "Une version gérée de Carbon hébergée en nuage."
-msgid "A managed version with all the advanced features"
-msgstr "Une version gérée avec toutes les fonctionnalités avancées."
-
msgid "A managed version with all the advanced features"
msgstr "Une version managée avec toutes les fonctionnalités avancées"
@@ -941,9 +938,6 @@ msgstr "Comptes clients"
msgid "Accounts receivable for amounts owed by customers"
msgstr "Comptes débiteurs pour les montants dus par les clients."
-msgid "Accounts referenced by posting defaults or journal history that have no provider mapping yet."
-msgstr "Comptes référencés par les défauts de Comptabilisation ou l'Historique des Écritures qui n'ont pas encore de mapping de fournisseur."
-
msgid "Accumulated Depreciation"
msgstr "Amortissement cumulé"
@@ -980,6 +974,9 @@ msgstr "Coût d'acquisition"
msgid "Acquisition Date"
msgstr "Date d'acquisition"
+msgid "ACS URL"
+msgstr "URL ACS"
+
msgid "Action"
msgstr "Action"
@@ -1058,6 +1055,9 @@ msgstr "Ajouter un commentaire..."
msgid "Add a custom pricing row to override quantity, price, shipping, lead time, and tax"
msgstr "Ajouter une ligne de Tarification personnalisée pour substituer Quantité, Prix, expédition, Délai d'approvisionnement et Taxe"
+msgid "Add a domain"
+msgstr "Ajouter un domaine"
+
msgid "Add a materials section that lists each item on the bill of materials with its quantity."
msgstr "Ajouter une section de matériaux qui liste chaque article de la nomenclature avec sa quantité."
@@ -1238,6 +1238,9 @@ msgstr "Ajouter un fournisseur"
msgid "Add the next capability on the same system instead of buying another tool."
msgstr "Ajoutez la prochaine fonctionnalité sur le même système au lieu d'acheter un autre outil."
+msgid "Add this TXT record at your DNS host, then click Verify. DNS changes can take a few minutes to propagate."
+msgstr "Ajoutez cet enregistrement TXT chez votre fournisseur DNS, puis cliquez sur Vérifier. Les modifications DNS peuvent prendre quelques minutes pour se propager."
+
msgid "Add Timecard"
msgstr "Ajouter une feuille de temps"
@@ -1445,6 +1448,9 @@ msgstr "Une automation que vous construisez sur un canevas : un déclencheur, pu
msgid "An engineering change: the affected items whose methods are revised on a draft and released together, superseding the versions they replace."
msgstr "Une Modification technique : les Articles affectés dont les Méthodes sont révisées en Brouillon et Lancées ensemble, remplaçant les Versions qu'elles supercèdent."
+msgid "An Enterprise sign-in method where everyone on a company's registered email domains authenticates through the company's own SAML identity provider instead of a magic link, so IT grants and revokes access centrally."
+msgstr "Une méthode de connexion d'entreprise où tous les utilisateurs des domaines de messagerie enregistrés d'une entreprise s'authentifient par le biais du fournisseur d'identité SAML de l'entreprise au lieu d'un lien magique, ce qui permet au département informatique d'accorder et de révoquer l'accès de manière centralisée."
+
msgid "An https request Carbon sends to a system of yours when a workflow reaches that step, carrying whatever headers and body you configured."
msgstr "Une requête https que Carbon envoie à l'un de vos systèmes lorsqu'un flux de travail atteint cette étape, portant tous les en-têtes et le corps que vous avez configurés."
@@ -1788,6 +1794,9 @@ msgstr "Êtes-vous sûr de vouloir créer des ordres de fabrication pour cette c
msgid "Are you sure you want to deactivate {0}?"
msgstr "Êtes-vous sûr de vouloir désactiver {0} ?"
+msgid "Are you sure you want to deactivate SAML SSO? Users on your registered domains will no longer be able to sign in through your identity provider. This cannot be undone."
+msgstr "Êtes-vous sûr de vouloir désactiver SAML SSO ? Les utilisateurs de vos domaines enregistrés ne pourront plus se connecter via votre fournisseur d'identité. Cette action ne peut pas être annulée."
+
#. placeholder {0}: selectedCategory?.name
msgid "Are you sure you want to deactivate the {0} attribute category?"
msgstr "Êtes-vous sûr de vouloir désactiver la catégorie d'attribut {0} ?"
@@ -2893,6 +2902,9 @@ msgstr "Carbon-only · remplissez les vrais objectifs pour ce client. Il voit le
msgid "Carbon-only · the customer sees this text, locked."
msgstr "Carbon-only · le client voit ce texte, verrouillé."
+msgid "Carbon's default passwordless sign-in: an emailed one-time link that signs you in when opened, with no password to remember or leak."
+msgstr "La connexion sans mot de passe par défaut de Carbon : un lien unique envoyé par e-mail qui vous connecte à l'ouverture, sans mot de passe à retenir ou à divulguer."
+
msgid "Carbon's name for a bill of material and bill of process (routing): the components plus the operations that make a part."
msgstr "Le nom Carbon pour une nomenclature et une liste des opérations (gamme) : les composants plus les opérations qui fabriquent une pièce."
@@ -3462,6 +3474,9 @@ msgstr "Vérifie que chaque ligne d'écriture comptabilisée au cours de la pér
msgid "Conflict reason"
msgstr "Motif du conflit"
+msgid "Connect"
+msgstr "Se connecter"
+
msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."
msgstr "Connectez Carbon à vos outils de comptabilité, de gestion de projet, de CAO et bien d'autres."
@@ -3480,6 +3495,9 @@ msgstr "Connectez la poignée Sinon à un nœud à exécuter quand aucune condit
msgid "Connect the outside tools your company already runs on"
msgstr "Connectez les outils externes que votre société utilise déjà"
+msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."
+msgstr "Connectez votre fournisseur d'identité en collant soit son URL de métadonnées, soit son XML de métadonnées brutes — exactement l'un des deux."
+
msgid "Connected to"
msgstr "Connecté à"
@@ -3555,6 +3573,9 @@ msgstr "Contenu"
msgid "Context"
msgstr "Contexte"
+msgid "Continue"
+msgstr "Continuer"
+
msgid "Contra-asset account for total depreciation of fixed assets"
msgstr "Compte correcteur d'actif pour l'amortissement total des immobilisations"
@@ -4564,6 +4585,9 @@ msgstr "Désactiver les employés"
msgid "Deactivate Process"
msgstr "Désactiver le processus"
+msgid "Deactivate Single Sign-On"
+msgstr "Désactiver l'authentification unique"
+
msgid "Deactivate Supplier"
msgstr "Désactiver le fournisseur"
@@ -5884,6 +5908,9 @@ msgstr "E-mail"
msgid "Email Address"
msgstr "Adresse e-mail"
+msgid "Email Domains"
+msgstr "Domaines de messagerie"
+
msgid "Email notifications are not included in your company's current plan; email preferences will apply if they are enabled."
msgstr "Les notifications par e-mail ne sont pas incluses dans le plan actuel de votre société ; les préférences d'e-mail s'appliqueront si elles sont activées."
@@ -7438,6 +7465,9 @@ msgstr "Téléphone personnel"
msgid "Hop {depth}"
msgstr "Saut {depth}"
+msgid "Host"
+msgstr "Hôte"
+
msgid "Host, secure, and back up the platform"
msgstr "Héberger, sécuriser et sauvegarder la plateforme"
@@ -7597,6 +7627,18 @@ msgstr "Clé d'idempotence"
msgid "Identifiers"
msgstr "Identifiants"
+msgid "Identity Provider"
+msgstr "Fournisseur d'identité"
+
+msgid "Identity provider (IdP)"
+msgstr "Fournisseur d'identité (IdP)"
+
+msgid "IdP Metadata URL"
+msgstr "URL des métadonnées IdP"
+
+msgid "IdP Metadata XML"
+msgstr "XML des métadonnées IdP"
+
msgid "IDs and descriptions are generated for raw materials."
msgstr "Les IDs et descriptions sont générés pour les matières premières."
@@ -8506,6 +8548,9 @@ msgstr "Moins de travail manuel"
msgid "Less manual work, fewer errors"
msgstr "Moins de travail manuel, moins d'erreurs"
+msgid "Let members sign in through your identity provider with SAML."
+msgstr "Permettez aux membres de se connecter par le biais de votre fournisseur d'identité avec SAML."
+
msgid "Let's Build"
msgstr "Allons construire"
@@ -8796,6 +8841,9 @@ msgstr "Convention MACRS"
msgid "MACRS Property Class"
msgstr "Classe de Propriété MACRS"
+msgid "Magic link"
+msgstr "Lien magique"
+
msgid "Maintain a single part and item master"
msgstr "Maintenir un maître de pièce et d'article unique"
@@ -8874,6 +8922,9 @@ msgstr "Rend ce document actif et visible."
msgid "Manage"
msgstr "Gérer"
+msgid "Manage authentication and sign-in requirements for your company."
+msgstr "Gérez l'authentification et les exigences de connexion pour votre entreprise."
+
msgid "Manage how shelf life is tracked, computed, and enforced across inventory."
msgstr "Gérez le suivi, le calcul et l'application de la durée de conservation dans l'inventaire."
@@ -8907,9 +8958,6 @@ msgstr "Production"
msgid "Map accounts"
msgstr "Mapper les comptes"
-msgid "Map Carbon accounts to the provider's chart of accounts. Posted journals push using the mapped provider account code."
-msgstr "Mappez les comptes Carbon au plan comptable du fournisseur. Les écritures comptabilisées sont transmises en utilisant le code de compte fournisseur mappé."
-
msgid "Map Extracted Invoice Lines"
msgstr "Mapper les lignes de facture extraites"
@@ -10213,6 +10261,9 @@ msgstr "Pas une table mais un solde du grand livre : le coût s'accumule à mesu
msgid "Not certified"
msgstr "Non certifié"
+msgid "Not configured"
+msgstr "Non configuré"
+
msgid "Not enough jobs to cover quantity"
msgstr "Pas assez d'ordres de fabrication pour couvrir la quantité"
@@ -10930,6 +10981,9 @@ msgstr "Clés d'accès"
msgid "Passkeys are disabled"
msgstr "Les clés d'accès sont désactivées"
+msgid "Paste the metadata XML if your identity provider does not publish a metadata URL"
+msgstr "Collez le XML de métadonnées si votre fournisseur d'identité ne publie pas d'URL de métadonnées"
+
msgid "Path"
msgstr "Chemin"
@@ -11609,9 +11663,15 @@ msgstr "Protégez votre société avec des contrôles de sécurité avancés tel
msgid "Protects your company's data"
msgstr "Protège les données de votre société"
+msgid "Prove ownership of each email domain with a DNS TXT record before it can route SAML SSO sign-ins. Add the record at DNS host, then click Verify — only verified domains participate in single sign-on."
+msgstr "Prouvez la propriété de chaque domaine de messagerie avec un enregistrement DNS TXT avant de pouvoir acheminer les connexions SAML SSO. Ajoutez l'enregistrement chez votre hôte DNS, puis cliquez sur Vérifier — seuls les domaines vérifiés participent à l'authentification unique."
+
msgid "Provide process knowledge and inputs"
msgstr "Fournir les connaissances et les données du processus"
+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."
+msgstr "Fournissez ces URL à votre fournisseur d'identité (Okta, Entra ID, Google Workspace, etc.) lors de l'enregistrement de Carbon en tant qu'application SAML."
+
msgid "Provider"
msgstr "Fournisseur"
@@ -12482,9 +12542,6 @@ msgstr "Date demandée"
msgid "Require a 6-digit code from an authenticator app when signing in."
msgstr "Exiger un code à 6 chiffres d'une application d'authentification lors de la connexion."
-msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected."
-msgstr "Exigez une application d'authentification avant que quiconque puisse ouvrir cette société. Leurs autres sociétés ne sont pas affectées."
-
msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."
msgstr "Exiger une application d'authentification avant que quiconque puisse ouvrir cette société. Leurs autres sociétés ne sont pas affectées. Visitez la <0>page des comptes employé</0> pour voir le statut de chaque personne."
@@ -12497,6 +12554,9 @@ msgstr "Exiger une approbation pour les bons de commande en fonction des seuils
msgid "Require approval for quality documents in your workflow"
msgstr "Exiger une approbation pour les documents de qualité dans votre flux de travail"
+msgid "Require SAML SSO"
+msgstr "Exiger SAML SSO"
+
msgid "Require two-factor authentication"
msgstr "Exiger l'authentification à deux facteurs"
@@ -13038,6 +13098,9 @@ msgstr "Enregistrer et remplacer"
msgid "Save applications"
msgstr "Enregistrer les applications"
+msgid "Save changes"
+msgstr "Enregistrer les modifications"
+
msgid "Save contacts"
msgstr "Enregistrer les contacts"
@@ -13481,9 +13544,6 @@ msgstr "Autogéré"
msgid "Self-hosted or managed"
msgstr "Auto-hébergé ou géré"
-msgid "Self-onboarding"
-msgstr "Intégration autonome"
-
msgid "Self-onboarding"
msgstr "Auto-intégration"
@@ -13583,6 +13643,9 @@ msgstr "Détails du service"
msgid "Service ID"
msgstr "ID du Service"
+msgid "Service Provider Details"
+msgstr "Détails du fournisseur de services"
+
msgid "services"
msgstr "services"
@@ -13912,9 +13975,6 @@ msgstr "Se connecter à Carbon"
msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."
msgstr "Connectez-vous avec la biométrie au lieu d'un lien magique. Les clés d'accès sont sécurisées par Face ID, Touch ID ou votre code PIN de l'appareil."
-msgid "Sign in with Email"
-msgstr "Se connecter avec Email"
-
msgid "Sign in with Google"
msgstr "Se connecter avec Google"
@@ -13951,6 +14011,12 @@ msgstr "La connexion nécessite également un code à usage unique de votre appl
msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."
msgstr "La connexion ne nécessitera plus de code. Entrez le code à 6 chiffres actuel de votre application d'authentification pour confirmer."
+msgid "Single Sign-On"
+msgstr "Authentification unique"
+
+msgid "Single sign-on (SSO)"
+msgstr "Authentification unique (SSO)"
+
msgid "Sites & locations"
msgstr "Sites et emplacements"
@@ -14074,6 +14140,9 @@ msgstr "Type d'approvisionnement"
msgid "Sourcing Type"
msgstr "Type d'approvisionnement"
+msgid "SP Metadata URL"
+msgstr "URL des métadonnées SP"
+
msgid "Spare Part Consumption"
msgstr "Consommation de pièces de rechange"
@@ -14337,9 +14406,6 @@ msgstr "Stripe envoie par e-mail la facture au client, c'est pourquoi une adress
msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
msgstr "Stripe n'a pas encore de client pour ce client Carbon. La comptabilisation en créera un sur votre compte connecté."
-msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
-msgstr "Stripe n'a pas encore de client pour ce client Carbon. La comptabilisation en créera un sur votre compte connecté."
-
msgid "Style of kanban output to show in the Kanban table"
msgstr "Style de sortie kanban à afficher dans le tableau Kanban"
@@ -15393,6 +15459,9 @@ msgstr "Le numéro de révision de la pièce"
msgid "The sales order line this job was created to supply, tying the job to the customer demand behind it."
msgstr "La ligne de commande client pour laquelle cet ordre de fabrication a été créé, reliant l'ordre de fabrication aux besoins du client."
+msgid "The SAML metadata URL published by your identity provider"
+msgstr "L'URL des métadonnées SAML publiée par votre fournisseur d'identité"
+
msgid "The schedule used to spread this asset's cost over its useful life (straight-line, declining balance, units of production)."
msgstr "Le planning utilisé pour étaler le coût de cet actif sur sa durée d'utilité (linéaire, dégressif, unités de production)."
@@ -15483,6 +15552,9 @@ msgstr "Les fournisseurs recevant cette RFQ ; chacun reçoit sa propre ligne sur
msgid "The surface finishes available on your materials"
msgstr "Les finitions de surface disponibles sur vos matériaux"
+msgid "The system a company uses to manage its people's logins — Okta, Entra ID, or Google Workspace — which vouches for who someone is when they sign in to Carbon via SSO."
+msgstr "Le système qu'une entreprise utilise pour gérer les connexions de son personnel — Okta, Entra ID ou Google Workspace — qui confirme l'identité de quelqu'un lorsqu'il se connecte à Carbon via SSO."
+
msgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."
msgstr "Le système réussit tous les tests d'acceptation dans le périmètre de votre système configuré, avec vos données ; les données sont validées ; et vous donnez votre approbation. Ensuite, passage en production."
@@ -15630,6 +15702,9 @@ msgstr "Ce fichier n'est plus disponible, ou vous n'avez pas l'autorisation de l
msgid "This Fiscal Year"
msgstr "Cet exercice comptable"
+msgid "This has no effect until an email domain is verified below."
+msgstr "Cela n'aura aucun effet jusqu'à ce qu'un domaine de messagerie soit vérifié ci-dessous."
+
msgid "This information will be used on document headers"
msgstr "Ces informations seront utilisées dans les en-têtes de document"
@@ -15786,9 +15861,6 @@ msgstr "Cette version ne peut pas être ouverte"
msgid "This version is published"
msgstr "Cette version est publiée."
-msgid "This version is published. Create a new version to edit."
-msgstr "Cette version est publiée. Créez une nouvelle version pour la modifier."
-
msgid "This version is published. Create a new version to edit."
msgstr "Cette version est publiée. Créez une nouvelle version à modifier."
@@ -16644,6 +16716,9 @@ msgstr "Utilisateurs et groupes autorisés à renommer, remplacer ou re-étiquet
msgid "Users can update this value for themselves"
msgstr "Les utilisateurs peuvent mettre à jour cette valeur pour eux-mêmes"
+msgid "Users on covered domains can sign in only with SAML SSO; magic link, Google, and passkeys are refused."
+msgstr "Les utilisateurs des domaines couverts ne peuvent se connecter qu'avec SAML SSO ; les liens magiques, Google et les passkeys sont refusés."
+
msgid "Users to Update"
msgstr "Utilisateurs à mettre à jour"
@@ -16728,6 +16803,9 @@ msgstr "Erreur de vérification"
msgid "Verification failed"
msgstr "Vérification échouée"
+msgid "Verified"
+msgstr "Vérifié"
+
msgid "Verify"
msgstr "Vérifier"
@@ -17659,6 +17737,9 @@ msgstr "Vos listes de prix destinées aux clients"
msgid "Your data is accessible and reasonably clean"
msgstr "Vos données sont accessibles et raisonnablement propres"
+msgid "Your DNS provider may auto-append your domain to the record name — if so, enter only the part before it (e.g. _carbon-challenge plus any subdomain)."
+msgstr "Votre fournisseur DNS peut ajouter automatiquement votre domaine au nom de l'enregistrement — le cas échéant, entrez uniquement la partie qui précède (par exemple, _carbon-challenge plus tout sous-domaine)."
+
msgid "Your Email"
msgstr "Votre e-mail"
diff --git a/packages/locale/locales/fr/mes.po b/packages/locale/locales/fr/mes.po
index 381c8beeca..fa4bce0990 100644
--- a/packages/locale/locales/fr/mes.po
+++ b/packages/locale/locales/fr/mes.po
@@ -280,6 +280,9 @@ msgstr "Consommé"
msgid "Consumed expired"
msgstr "Consommé expiré"
+msgid "Continue"
+msgstr "Continuer"
+
#. placeholder {0}: board.unplannedCost.days
msgid "Cost of unplanned maintenance, last {0} days"
msgstr "Coût de la maintenance imprévue, {0} derniers jours"
@@ -1269,9 +1272,6 @@ msgstr "Manquant"
msgid "Short pick {itemName}"
msgstr "Prélèvement court {itemName}"
-msgid "Sign in with Email"
-msgstr "Se connecter avec l'e-mail"
-
msgid "Sign in with Google"
msgstr "Se connecter avec Google"
diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.po
index acc5f8b81f..789b65380f 100644
--- a/packages/locale/locales/hi/erp.po
+++ b/packages/locale/locales/hi/erp.po
@@ -974,6 +974,9 @@ msgstr "अधिग्रहण लागत"
msgid "Acquisition Date"
msgstr "अधिग्रहण तारीख"
+msgid "ACS URL"
+msgstr "ACS URL"
+
msgid "Action"
msgstr "कार्रवाई"
@@ -1052,6 +1055,9 @@ msgstr "एक टिप्पणी जोड़ें..."
msgid "Add a custom pricing row to override quantity, price, shipping, lead time, and tax"
msgstr "मात्रा, मूल्य, शिपिंग, लीड टाइम, और कर को ओवरराइड करने के लिए एक कस्टम मूल्य निर्धारण पंक्ति जोड़ें"
+msgid "Add a domain"
+msgstr "एक डोमेन जोड़ें"
+
msgid "Add a materials section that lists each item on the bill of materials with its quantity."
msgstr "बिल ऑफ मेटेरियल्स पर प्रत्येक आइटम और उसकी मात्रा को सूचीबद्ध करने वाली एक सामग्री अनुभाग जोड़ें।"
@@ -1232,6 +1238,9 @@ msgstr "आपूर्तिकर्ता जोड़ें"
msgid "Add the next capability on the same system instead of buying another tool."
msgstr "अगली क्षमता को एक ही सिस्टम पर जोड़ें, दूसरा टूल खरीदने के बजाय।"
+msgid "Add this TXT record at your DNS host, then click Verify. DNS changes can take a few minutes to propagate."
+msgstr "अपने DNS होस्ट में यह TXT रिकॉर्ड जोड़ें, फिर सत्यापित करें पर क्लिक करें। DNS परिवर्तन प्रसारित होने में कुछ मिनट लग सकते हैं।"
+
msgid "Add Timecard"
msgstr "टाइमकार्ड जोड़ें"
@@ -1439,6 +1448,9 @@ msgstr "एक स्वचालन जो आप कैनवास पर ब
msgid "An engineering change: the affected items whose methods are revised on a draft and released together, superseding the versions they replace."
msgstr "एक इंजीनियरिंग परिवर्तन: प्रभावित आइटम जिनकी विधियों को ड्राफ्ट पर संशोधित किया गया है और एक साथ जारी किया गया है, जो वे संस्करणों को प्रतिस्थापित करते हैं।"
+msgid "An Enterprise sign-in method where everyone on a company's registered email domains authenticates through the company's own SAML identity provider instead of a magic link, so IT grants and revokes access centrally."
+msgstr "एक एंटरप्राइज साइन-इन विधि जिसमें कंपनी के पंजीकृत ईमेल डोमेन के सभी उपयोगकर्ता मैजिक लिंक के बजाय कंपनी के अपने SAML आइडेंटिटी प्रदाता के माध्यम से प्रमाणीकरण करते हैं, ताकि IT केंद्रीय रूप से एक्सेस दे और रद्द कर सके।"
+
msgid "An https request Carbon sends to a system of yours when a workflow reaches that step, carrying whatever headers and body you configured."
msgstr "एक HTTPS अनुरोध जो कार्बन आपके सिस्टम को भेजता है जब एक वर्कफ़्लो उस चरण तक पहुंचता है, आपके द्वारा कॉन्फ़िगर किए गए किसी भी हेडर और बॉडी को ले जाता है।"
@@ -1782,6 +1794,9 @@ msgstr "क्या आप इस विक्रय आदेश के लि
msgid "Are you sure you want to deactivate {0}?"
msgstr "क्या आप {0} को निष्क्रिय करना चाहते हैं?"
+msgid "Are you sure you want to deactivate SAML SSO? Users on your registered domains will no longer be able to sign in through your identity provider. This cannot be undone."
+msgstr "क्या आप निश्चित हैं कि आप SAML SSO को निष्क्रिय करना चाहते हैं? आपके पंजीकृत डोमेन पर उपयोगकर्ता आपके पहचान प्रदाता के माध्यम से साइन इन नहीं कर सकेंगे। यह पूर्ववत नहीं किया जा सकता।"
+
#. placeholder {0}: selectedCategory?.name
msgid "Are you sure you want to deactivate the {0} attribute category?"
msgstr "क्या आप {0} विशेषता श्रेणी को निष्क्रिय करना चाहते हैं?"
@@ -2887,6 +2902,9 @@ msgstr "Carbon-only · इस ग्राहक के लिए वास्
msgid "Carbon-only · the customer sees this text, locked."
msgstr "Carbon-only · ग्राहक यह पाठ देखता है, लॉक किया गया।"
+msgid "Carbon's default passwordless sign-in: an emailed one-time link that signs you in when opened, with no password to remember or leak."
+msgstr "Carbon की डिफ़ॉल्ट पासवर्ड रहित साइन-इन: ईमेल से भेजा गया एक बार इस्तेमाल होने वाला लिंक जो खोलने पर आपको साइन इन कर देता है, याद रखने या लीक होने के लिए कोई पासवर्ड नहीं।"
+
msgid "Carbon's name for a bill of material and bill of process (routing): the components plus the operations that make a part."
msgstr "Carbon का BOM और प्रक्रिया सूची (रूटिंग) के लिए नाम: पार्ट्स बनाने वाले घटक और ऑपरेशन।"
@@ -3456,6 +3474,9 @@ msgstr "पुष्टि करता है कि अवधि में प
msgid "Conflict reason"
msgstr "संघर्ष कारण"
+msgid "Connect"
+msgstr "कनेक्ट करें"
+
msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."
msgstr "Carbon को अपने लेखांकन, परियोजना प्रबंधन, और CAD उपकरणों और बहुत कुछ से जोड़ें।"
@@ -3474,6 +3495,9 @@ msgstr "कोई शर्त मेल नहीं खाने पर चल
msgid "Connect the outside tools your company already runs on"
msgstr "उन बाहरी उपकरणों को कनेक्ट करें जो आपकी कंपनी पहले से चला रही है"
+msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."
+msgstr "अपने आइडेंटिटी प्रदाता को जोड़ें इसके मेटाडेटा URL या इसके कच्चे मेटाडेटा XML को पेस्ट करके — इन दोनों में से केवल एक।"
+
msgid "Connected to"
msgstr "को जोड़ा गया"
@@ -3549,6 +3573,9 @@ msgstr "सामग्री"
msgid "Context"
msgstr "संदर्भ"
+msgid "Continue"
+msgstr "जारी रखें"
+
msgid "Contra-asset account for total depreciation of fixed assets"
msgstr "अचल संपत्तियों के कुल मूल्यह्रास के लिए विरोधी संपत्ति खाता"
@@ -4558,6 +4585,9 @@ msgstr "कर्मचारियों को निष्क्रिय क
msgid "Deactivate Process"
msgstr "प्रक्रिया को निष्क्रिय करें"
+msgid "Deactivate Single Sign-On"
+msgstr "सिंगल साइन-ऑन को निष्क्रिय करें"
+
msgid "Deactivate Supplier"
msgstr "आपूर्तिकर्ता को निष्क्रिय करें"
@@ -5878,6 +5908,9 @@ msgstr "ईमेल"
msgid "Email Address"
msgstr "ईमेल पता"
+msgid "Email Domains"
+msgstr "ईमेल डोमेन"
+
msgid "Email notifications are not included in your company's current plan; email preferences will apply if they are enabled."
msgstr "ईमेल सूचनाएँ आपकी कंपनी की वर्तमान योजना में शामिल नहीं हैं; ईमेल प्राथमिकताएँ लागू होंगी यदि वे सक्षम हैं।"
@@ -7432,6 +7465,9 @@ msgstr "होम फोन"
msgid "Hop {depth}"
msgstr "हॉप {depth}"
+msgid "Host"
+msgstr "होस्ट"
+
msgid "Host, secure, and back up the platform"
msgstr "प्लेटफॉर्म को होस्ट करें, सुरक्षित रखें और बैकअप लें"
@@ -7591,6 +7627,18 @@ msgstr "समरूपता कुंजी"
msgid "Identifiers"
msgstr "पहचानकर्ता"
+msgid "Identity Provider"
+msgstr "आइडेंटिटी प्रदाता"
+
+msgid "Identity provider (IdP)"
+msgstr "आइडेंटिटी प्रदाता (IdP)"
+
+msgid "IdP Metadata URL"
+msgstr "IdP मेटाडेटा URL"
+
+msgid "IdP Metadata XML"
+msgstr "IdP मेटाडेटा XML"
+
msgid "IDs and descriptions are generated for raw materials."
msgstr "कच्चे माल के लिए IDs और विवरण उत्पन्न किए जाते हैं।"
@@ -8500,6 +8548,9 @@ msgstr "कम मैनुअल काम"
msgid "Less manual work, fewer errors"
msgstr "कम मैनुअल काम, कम त्रुटियां"
+msgid "Let members sign in through your identity provider with SAML."
+msgstr "अपने सदस्यों को SAML के साथ अपने पहचान प्रदाता के माध्यम से साइन इन करने दें।"
+
msgid "Let's Build"
msgstr "चलिए निर्माण करें"
@@ -8790,6 +8841,9 @@ msgstr "MACRS अभिसम्मति"
msgid "MACRS Property Class"
msgstr "MACRS संपत्ति वर्ग"
+msgid "Magic link"
+msgstr "मैजिक लिंक"
+
msgid "Maintain a single part and item master"
msgstr "एक एकल भाग और आइटम मास्टर बनाए रखें"
@@ -8868,6 +8922,9 @@ msgstr "यह दस्तावेज़ सक्रिय और दृश
msgid "Manage"
msgstr "प्रबंधित करें"
+msgid "Manage authentication and sign-in requirements for your company."
+msgstr "अपनी कंपनी के लिए प्रमाणीकरण और साइन-इन आवश्यकताओं का प्रबंधन करें।"
+
msgid "Manage how shelf life is tracked, computed, and enforced across inventory."
msgstr "शेल्फ लाइफ को कैसे ट्रैक किया जाता है, गणना की जाती है, और इन्वेंटरी में लागू किया जाता है, इसे प्रबंधित करें।"
@@ -8901,9 +8958,6 @@ msgstr "विनिर्माण"
msgid "Map accounts"
msgstr "खातों को मैप करें"
-msgid "Map Carbon accounts to the provider's chart of accounts. Posted journals push using the mapped provider account code."
-msgstr "Carbon खातों को प्रदाता के खातों का चार्ट से मैप करें। पोस्ट किए गए जर्नल मैप किए गए प्रदाता खाता कोड का उपयोग करके पुश करते हैं।"
-
msgid "Map Extracted Invoice Lines"
msgstr "निकाली गई चालान पंक्तियों को मैप करें"
@@ -10207,6 +10261,9 @@ msgstr "एक तालिका नहीं बल्कि एक साम
msgid "Not certified"
msgstr "प्रमाणित नहीं"
+msgid "Not configured"
+msgstr "कॉन्फ़िगर नहीं किया गया"
+
msgid "Not enough jobs to cover quantity"
msgstr "मात्रा को कवर करने के लिए पर्याप्त जॉबें नहीं हैं"
@@ -10924,6 +10981,9 @@ msgstr "पासकीज़"
msgid "Passkeys are disabled"
msgstr "पासकीज़ अक्षम हैं"
+msgid "Paste the metadata XML if your identity provider does not publish a metadata URL"
+msgstr "मेटाडेटा XML को पेस्ट करें यदि आपका आइडेंटिटी प्रदाता मेटाडेटा URL प्रकाशित नहीं करता है"
+
msgid "Path"
msgstr "पथ"
@@ -11603,9 +11663,15 @@ msgstr "दो-कारक प्रमाणीकरण के प्रव
msgid "Protects your company's data"
msgstr "आपकी कंपनी के डेटा की सुरक्षा करता है"
+msgid "Prove ownership of each email domain with a DNS TXT record before it can route SAML SSO sign-ins. Add the record at DNS host, then click Verify — only verified domains participate in single sign-on."
+msgstr "SAML SSO साइन-इन को रूट करने से पहले DNS TXT रिकॉर्ड के साथ प्रत्येक ईमेल डोमेन का स्वामित्व साबित करें। DNS होस्ट पर रिकॉर्ड जोड़ें, फिर सत्यापित करें पर क्लिक करें — केवल सत्यापित डोमेन एकल साइन-ऑन में भाग लेते हैं।"
+
msgid "Provide process knowledge and inputs"
msgstr "प्रक्रिया ज्ञान और इनपुट प्रदान करें"
+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."
+msgstr "Carbon को SAML एप्लिकेशन के रूप में पंजीकृत करते समय इन URLs को अपने आइडेंटिटी प्रदाता (Okta, Entra ID, Google Workspace, आदि) को प्रदान करें।"
+
msgid "Provider"
msgstr "प्रदाता"
@@ -12476,9 +12542,6 @@ msgstr "अनुरोधित तिथि"
msgid "Require a 6-digit code from an authenticator app when signing in."
msgstr "साइन इन करते समय ऑथेंटिकेटर ऐप से 6-अंकीय कोड की आवश्यकता है।"
-msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected."
-msgstr "इस कंपनी को खोलने से पहले सभी को एक सत्यापनकर्ता ऐप की आवश्यकता है। उनकी अन्य कंपनियां प्रभावित नहीं होंगी।"
-
msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."
msgstr "किसी को भी इस कंपनी को खोलने से पहले एक प्रमाणकर्ता ऐप की आवश्यकता है। उनकी अन्य कंपनियां प्रभावित नहीं हैं। प्रत्येक व्यक्ति की स्थिति देखने के लिए <0>कर्मचारी खातों पृष्ठ</0> पर जाएं।"
@@ -12491,6 +12554,9 @@ msgstr "राशि सीमा के आधार पर क्रय आद
msgid "Require approval for quality documents in your workflow"
msgstr "आपके वर्कफ़्लो में गुणवत्ता दस्तावेज़ों के लिए अनुमोदन की आवश्यकता है"
+msgid "Require SAML SSO"
+msgstr "SAML SSO आवश्यक करें"
+
msgid "Require two-factor authentication"
msgstr "दो-कारक प्रमाणीकरण की आवश्यकता"
@@ -13032,6 +13098,9 @@ msgstr "सहेजें और अधिलेखित करें"
msgid "Save applications"
msgstr "आवेदन सहेजें"
+msgid "Save changes"
+msgstr "परिवर्तन सहेजें"
+
msgid "Save contacts"
msgstr "संपर्क सहेजें"
@@ -13574,6 +13643,9 @@ msgstr "सेवा विवरण"
msgid "Service ID"
msgstr "सेवा ID"
+msgid "Service Provider Details"
+msgstr "सेवा प्रदाता विवरण"
+
msgid "services"
msgstr "सेवाएं"
@@ -13903,9 +13975,6 @@ msgstr "Carbon में साइन इन करें"
msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."
msgstr "जादुई लिंक के बजाय बायोमेट्रिक्स के साथ साइन इन करें। पासकीज़ Face ID, Touch ID, या आपकी डिवाइस PIN द्वारा सुरक्षित हैं।"
-msgid "Sign in with Email"
-msgstr "ईमेल के साथ साइन इन करें"
-
msgid "Sign in with Google"
msgstr "Google के साथ साइन इन करें"
@@ -13942,6 +14011,12 @@ msgstr "साइन इन करने के लिए आपके प्र
msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."
msgstr "साइन इन करने के लिए अब कोड की आवश्यकता नहीं होगी। पुष्टि करने के लिए अपने ऑथेंटिकेटर ऐप से वर्तमान 6-अंकीय कोड दर्ज करें।"
+msgid "Single Sign-On"
+msgstr "सिंगल साइन-ऑन"
+
+msgid "Single sign-on (SSO)"
+msgstr "सिंगल साइन-ऑन (SSO)"
+
msgid "Sites & locations"
msgstr "साइटें और स्थान"
@@ -14065,6 +14140,9 @@ msgstr "सोर्सिंग प्रकार"
msgid "Sourcing Type"
msgstr "सोर्सिंग प्रकार"
+msgid "SP Metadata URL"
+msgstr "SP मेटाडेटा URL"
+
msgid "Spare Part Consumption"
msgstr "स्पेयर पार्ट खपत"
@@ -14322,15 +14400,6 @@ msgstr "Stripe के पास पहले से इस ईमेल के
msgid "Stripe Due Date"
msgstr "Stripe नियत तिथि"
-msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."
-msgstr "Stripe चालान को ग्राहक को ईमेल करता है, इसलिए एक पता आवश्यक है। यह Carbon में संपर्क के लिए भी सहेजा जाएगा।"
-
-msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
-msgstr "Stripe के पास इस Carbon ग्राहक के लिए अभी कोई ग्राहक नहीं है। पोस्टिंग आपके जुड़े खाते पर एक नया ग्राहक बना देगी।"
-
-msgid "Stripe Due Date"
-msgstr "Stripe नियत तिथि"
-
msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."
msgstr "Stripe ग्राहक को चालान ईमेल करता है, इसलिए एक पता आवश्यक है। यह Carbon में संपर्क के लिए भी सहेजा जाएगा।"
@@ -15390,6 +15459,9 @@ msgstr "पार्ट की रिवीजन संख्या"
msgid "The sales order line this job was created to supply, tying the job to the customer demand behind it."
msgstr "विक्रय आदेश पंक्ति जिसे आपूर्ति के लिए यह जॉब बनाया गया था, जॉब को इसके पीछे ग्राहक मांग से जोड़ता है।"
+msgid "The SAML metadata URL published by your identity provider"
+msgstr "आपके आइडेंटिटी प्रदाता द्वारा प्रकाशित SAML मेटाडेटा URL"
+
msgid "The schedule used to spread this asset's cost over its useful life (straight-line, declining balance, units of production)."
msgstr "यह शेड्यूल जिसका उपयोग इस संपत्ति की लागत को इसके उपयोगी जीवन (सीधी लाइन मूल्यह्रास, ह्रासमान शेष, उत्पादन की इकाई) पर फैलाने के लिए किया जाता है।"
@@ -15480,6 +15552,9 @@ msgstr "आपूर्तिकर्ता जो इस RFQ को प्र
msgid "The surface finishes available on your materials"
msgstr "आपकी सामग्रियों पर उपलब्ध सतह फिनिशिंग"
+msgid "The system a company uses to manage its people's logins — Okta, Entra ID, or Google Workspace — which vouches for who someone is when they sign in to Carbon via SSO."
+msgstr "वह प्रणाली जिसका उपयोग कंपनी अपने लोगों के लॉगिन प्रबंधित करने के लिए करती है — Okta, Entra ID, या Google Workspace — जो SSO के माध्यम से Carbon में साइन इन करते समय व्यक्ति की पहचान की पुष्टि करती है।"
+
msgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."
msgstr "सिस्टम आपके कॉन्फ़िगर किए गए सिस्टम में हर इन-स्कोप स्वीकृति परीक्षा पास करता है, आपके डेटा के साथ; डेटा सत्यापित है; और आप साइन ऑफ करते हैं। फिर लाइव जाएं।"
@@ -15627,6 +15702,9 @@ msgstr "यह फाइल अब उपलब्ध नहीं है, य
msgid "This Fiscal Year"
msgstr "यह वित्तीय वर्ष"
+msgid "This has no effect until an email domain is verified below."
+msgstr "जब तक नीचे एक ईमेल डोमेन सत्यापित नहीं किया जाता, तब तक इसका कोई प्रभाव नहीं होगा।"
+
msgid "This information will be used on document headers"
msgstr "यह जानकारी दस्तावेज़ शीर्षलेख पर उपयोग की जाएगी"
@@ -15643,9 +15721,6 @@ msgstr "यह आमंत्रण {0} में शामिल होने
msgid "This invoice has no usable due date — choose one for Stripe."
msgstr "इस चालान के पास कोई उपयोगी नियत तिथि नहीं है — Stripe के लिए एक चुनें।"
-msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
-msgstr "यह चालान इस Carbon ग्राहक के लिए पहले से जुड़े Stripe ग्राहक को बिल किया जाएगा। इसके विवरण को बदलने के लिए, इसे Stripe डैशबोर्ड में संपादित करें।"
-
msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
msgstr "इस चालान को Stripe ग्राहक को बिल दिया जाएगा जो पहले से इस Carbon ग्राहक से जुड़ा हुआ है। इसके विवरण को बदलने के लिए, Stripe डैशबोर्ड में संपादित करें।"
@@ -16380,9 +16455,6 @@ msgstr "अपोस्ट किए गए दस्तावेज़"
msgid "Unpublish"
msgstr "अप्रकाशित करें"
-msgid "Unpublish {name}?"
-msgstr "अप्रकाशित करें {name}?"
-
msgid "Unpublish {name}?"
msgstr "{name} को प्रकाशन रद्द करें?"
@@ -16644,6 +16716,9 @@ msgstr "इस दस्तावेज़ का नाम बदलने, ब
msgid "Users can update this value for themselves"
msgstr "उपयोगकर्ता अपने लिए इस मान को अपडेट कर सकते हैं"
+msgid "Users on covered domains can sign in only with SAML SSO; magic link, Google, and passkeys are refused."
+msgstr "कवर किए गए डोमेन पर उपयोगकर्ता केवल SAML SSO के साथ साइन इन कर सकते हैं; जादू लिंक, Google, और पासकी को अस्वीकार किया जाता है।"
+
msgid "Users to Update"
msgstr "अपडेट करने के लिए उपयोगकर्ता"
@@ -16728,6 +16803,9 @@ msgstr "सत्यापन त्रुटि"
msgid "Verification failed"
msgstr "सत्यापन विफल रहा"
+msgid "Verified"
+msgstr "सत्यापित"
+
msgid "Verify"
msgstr "सत्यापित करें"
@@ -17593,7 +17671,11 @@ msgid ""
" {0} than the\n"
" ordered quantity of {1}. What would you like\n"
" to do with the extra parts?"
-msgstr "आप {leftoverQuantity} अधिक \n {0} को {1} की ऑर्डर की गई \n मात्रा से पूरा कर चुके हैं। आप अतिरिक्त पार्ट्स के साथ \n क्या करना चाहेंगे?"
+msgstr ""
+"आप {leftoverQuantity} अधिक \n"
+" {0} को {1} की ऑर्डर की गई \n"
+" मात्रा से पूरा कर चुके हैं। आप अतिरिक्त पार्ट्स के साथ \n"
+" क्या करना चाहेंगे?"
msgid "You do not have permission to edit workflows"
msgstr "आपके पास वर्कफ़्लो को संपादित करने की अनुमति नहीं है"
@@ -17659,6 +17741,9 @@ msgstr "आपकी ग्राहक-सामना करने वाल
msgid "Your data is accessible and reasonably clean"
msgstr "आपका डेटा सुलभ है और उचित रूप से स्वच्छ है"
+msgid "Your DNS provider may auto-append your domain to the record name — if so, enter only the part before it (e.g. _carbon-challenge plus any subdomain)."
+msgstr "आपका DNS प्रदाता रिकॉर्ड नाम में आपका डोमेन स्वचालित रूप से जोड़ सकता है — यदि ऐसा है, तो केवल इससे पहले का भाग दर्ज करें (उदाहरण के लिए _carbon-challenge प्लस कोई भी सबडोमेन)।"
+
msgid "Your Email"
msgstr "आपका ईमेल"
diff --git a/packages/locale/locales/hi/mes.po b/packages/locale/locales/hi/mes.po
index 4e99d98849..9d7a00c6a2 100644
--- a/packages/locale/locales/hi/mes.po
+++ b/packages/locale/locales/hi/mes.po
@@ -280,6 +280,9 @@ msgstr "खपत"
msgid "Consumed expired"
msgstr "खपत की गई समाप्त"
+msgid "Continue"
+msgstr "जारी रखें"
+
#. placeholder {0}: board.unplannedCost.days
msgid "Cost of unplanned maintenance, last {0} days"
msgstr "अनियोजित रखरखाव की लागत, पिछले {0} दिन"
@@ -1269,9 +1272,6 @@ msgstr "कम"
msgid "Short pick {itemName}"
msgstr "Short pick {itemName}"
-msgid "Sign in with Email"
-msgstr "ईमेल के साथ साइन इन करें"
-
msgid "Sign in with Google"
msgstr "Google के साथ साइन इन करें"
diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.po
index b7b2e33056..78ad6f2fcc 100644
--- a/packages/locale/locales/it/erp.po
+++ b/packages/locale/locales/it/erp.po
@@ -475,9 +475,6 @@ msgstr "Un componente Produzione su commessa i cui componenti vengono scaricati
msgid "A managed cloud-hosted version of Carbon"
msgstr "Una versione gestita ospitata nel cloud di Carbon"
-msgid "A managed version with all the advanced features"
-msgstr "Una versione gestita con tutte le funzionalità avanzate"
-
msgid "A managed version with all the advanced features"
msgstr "Una versione gestita con tutte le funzioni avanzate"
@@ -941,9 +938,6 @@ msgstr "Crediti verso clienti"
msgid "Accounts receivable for amounts owed by customers"
msgstr "Crediti verso clienti per importi dovuti dai clienti."
-msgid "Accounts referenced by posting defaults or journal history that have no provider mapping yet."
-msgstr "Conti referenziati da impostazioni predefinite di registrazione o cronologia prima nota che non hanno ancora una mappatura del provider."
-
msgid "Accumulated Depreciation"
msgstr "Fondo di ammortamento"
@@ -980,6 +974,9 @@ msgstr "Costo di acquisizione"
msgid "Acquisition Date"
msgstr "Data di acquisizione"
+msgid "ACS URL"
+msgstr "URL ACS"
+
msgid "Action"
msgstr "Azione"
@@ -1058,6 +1055,9 @@ msgstr "Aggiungi un commento..."
msgid "Add a custom pricing row to override quantity, price, shipping, lead time, and tax"
msgstr "Aggiungi una riga di prezzo personalizzata per forzare quantità, prezzo, spedizione, lead time e imposta"
+msgid "Add a domain"
+msgstr "Aggiungi un dominio"
+
msgid "Add a materials section that lists each item on the bill of materials with its quantity."
msgstr "Aggiungi una sezione materiali che elenca ogni articolo della distinta base con la sua quantità."
@@ -1238,6 +1238,9 @@ msgstr "Aggiungi Fornitore"
msgid "Add the next capability on the same system instead of buying another tool."
msgstr "Aggiungi la prossima funzionalità nello stesso sistema invece di acquistare un altro strumento."
+msgid "Add this TXT record at your DNS host, then click Verify. DNS changes can take a few minutes to propagate."
+msgstr "Aggiungi questo record TXT presso il tuo provider DNS, quindi fai clic su Verifica. Le modifiche DNS possono richiedere alcuni minuti per propagarsi."
+
msgid "Add Timecard"
msgstr "Aggiungi Scheda Orario"
@@ -1369,9 +1372,6 @@ msgstr "Tutte le Ubicazioni"
msgid "All members of selected groups and selected individuals will be able to approve requests"
msgstr "Tutti i membri dei gruppi selezionati e gli individui selezionati potranno approvare le richieste"
-msgid "All posting accounts are mapped"
-msgstr "Tutti i conti di registrazione sono mappati"
-
msgid "All rows imported — {inserted} inserted, {updated} updated."
msgstr "Tutte le righe importate — {inserted} inserite, {updated} aggiornate."
@@ -1448,6 +1448,9 @@ msgstr "Un'automazione che costruisci su una tela: un trigger, poi passaggi che
msgid "An engineering change: the affected items whose methods are revised on a draft and released together, superseding the versions they replace."
msgstr "Una modifica tecnica: gli articoli interessati i cui metodi sono revisionati in una bozza e rilasciati insieme, sostituendo le versioni che sostituiscono."
+msgid "An Enterprise sign-in method where everyone on a company's registered email domains authenticates through the company's own SAML identity provider instead of a magic link, so IT grants and revokes access centrally."
+msgstr "Un metodo di accesso aziendale in cui tutti gli utenti con domini email registrati dall'azienda si autenticano tramite il provider di identità SAML della propria azienda invece di un link magico, consentendo all'IT di concedere e revocare l'accesso centralmente."
+
msgid "An https request Carbon sends to a system of yours when a workflow reaches that step, carrying whatever headers and body you configured."
msgstr "Una richiesta https che Carbon invia a un tuo sistema quando un flusso di lavoro raggiunge quel passaggio, portando i header e il corpo che hai configurato."
@@ -1791,6 +1794,9 @@ msgstr "Sei sicuro di voler creare ordini di produzione per questo ordine di ven
msgid "Are you sure you want to deactivate {0}?"
msgstr "Sei sicuro di voler disattivare {0}?"
+msgid "Are you sure you want to deactivate SAML SSO? Users on your registered domains will no longer be able to sign in through your identity provider. This cannot be undone."
+msgstr "Sei sicuro di voler disattivare SAML SSO? Gli utenti sui tuoi domini registrati non potranno più accedere tramite il tuo provider di identità. Questa azione non può essere annullata."
+
#. placeholder {0}: selectedCategory?.name
msgid "Are you sure you want to deactivate the {0} attribute category?"
msgstr "Sei sicuro di voler disattivare la categoria di attributi {0}?"
@@ -2896,6 +2902,9 @@ msgstr "Solo Carbon · inserisci target reali per questo cliente. Vedono i valor
msgid "Carbon-only · the customer sees this text, locked."
msgstr "Solo Carbon · il cliente vede questo testo, bloccato."
+msgid "Carbon's default passwordless sign-in: an emailed one-time link that signs you in when opened, with no password to remember or leak."
+msgstr "L'accesso senza password predefinito di Carbon: un link monouso inviato via email che ti permette di accedere quando lo apri, senza dover ricordare o divulgare una password."
+
msgid "Carbon's name for a bill of material and bill of process (routing): the components plus the operations that make a part."
msgstr "Nome di Carbon per distinta base e ciclo di lavorazione: i componenti più le operazioni che producono un componente."
@@ -3465,6 +3474,9 @@ msgstr "Conferma che ogni riga di registrazione registrata nel periodo ha uguali
msgid "Conflict reason"
msgstr "Motivo del conflitto"
+msgid "Connect"
+msgstr "Connetti"
+
msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."
msgstr "Connetti Carbon ai tuoi strumenti di contabilità, gestione dei progetti, CAD e molto altro."
@@ -3483,6 +3495,9 @@ msgstr "Connetti il gestore Otherwise a un nodo per eseguire quando nessuna cond
msgid "Connect the outside tools your company already runs on"
msgstr "Collega gli strumenti esterni su cui la tua azienda è già in esecuzione"
+msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."
+msgstr "Connetti il tuo provider di identità incollando l'URL dei metadati o il file XML dei metadati grezzo — esattamente uno dei due."
+
msgid "Connected to"
msgstr "Connesso a"
@@ -3558,6 +3573,9 @@ msgstr "Contenuto"
msgid "Context"
msgstr "Contesto"
+msgid "Continue"
+msgstr "Continua"
+
msgid "Contra-asset account for total depreciation of fixed assets"
msgstr "Conto contrattile per l'ammortamento totale dei cespiti fissi"
@@ -4567,6 +4585,9 @@ msgstr "Disattiva Dipendenti"
msgid "Deactivate Process"
msgstr "Disattiva Processo"
+msgid "Deactivate Single Sign-On"
+msgstr "Disattiva Single Sign-On"
+
msgid "Deactivate Supplier"
msgstr "Disattiva Fornitore"
@@ -5887,6 +5908,9 @@ msgstr "Email"
msgid "Email Address"
msgstr "Indirizzo Email"
+msgid "Email Domains"
+msgstr "Domini Email"
+
msgid "Email notifications are not included in your company's current plan; email preferences will apply if they are enabled."
msgstr "Le notifiche e-mail non sono incluse nel piano attuale della tua azienda; le preferenze e-mail verranno applicate se abilitate."
@@ -7441,6 +7465,9 @@ msgstr "Telefono Casa"
msgid "Hop {depth}"
msgstr "Hop {depth}"
+msgid "Host"
+msgstr "Host"
+
msgid "Host, secure, and back up the platform"
msgstr "Ospitare, proteggere e eseguire il backup della piattaforma"
@@ -7600,6 +7627,18 @@ msgstr "Chiave di idempotenza"
msgid "Identifiers"
msgstr "Identificatori"
+msgid "Identity Provider"
+msgstr "Provider di Identità"
+
+msgid "Identity provider (IdP)"
+msgstr "Provider di identità (IdP)"
+
+msgid "IdP Metadata URL"
+msgstr "URL Metadati IdP"
+
+msgid "IdP Metadata XML"
+msgstr "XML Metadati IdP"
+
msgid "IDs and descriptions are generated for raw materials."
msgstr "Gli ID e le descrizioni vengono generati per le materie prime."
@@ -8509,6 +8548,9 @@ msgstr "Meno lavoro manuale"
msgid "Less manual work, fewer errors"
msgstr "Meno lavoro manuale, meno errori"
+msgid "Let members sign in through your identity provider with SAML."
+msgstr "Consenti ai membri di accedere tramite il tuo provider di identità con SAML."
+
msgid "Let's Build"
msgstr "Costruiamo"
@@ -8799,6 +8841,9 @@ msgstr "Convenzione MACRS"
msgid "MACRS Property Class"
msgstr "Classe di Proprietà MACRS"
+msgid "Magic link"
+msgstr "Link Magico"
+
msgid "Maintain a single part and item master"
msgstr "Mantenere un singolo master di parte e articolo"
@@ -8877,6 +8922,9 @@ msgstr "Rende questo documento attivo e visibile."
msgid "Manage"
msgstr "Gestisci"
+msgid "Manage authentication and sign-in requirements for your company."
+msgstr "Gestisci i requisiti di autenticazione e accesso per la tua azienda."
+
msgid "Manage how shelf life is tracked, computed, and enforced across inventory."
msgstr "Gestisci come la durata di conservazione viene tracciata, calcolata e applicata nell'inventario."
@@ -8910,9 +8958,6 @@ msgstr "Produzione"
msgid "Map accounts"
msgstr "Mappa conti"
-msgid "Map Carbon accounts to the provider's chart of accounts. Posted journals push using the mapped provider account code."
-msgstr "Mappa i conti di Carbon nel piano dei conti del fornitore. I giornali registrati si inoltrano usando il codice account del fornitore mappato."
-
msgid "Map Extracted Invoice Lines"
msgstr "Mappa le righe fattura estratte"
@@ -10216,6 +10261,9 @@ msgstr "Non è una tabella ma un saldo della contabilità generale: il costo si
msgid "Not certified"
msgstr "Non certificato"
+msgid "Not configured"
+msgstr "Non configurato"
+
msgid "Not enough jobs to cover quantity"
msgstr "Non ci sono abbastanza ordini di produzione per coprire la quantità"
@@ -10933,6 +10981,9 @@ msgstr "Passkey"
msgid "Passkeys are disabled"
msgstr "Le passkey sono disabilitate"
+msgid "Paste the metadata XML if your identity provider does not publish a metadata URL"
+msgstr "Incolla l'XML dei metadati se il tuo provider di identità non pubblica un URL di metadati"
+
msgid "Path"
msgstr "Percorso"
@@ -11612,9 +11663,15 @@ msgstr "Proteggi la tua azienda con controlli di sicurezza avanzati come l'auten
msgid "Protects your company's data"
msgstr "Protegge i dati della tua azienda"
+msgid "Prove ownership of each email domain with a DNS TXT record before it can route SAML SSO sign-ins. Add the record at DNS host, then click Verify — only verified domains participate in single sign-on."
+msgstr "Prova la proprietà di ogni dominio di posta elettronica con un record TXT DNS prima che possa instradare gli accessi SSO SAML. Aggiungi il record presso il tuo provider DNS, quindi fai clic su Verifica — solo i domini verificati partecipano all'accesso singolo."
+
msgid "Provide process knowledge and inputs"
msgstr "Fornisci conoscenze e input del processo"
+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."
+msgstr "Fornisci questi URL al tuo provider di identità (Okta, Entra ID, Google Workspace, ecc.) quando registri Carbon come applicazione SAML."
+
msgid "Provider"
msgstr "Provider"
@@ -12485,9 +12542,6 @@ msgstr "Data Richiesta"
msgid "Require a 6-digit code from an authenticator app when signing in."
msgstr "Richiedi un codice a 6 cifre dall'app autenticatore al momento dell'accesso."
-msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected."
-msgstr "Richiedi un'app di autenticazione prima che chiunque possa aprire questa azienda. Le altre aziende non saranno interessate."
-
msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."
msgstr "Richiedi un'app autenticatore prima che chiunque possa aprire questa azienda. Le loro altre aziende non sono interessate. Visita la <0>pagina degli account dei dipendenti</0> per vedere lo stato di ogni persona."
@@ -12500,6 +12554,9 @@ msgstr "Richiedi approvazione per gli ordini di acquisto in base alle soglie di
msgid "Require approval for quality documents in your workflow"
msgstr "Richiedi approvazione per i documenti di qualità nel tuo flusso di lavoro"
+msgid "Require SAML SSO"
+msgstr "Richiedi SAML SSO"
+
msgid "Require two-factor authentication"
msgstr "Richiedi autenticazione a due fattori"
@@ -13041,6 +13098,9 @@ msgstr "Salva e Sovrascrivi"
msgid "Save applications"
msgstr "Salva applicazioni"
+msgid "Save changes"
+msgstr "Salva modifiche"
+
msgid "Save contacts"
msgstr "Salva contatti"
@@ -13484,9 +13544,6 @@ msgstr "Gestito autonomamente"
msgid "Self-hosted or managed"
msgstr "Self-hosted o gestito"
-msgid "Self-onboarding"
-msgstr "Onboarding autonomo"
-
msgid "Self-onboarding"
msgstr "Auto-onboarding"
@@ -13586,6 +13643,9 @@ msgstr "Dettagli Servizio"
msgid "Service ID"
msgstr "ID Servizio"
+msgid "Service Provider Details"
+msgstr "Dettagli del Provider di Servizio"
+
msgid "services"
msgstr "servizi"
@@ -13915,9 +13975,6 @@ msgstr "Accedi a Carbon"
msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."
msgstr "Accedi con biometrica invece di un magic link. Le passkey sono protette da Face ID, Touch ID o dal PIN del tuo dispositivo."
-msgid "Sign in with Email"
-msgstr "Accedi con Email"
-
msgid "Sign in with Google"
msgstr "Accedi con Google"
@@ -13954,6 +14011,12 @@ msgstr "L'accesso richiede anche un codice monouso dalla tua app autenticatore"
msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."
msgstr "L'accesso non richiederà più un codice. Inserisci il codice a 6 cifre attuale dall'app autenticatore per confermare."
+msgid "Single Sign-On"
+msgstr "Single Sign-On"
+
+msgid "Single sign-on (SSO)"
+msgstr "Single sign-on (SSO)"
+
msgid "Sites & locations"
msgstr "Siti e ubicazioni"
@@ -14077,6 +14140,9 @@ msgstr "Tipo di approvvigionamento"
msgid "Sourcing Type"
msgstr "Tipo di approvvigionamento"
+msgid "SP Metadata URL"
+msgstr "URL Metadati SP"
+
msgid "Spare Part Consumption"
msgstr "Consumo di Ricambi"
@@ -14337,9 +14403,6 @@ msgstr "Data di scadenza Stripe"
msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."
msgstr "Stripe invia l'email della fattura al cliente, quindi è richiesto un indirizzo. Questo sarà anche salvato al contatto in Carbon."
-msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
-msgstr "Stripe non ha ancora un cliente per questo cliente Carbon. La registrazione ne creerà uno nel tuo account connesso."
-
msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
msgstr "Stripe non ha ancora un cliente per questo cliente Carbon. La registrazione ne creerà uno sul tuo account collegato."
@@ -15396,6 +15459,9 @@ msgstr "Il numero di revisione della parte"
msgid "The sales order line this job was created to supply, tying the job to the customer demand behind it."
msgstr "La riga dell'ordine di vendita per la quale questo ordine di produzione è stato creato per rifornire, collegando l'ordine di produzione alla domanda del cliente dietro di esso."
+msgid "The SAML metadata URL published by your identity provider"
+msgstr "L'URL dei metadati SAML pubblicati dal tuo provider di identità"
+
msgid "The schedule used to spread this asset's cost over its useful life (straight-line, declining balance, units of production)."
msgstr "Il programma utilizzato per distribuire il costo di questo asset nel corso della sua vita utile (lineare, quote decrescenti, unità di produzione)."
@@ -15486,6 +15552,9 @@ msgstr "I fornitori che ricevono questa RdO; ognuno riceve la propria riga nella
msgid "The surface finishes available on your materials"
msgstr "Le finiture superficiali disponibili sui tuoi materiali"
+msgid "The system a company uses to manage its people's logins — Okta, Entra ID, or Google Workspace — which vouches for who someone is when they sign in to Carbon via SSO."
+msgstr "Il sistema che un'azienda utilizza per gestire gli accessi dei suoi dipendenti — Okta, Entra ID, o Google Workspace — che verifica l'identità di una persona quando accede a Carbon tramite SSO."
+
msgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."
msgstr "Il sistema supera ogni test di accettazione in ambito nel tuo sistema configurato, con i tuoi dati; i dati sono convalidati; e tu firmi. Quindi vai in diretta."
@@ -15633,6 +15702,9 @@ msgstr "Questo file non è più disponibile, oppure non hai l'autorizzazione per
msgid "This Fiscal Year"
msgstr "Questo esercizio fiscale"
+msgid "This has no effect until an email domain is verified below."
+msgstr "Questa opzione non ha effetto fino a quando un dominio di posta elettronica non viene verificato di seguito."
+
msgid "This information will be used on document headers"
msgstr "Queste informazioni verranno utilizzate nelle intestazioni dei documenti"
@@ -16644,6 +16716,9 @@ msgstr "Utenti e gruppi autorizzati a rinominare, sostituire o rietichettare que
msgid "Users can update this value for themselves"
msgstr "Gli utenti possono aggiornare questo valore per se stessi"
+msgid "Users on covered domains can sign in only with SAML SSO; magic link, Google, and passkeys are refused."
+msgstr "Gli utenti sui domini coperti possono accedere solo con SAML SSO; il collegamento magico, Google e le passkey sono rifiutati."
+
msgid "Users to Update"
msgstr "Utenti da aggiornare"
@@ -16728,6 +16803,9 @@ msgstr "Errore di verifica"
msgid "Verification failed"
msgstr "Verifica non riuscita"
+msgid "Verified"
+msgstr "Verificato"
+
msgid "Verify"
msgstr "Verifica"
@@ -17593,7 +17671,11 @@ msgid ""
" {0} than the\n"
" ordered quantity of {1}. What would you like\n"
" to do with the extra parts?"
-msgstr "Hai completato {leftoverQuantity} più \n {0} della\n quantità ordinata di {1}. Cosa vorresti\n fare con i pezzi extra?"
+msgstr ""
+"Hai completato {leftoverQuantity} più \n"
+" {0} della\n"
+" quantità ordinata di {1}. Cosa vorresti\n"
+" fare con i pezzi extra?"
msgid "You do not have permission to edit workflows"
msgstr "Non hai l'autorizzazione per modificare i flussi di lavoro"
@@ -17659,6 +17741,9 @@ msgstr "I tuoi listini prezzi rivolti ai clienti"
msgid "Your data is accessible and reasonably clean"
msgstr "I tuoi dati sono accessibili e ragionevolmente puliti"
+msgid "Your DNS provider may auto-append your domain to the record name — if so, enter only the part before it (e.g. _carbon-challenge plus any subdomain)."
+msgstr "Il tuo provider DNS potrebbe aggiungere automaticamente il tuo dominio al nome del record — se è così, inserisci solo la parte prima (ad es. _carbon-challenge più qualsiasi sottodominio)."
+
msgid "Your Email"
msgstr "La tua email"
diff --git a/packages/locale/locales/it/mes.po b/packages/locale/locales/it/mes.po
index a47bfdec6e..2a25164215 100644
--- a/packages/locale/locales/it/mes.po
+++ b/packages/locale/locales/it/mes.po
@@ -280,6 +280,9 @@ msgstr "Consumato"
msgid "Consumed expired"
msgstr "Consumato scaduto"
+msgid "Continue"
+msgstr "Continua"
+
#. placeholder {0}: board.unplannedCost.days
msgid "Cost of unplanned maintenance, last {0} days"
msgstr "Costo della manutenzione non pianificata, ultimi {0} giorni"
@@ -1269,9 +1272,6 @@ msgstr "Carente"
msgid "Short pick {itemName}"
msgstr "Prelievo breve {itemName}"
-msgid "Sign in with Email"
-msgstr "Accedi con Email"
-
msgid "Sign in with Google"
msgstr "Accedi con Google"
diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.po
index 25920a510c..1dba950a31 100644
--- a/packages/locale/locales/ja/erp.po
+++ b/packages/locale/locales/ja/erp.po
@@ -475,9 +475,6 @@ msgstr "部品が親ジョブに一緒に出庫される受注生産部品。別
msgid "A managed cloud-hosted version of Carbon"
msgstr "Carbonのマネージド クラウド ホスト版"
-msgid "A managed version with all the advanced features"
-msgstr "すべての高度な機能を備えたマネージド版"
-
msgid "A managed version with all the advanced features"
msgstr "すべての高度な機能を備えた管理版"
@@ -941,9 +938,6 @@ msgstr "売掛金"
msgid "Accounts receivable for amounts owed by customers"
msgstr "得意先から支払われるべき金額の売掛金"
-msgid "Accounts referenced by posting defaults or journal history that have no provider mapping yet."
-msgstr "転記デフォルトまたは仕訳履歴によって参照されているが、プロバイダーマッピングがないアカウント。"
-
msgid "Accumulated Depreciation"
msgstr "減価償却累計額"
@@ -980,6 +974,9 @@ msgstr "取得原価"
msgid "Acquisition Date"
msgstr "取得日"
+msgid "ACS URL"
+msgstr "ACS URL"
+
msgid "Action"
msgstr "アクション"
@@ -1058,6 +1055,9 @@ msgstr "コメントを追加..."
msgid "Add a custom pricing row to override quantity, price, shipping, lead time, and tax"
msgstr "数量、価格、配送、リードタイム、および税を上書きするカスタム価格設定行を追加します"
+msgid "Add a domain"
+msgstr "ドメインを追加"
+
msgid "Add a materials section that lists each item on the bill of materials with its quantity."
msgstr "部品表の各項目とその数量をリストアップした材料セクションを追加します。"
@@ -1238,6 +1238,9 @@ msgstr "仕入先を追加"
msgid "Add the next capability on the same system instead of buying another tool."
msgstr "同じシステム上に次の機能を追加して、別のツールを購入する代わりにします。"
+msgid "Add this TXT record at your DNS host, then click Verify. DNS changes can take a few minutes to propagate."
+msgstr "このTXTレコードをDNSホストに追加し、[確認]をクリックしてください。DNSの変更が反映されるまで数分かかる場合があります。"
+
msgid "Add Timecard"
msgstr "タイムカードを追加"
@@ -1445,6 +1448,9 @@ msgstr "キャンバス上に構築するオートメーション:1つのト
msgid "An engineering change: the affected items whose methods are revised on a draft and released together, superseding the versions they replace."
msgstr "設計変更。影響を受ける品目の製法が下書きで改訂され、一緒にリリースされ、置き換える版に置き換わります。"
+msgid "An Enterprise sign-in method where everyone on a company's registered email domains authenticates through the company's own SAML identity provider instead of a magic link, so IT grants and revokes access centrally."
+msgstr "エンタープライズのサインイン方法。登録されたメールドメインのすべてのユーザーが、マジックリンクの代わりに企業独自のSAML IDプロバイダーを通じて認証され、ITが一元的にアクセスを付与・取り消しできます。"
+
msgid "An https request Carbon sends to a system of yours when a workflow reaches that step, carrying whatever headers and body you configured."
msgstr "ワークフローがそのステップに到達したときに、Carbonがあなたのシステムに送信するHTTPSリクエスト。設定したヘッダーと本文が含まれます。"
@@ -1788,6 +1794,9 @@ msgstr "この受注の製造指図を作成してもよろしいですか?ま
msgid "Are you sure you want to deactivate {0}?"
msgstr "{0} を無効化してもよろしいですか?"
+msgid "Are you sure you want to deactivate SAML SSO? Users on your registered domains will no longer be able to sign in through your identity provider. This cannot be undone."
+msgstr "SAML SSOを無効化してもよろしいですか?登録済みドメインのユーザーは、ID プロバイダー経由でのサインインができなくなります。この操作は元に戻せません。"
+
#. placeholder {0}: selectedCategory?.name
msgid "Are you sure you want to deactivate the {0} attribute category?"
msgstr "{0}属性カテゴリを無効化してもよろしいですか?"
@@ -2893,6 +2902,9 @@ msgstr "Carbon のみ · このお客様の実際の目標を入力してくだ
msgid "Carbon-only · the customer sees this text, locked."
msgstr "Carbon のみ · 顧客に表示されるロック中のテキスト。"
+msgid "Carbon's default passwordless sign-in: an emailed one-time link that signs you in when opened, with no password to remember or leak."
+msgstr "Carbonのデフォルトのパスワードレスサインイン:メール送信された一度限りのリンクをクリックするだけでサインイン。パスワードを覚えたり漏らしたりする心配がありません。"
+
msgid "Carbon's name for a bill of material and bill of process (routing): the components plus the operations that make a part."
msgstr "部品表と工程表(工順)に対するCarbonの名前:部品を製造するための部品と工程。"
@@ -3462,6 +3474,9 @@ msgstr "期間内のすべての転記済仕訳行が等しい借方と貸方を
msgid "Conflict reason"
msgstr "紛争の理由"
+msgid "Connect"
+msgstr "接続"
+
msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."
msgstr "Carbonを会計、プロジェクト管理、CADツールなど、さまざまなツールに接続できます。"
@@ -3480,6 +3495,9 @@ msgstr "条件に一致しないときに実行するノードにOtherwiseハン
msgid "Connect the outside tools your company already runs on"
msgstr "会社がすでに実行している外部ツールに接続"
+msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."
+msgstr "IDプロバイダーのメタデータURLまたは生のメタデータXMLを貼り付けて接続します。どちらか一つだけを入力してください。"
+
msgid "Connected to"
msgstr "接続先"
@@ -3555,6 +3573,9 @@ msgstr "コンテンツ"
msgid "Context"
msgstr "コンテキスト"
+msgid "Continue"
+msgstr "続行"
+
msgid "Contra-asset account for total depreciation of fixed assets"
msgstr "固定資産の総減価償却費の逆資産勘定"
@@ -4564,6 +4585,9 @@ msgstr "従業員を無効化"
msgid "Deactivate Process"
msgstr "プロセスを無効化"
+msgid "Deactivate Single Sign-On"
+msgstr "シングルサインオンを無効化"
+
msgid "Deactivate Supplier"
msgstr "仕入先を無効化"
@@ -5884,6 +5908,9 @@ msgstr "メール"
msgid "Email Address"
msgstr "メールアドレス"
+msgid "Email Domains"
+msgstr "メールドメイン"
+
msgid "Email notifications are not included in your company's current plan; email preferences will apply if they are enabled."
msgstr "メール通知はあなたの会社の現在のプランに含まれていません。メール設定が有効になっている場合は適用されます。"
@@ -7438,6 +7465,9 @@ msgstr "自宅電話"
msgid "Hop {depth}"
msgstr "ホップ {depth}"
+msgid "Host"
+msgstr "ホスト"
+
msgid "Host, secure, and back up the platform"
msgstr "プラットフォームをホストし、保護し、バックアップする"
@@ -7597,6 +7627,18 @@ msgstr "冪等性キー"
msgid "Identifiers"
msgstr "識別子"
+msgid "Identity Provider"
+msgstr "IDプロバイダー"
+
+msgid "Identity provider (IdP)"
+msgstr "IDプロバイダー(IdP)"
+
+msgid "IdP Metadata URL"
+msgstr "IdP メタデータURL"
+
+msgid "IdP Metadata XML"
+msgstr "IdP メタデータXML"
+
msgid "IDs and descriptions are generated for raw materials."
msgstr "IDと説明は原材料に対して生成されます。"
@@ -8506,6 +8548,9 @@ msgstr "手作業を減らす"
msgid "Less manual work, fewer errors"
msgstr "手作業を減らし、エラーを削減"
+msgid "Let members sign in through your identity provider with SAML."
+msgstr "SAMLを使用してIDプロバイダーを通じてメンバーがサインインできるようにします。"
+
msgid "Let's Build"
msgstr "ビルドしましょう"
@@ -8796,6 +8841,9 @@ msgstr "MACRS規約"
msgid "MACRS Property Class"
msgstr "MACRS資産クラス"
+msgid "Magic link"
+msgstr "マジックリンク"
+
msgid "Maintain a single part and item master"
msgstr "単一の部品とアイテムマスターを維持する"
@@ -8874,6 +8922,9 @@ msgstr "このドキュメントを有効にして表示します。"
msgid "Manage"
msgstr "管理"
+msgid "Manage authentication and sign-in requirements for your company."
+msgstr "会社の認証とサインイン要件を管理します。"
+
msgid "Manage how shelf life is tracked, computed, and enforced across inventory."
msgstr "保存期間が在庫全体で追跡、計算、および適用される方法を管理します。"
@@ -8907,9 +8958,6 @@ msgstr "製造"
msgid "Map accounts"
msgstr "勘定をマップ"
-msgid "Map Carbon accounts to the provider's chart of accounts. Posted journals push using the mapped provider account code."
-msgstr "Carbonの勘定科目をプロバイダーの勘定科目表にマップします。転記済の仕訳は、マップされたプロバイダー勘定科目コードを使用してプッシュされます。"
-
msgid "Map Extracted Invoice Lines"
msgstr "抽出された請求書明細をマップ"
@@ -10213,6 +10261,9 @@ msgstr "テーブルではなく総勘定元帳の残高です。指図材料が
msgid "Not certified"
msgstr "認定されていない"
+msgid "Not configured"
+msgstr "未設定"
+
msgid "Not enough jobs to cover quantity"
msgstr "数量をカバーするのに十分な製造指図がありません"
@@ -10930,6 +10981,9 @@ msgstr "パスキー"
msgid "Passkeys are disabled"
msgstr "パスキーは無効です"
+msgid "Paste the metadata XML if your identity provider does not publish a metadata URL"
+msgstr "IDプロバイダーがメタデータURLを公開していない場合は、メタデータXMLを貼り付けてください"
+
msgid "Path"
msgstr "パス"
@@ -11609,9 +11663,15 @@ msgstr "二要素認証の強制などの高度なセキュリティ制御で会
msgid "Protects your company's data"
msgstr "会社データを保護します"
+msgid "Prove ownership of each email domain with a DNS TXT record before it can route SAML SSO sign-ins. Add the record at DNS host, then click Verify — only verified domains participate in single sign-on."
+msgstr "SAML SSO サインインをルーティングする前に、DNS TXTレコードでメールドメインの所有権を証明してください。DNSホストでレコードを追加してから[確認]をクリックします。検証済みドメインのみシングル サインオンに参加できます。"
+
msgid "Provide process knowledge and inputs"
msgstr "プロセスの知識と入力を提供する"
+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."
+msgstr "CarbonをSAMLアプリケーションとして登録する際に、これらのURLをIDプロバイダー(Okta、Entra ID、Google Workspaceなど)に提供してください。"
+
msgid "Provider"
msgstr "プロバイダー"
@@ -12482,9 +12542,6 @@ msgstr "希望納期"
msgid "Require a 6-digit code from an authenticator app when signing in."
msgstr "サインイン時に認証器アプリから6桁のコードが必要です。"
-msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected."
-msgstr "この会社にアクセスするにはオーセンティケーターアプリが必須です。他の会社は影響を受けません。"
-
msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."
msgstr "このアプリケーション認証器を要求して、誰もがこの会社を開く前に認証を要求します。他の会社は影響を受けません。<0>従業員アカウントページ</0>にアクセスして、各個人のステータスを確認してください。"
@@ -12497,6 +12554,9 @@ msgstr "金額の閾値に基づいて発注書の承認が必要です"
msgid "Require approval for quality documents in your workflow"
msgstr "ワークフローの品質ドキュメントについて承認が必要です"
+msgid "Require SAML SSO"
+msgstr "SAML SSOを必須にする"
+
msgid "Require two-factor authentication"
msgstr "二要素認証が必要です"
@@ -13038,6 +13098,9 @@ msgstr "保存して上書き"
msgid "Save applications"
msgstr "アプリケーションを保存"
+msgid "Save changes"
+msgstr "変更を保存"
+
msgid "Save contacts"
msgstr "担当者を保存"
@@ -13580,6 +13643,9 @@ msgstr "サービス詳細"
msgid "Service ID"
msgstr "サービスID"
+msgid "Service Provider Details"
+msgstr "サービスプロバイダーの詳細"
+
msgid "services"
msgstr "サービス"
@@ -13909,9 +13975,6 @@ msgstr "Carbonにサインイン"
msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."
msgstr "マジックリンクの代わりに生体認証でサインインします。パスキーはFace ID、Touch ID、またはデバイスPINで保護されます。"
-msgid "Sign in with Email"
-msgstr "メールでサインイン"
-
msgid "Sign in with Google"
msgstr "Googleでサインイン"
@@ -13948,6 +14011,12 @@ msgstr "サインインには認証アプリからのワンタイムコードも
msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."
msgstr "サインインにはコードが不要になります。確認するために、認証器アプリの現在の6桁のコードを入力します。"
+msgid "Single Sign-On"
+msgstr "シングルサインオン"
+
+msgid "Single sign-on (SSO)"
+msgstr "シングルサインオン(SSO)"
+
msgid "Sites & locations"
msgstr "サイトと場所"
@@ -14071,6 +14140,9 @@ msgstr "調達タイプ"
msgid "Sourcing Type"
msgstr "調達タイプ"
+msgid "SP Metadata URL"
+msgstr "SP メタデータURL"
+
msgid "Spare Part Consumption"
msgstr "予備品消費"
@@ -14325,15 +14397,6 @@ msgstr "Stripe"
msgid "Stripe already has a customer with this email"
msgstr "Stripeには既にこのメールアドレスの得意先があります"
-msgid "Stripe Due Date"
-msgstr "Stripe期日"
-
-msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."
-msgstr "Stripeは得意先に請求書をメール送信するため、住所が必須です。これはCarbonの担当者にも保存されます。"
-
-msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
-msgstr "StripeにはこのCarbon得意先に対応する顧客がまだありません。転記すると、接続済みアカウント上に作成されます。"
-
msgid "Stripe Due Date"
msgstr "Stripe支払期日"
@@ -15396,6 +15459,9 @@ msgstr "部品のリビジョン番号"
msgid "The sales order line this job was created to supply, tying the job to the customer demand behind it."
msgstr "この製造指図が供給するために作成された受注明細であり、製造指図を背後の得意先所要量に結びつけます。"
+msgid "The SAML metadata URL published by your identity provider"
+msgstr "IDプロバイダーが公開したSAMLメタデータURL"
+
msgid "The schedule used to spread this asset's cost over its useful life (straight-line, declining balance, units of production)."
msgstr "この資産の原価を耐用年数にわたって配分するために使用されるスケジュール(定額法、定率法、生産単位法)。"
@@ -15486,6 +15552,9 @@ msgstr "この見積依頼を受け取る仕入先。各仕入先は見積依頼
msgid "The surface finishes available on your materials"
msgstr "あなたの材料で利用可能な表面仕上げ"
+msgid "The system a company uses to manage its people's logins — Okta, Entra ID, or Google Workspace — which vouches for who someone is when they sign in to Carbon via SSO."
+msgstr "企業が従業員のログインを管理するシステム(Okta、Entra ID、Google Workspaceなど)。SSOを通じてCarbonにサインインする際に、ユーザーの身元を確認します。"
+
msgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."
msgstr "システムは、設定されたシステム内のすべてのスコープ内受け入れテストに合格し、データが検証され、サインオフされます。その後、本番環境に移行します。"
@@ -15633,6 +15702,9 @@ msgstr "このファイルはもう利用できないか、またはそれをダ
msgid "This Fiscal Year"
msgstr "この会計年度"
+msgid "This has no effect until an email domain is verified below."
+msgstr "メールドメインが下で検証されるまで、これは効果がありません。"
+
msgid "This information will be used on document headers"
msgstr "この情報は文書ヘッダーで使用されます"
@@ -15652,9 +15724,6 @@ msgstr "この請求書には使用可能な期日がありません。Stripeの
msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
msgstr "この請求書は、すでにこのCarbon得意先にリンクされているStripe顧客に請求されます。詳細を変更するには、Stripeダッシュボードで編集してください。"
-msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
-msgstr "この請求書は、すでにこのCarbon得意先にリンクされているStripe顧客に請求されます。詳細を変更するには、Stripeダッシュボードで編集してください。"
-
msgid "This is a controlled environment, so an authenticator app is required."
msgstr "これは管理環境のため、認証アプリが必須です。"
@@ -15795,9 +15864,6 @@ msgstr "このバージョンは公開済です"
msgid "This version is published. Create a new version to edit."
msgstr "このバージョンは公開済です。編集するには新しいバージョンを作成してください。"
-msgid "This version is published. Create a new version to edit."
-msgstr "このバージョンは公開済です。編集するには新しいバージョンを作成してください。"
-
msgid "This version's definition could not be read."
msgstr "このバージョンの定義を読み取ることができませんでした。"
@@ -16389,9 +16455,6 @@ msgstr "転記されていない文書"
msgid "Unpublish"
msgstr "非公開にする"
-msgid "Unpublish {name}?"
-msgstr "{name}を非公開にしますか?"
-
msgid "Unpublish {name}?"
msgstr "{name}の公開を取り消しますか?"
@@ -16653,6 +16716,9 @@ msgstr "この文書の名前変更、置き換え、または再ラベル付け
msgid "Users can update this value for themselves"
msgstr "ユーザーは自分でこの値を更新できます"
+msgid "Users on covered domains can sign in only with SAML SSO; magic link, Google, and passkeys are refused."
+msgstr "対象ドメインのユーザーは SAML SSO でのみサインインでき、マジック リンク、Google、パスキーは拒否されます。"
+
msgid "Users to Update"
msgstr "更新するユーザー"
@@ -16737,6 +16803,9 @@ msgstr "認証エラー"
msgid "Verification failed"
msgstr "検証に失敗しました"
+msgid "Verified"
+msgstr "検証済み"
+
msgid "Verify"
msgstr "検証"
@@ -17668,6 +17737,9 @@ msgstr "顧客向けの価格表"
msgid "Your data is accessible and reasonably clean"
msgstr "あなたのデータはアクセス可能で、適切にクリーンです"
+msgid "Your DNS provider may auto-append your domain to the record name — if so, enter only the part before it (e.g. _carbon-challenge plus any subdomain)."
+msgstr "DNS プロバイダーはレコード名にドメインを自動的に追加する場合があります。その場合は、その前の部分のみを入力してください(例:_carbon-challenge または任意のサブドメイン付き)。"
+
msgid "Your Email"
msgstr "あなたのメールアドレス"
diff --git a/packages/locale/locales/ja/mes.po b/packages/locale/locales/ja/mes.po
index e708fb0881..70a559d671 100644
--- a/packages/locale/locales/ja/mes.po
+++ b/packages/locale/locales/ja/mes.po
@@ -280,6 +280,9 @@ msgstr "消費済み"
msgid "Consumed expired"
msgstr "消費期限切れ"
+msgid "Continue"
+msgstr "続行"
+
#. placeholder {0}: board.unplannedCost.days
msgid "Cost of unplanned maintenance, last {0} days"
msgstr "過去{0}日間の未計画保全原価"
@@ -1269,9 +1272,6 @@ msgstr "不足"
msgid "Short pick {itemName}"
msgstr "短いピック {itemName}"
-msgid "Sign in with Email"
-msgstr "メールでサインイン"
-
msgid "Sign in with Google"
msgstr "Googleでサインイン"
diff --git a/packages/locale/locales/ko/erp.po b/packages/locale/locales/ko/erp.po
index fb3e70f00a..de09155a46 100644
--- a/packages/locale/locales/ko/erp.po
+++ b/packages/locale/locales/ko/erp.po
@@ -475,9 +475,6 @@ msgstr "주문 생산 부품으로 부품이 모품목 작업 지시로 함께
msgid "A managed cloud-hosted version of Carbon"
msgstr "관리형 클라우드 호스팅 Carbon 버전"
-msgid "A managed version with all the advanced features"
-msgstr "모든 고급 기능을 갖춘 관리형 버전"
-
msgid "A managed version with all the advanced features"
msgstr "모든 고급 기능이 포함된 관리되는 버전"
@@ -941,9 +938,6 @@ msgstr "매출채권"
msgid "Accounts receivable for amounts owed by customers"
msgstr "고객이 지급할 금액에 대한 매출채권"
-msgid "Accounts referenced by posting defaults or journal history that have no provider mapping yet."
-msgstr "전기 기본값이나 전표 이력에서 참조하는 계정 중 공급 업체 매핑이 아직 없는 것"
-
msgid "Accumulated Depreciation"
msgstr "감가상각누계액"
@@ -980,6 +974,9 @@ msgstr "취득원가"
msgid "Acquisition Date"
msgstr "취득일"
+msgid "ACS URL"
+msgstr "ACS URL"
+
msgid "Action"
msgstr "작업"
@@ -1058,6 +1055,9 @@ msgstr "댓글 추가..."
msgid "Add a custom pricing row to override quantity, price, shipping, lead time, and tax"
msgstr "수량, 가격, 배송, 리드타임 및 세금을 재정의하기 위한 사용자 정의 가격 책정 라인 추가"
+msgid "Add a domain"
+msgstr "도메인 추가"
+
msgid "Add a materials section that lists each item on the bill of materials with its quantity."
msgstr "자재 섹션을 추가하여 자재 명세서의 각 항목과 수량을 나열합니다."
@@ -1238,6 +1238,9 @@ msgstr "공급업체 추가"
msgid "Add the next capability on the same system instead of buying another tool."
msgstr "다른 도구를 구매하는 대신 같은 시스템에 다음 기능을 추가하세요."
+msgid "Add this TXT record at your DNS host, then click Verify. DNS changes can take a few minutes to propagate."
+msgstr "DNS 호스트에서 이 TXT 레코드를 추가한 다음 확인을 클릭하세요. DNS 변경은 전파되는 데 몇 분이 걸릴 수 있습니다."
+
msgid "Add Timecard"
msgstr "근무기록 추가"
@@ -1369,9 +1372,6 @@ msgstr "모든 위치"
msgid "All members of selected groups and selected individuals will be able to approve requests"
msgstr "선택한 그룹의 모든 구성원과 선택한 개인이 요청을 승인할 수 있습니다"
-msgid "All posting accounts are mapped"
-msgstr "모든 전기 계정이 매핑됨"
-
msgid "All rows imported — {inserted} inserted, {updated} updated."
msgstr "모든 행을 가져왔습니다 — {inserted}개 추가, {updated}개 업데이트."
@@ -1448,6 +1448,9 @@ msgstr "캔버스에서 빌드하는 자동화: 하나의 트리거와 조건을
msgid "An engineering change: the affected items whose methods are revised on a draft and released together, superseding the versions they replace."
msgstr "설계 변경: 초안에서 방법이 수정되고 함께 릴리스되어 대체하는 버전을 대체하는 영향을 받는 품목"
+msgid "An Enterprise sign-in method where everyone on a company's registered email domains authenticates through the company's own SAML identity provider instead of a magic link, so IT grants and revokes access centrally."
+msgstr "회사에 등록된 이메일 도메인의 모든 사람이 매직 링크 대신 회사의 SAML 자격 증명 공급자를 통해 인증하는 엔터프라이즈 로그인 방법이므로 IT는 액세스를 중앙에서 부여 및 해제합니다."
+
msgid "An https request Carbon sends to a system of yours when a workflow reaches that step, carrying whatever headers and body you configured."
msgstr "워크플로우가 해당 단계에 도달할 때 Carbon이 귀사의 시스템으로 보내는 https 요청으로, 구성한 헤더 및 본문을 전달합니다."
@@ -1791,6 +1794,9 @@ msgstr "이 수주에 대해 작업 지시를 생성하시겠습니까? 이미
msgid "Are you sure you want to deactivate {0}?"
msgstr "{0}을(를) 비활성화하시겠습니까?"
+msgid "Are you sure you want to deactivate SAML SSO? Users on your registered domains will no longer be able to sign in through your identity provider. This cannot be undone."
+msgstr "SAML SSO를 비활성화하시겠습니까? 등록된 도메인의 사용자는 더 이상 ID 공급자를 통해 로그인할 수 없습니다. 이 작업은 실행 취소할 수 없습니다."
+
#. placeholder {0}: selectedCategory?.name
msgid "Are you sure you want to deactivate the {0} attribute category?"
msgstr "{0} 속성 카테고리를 비활성화하시겠습니까?"
@@ -2896,6 +2902,9 @@ msgstr "Carbon 전용 · 이 고객을 위한 실제 목표를 입력하십시
msgid "Carbon-only · the customer sees this text, locked."
msgstr "Carbon 전용 · 고객은 이 텍스트를 볼 수 있습니다(잠김)."
+msgid "Carbon's default passwordless sign-in: an emailed one-time link that signs you in when opened, with no password to remember or leak."
+msgstr "Carbon의 기본 암호 없는 로그인: 열 때 로그인하는 이메일 일회용 링크로, 기억하거나 유출할 암호가 없습니다."
+
msgid "Carbon's name for a bill of material and bill of process (routing): the components plus the operations that make a part."
msgstr "Carbon에서 부품을 만드는 자재 명세서 및 공정 목록(라우팅)의 명칭으로, 구성요소와 공정을 포함합니다."
@@ -3465,6 +3474,9 @@ msgstr "기간 내 전기된 모든 분개가 차변과 대변이 일치하는
msgid "Conflict reason"
msgstr "충돌 이유"
+msgid "Connect"
+msgstr "연결"
+
msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."
msgstr "Carbon을 회계, 프로젝트 관리, CAD 도구 등과 연동하세요."
@@ -3483,6 +3495,9 @@ msgstr "조건이 일치하지 않을 때 실행할 노드에 Otherwise 핸들
msgid "Connect the outside tools your company already runs on"
msgstr "회사에서 이미 사용 중인 외부 도구 연결"
+msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."
+msgstr "메타데이터 URL 또는 원본 메타데이터 XML 중 정확히 하나를 붙여넣어 자격 증명 공급자를 연결합니다."
+
msgid "Connected to"
msgstr "연결 대상"
@@ -3558,6 +3573,9 @@ msgstr "콘텐츠"
msgid "Context"
msgstr "컨텍스트"
+msgid "Continue"
+msgstr "계속"
+
msgid "Contra-asset account for total depreciation of fixed assets"
msgstr "고정자산 총 감가상각액에 대한 자산 차감 계정"
@@ -4567,6 +4585,9 @@ msgstr "직원 비활성화"
msgid "Deactivate Process"
msgstr "공정 비활성화"
+msgid "Deactivate Single Sign-On"
+msgstr "Single Sign-On 비활성화"
+
msgid "Deactivate Supplier"
msgstr "공급업체 비활성화"
@@ -5887,6 +5908,9 @@ msgstr "이메일"
msgid "Email Address"
msgstr "이메일 주소"
+msgid "Email Domains"
+msgstr "이메일 도메인"
+
msgid "Email notifications are not included in your company's current plan; email preferences will apply if they are enabled."
msgstr "이메일 알림은 회사의 현재 요금제에 포함되어 있지 않습니다. 이메일 환경 설정이 활성화된 경우 적용됩니다."
@@ -7441,6 +7465,9 @@ msgstr "자택 전화번호"
msgid "Hop {depth}"
msgstr "홉 {depth}"
+msgid "Host"
+msgstr "호스트"
+
msgid "Host, secure, and back up the platform"
msgstr "플랫폼 호스팅, 보안, 백업"
@@ -7600,6 +7627,18 @@ msgstr "멱등성 키"
msgid "Identifiers"
msgstr "식별자"
+msgid "Identity Provider"
+msgstr "자격 증명 공급자"
+
+msgid "Identity provider (IdP)"
+msgstr "자격 증명 공급자(IdP)"
+
+msgid "IdP Metadata URL"
+msgstr "IdP 메타데이터 URL"
+
+msgid "IdP Metadata XML"
+msgstr "IdP 메타데이터 XML"
+
msgid "IDs and descriptions are generated for raw materials."
msgstr "원자재에 대한 ID와 설명이 자동으로 생성됩니다."
@@ -8509,6 +8548,9 @@ msgstr "수작업 감소"
msgid "Less manual work, fewer errors"
msgstr "수작업 감소, 오류 감소"
+msgid "Let members sign in through your identity provider with SAML."
+msgstr "멤버가 SAML을 통한 ID 제공자로 로그인하도록 허용합니다."
+
msgid "Let's Build"
msgstr "제조해 봅시다"
@@ -8799,6 +8841,9 @@ msgstr "MACRS 컨벤션"
msgid "MACRS Property Class"
msgstr "MACRS 자산 분류"
+msgid "Magic link"
+msgstr "매직 링크"
+
msgid "Maintain a single part and item master"
msgstr "단일 부품 및 품목 마스터 유지"
@@ -8877,6 +8922,9 @@ msgstr "이 문서를 활성 상태로 만들고 표시합니다."
msgid "Manage"
msgstr "관리"
+msgid "Manage authentication and sign-in requirements for your company."
+msgstr "회사의 인증 및 로그인 요구 사항을 관리합니다."
+
msgid "Manage how shelf life is tracked, computed, and enforced across inventory."
msgstr "보존 기간이 재고 전체에서 어떻게 추적, 계산 및 적용되는지 관리합니다."
@@ -8910,9 +8958,6 @@ msgstr "제조"
msgid "Map accounts"
msgstr "계정 매핑"
-msgid "Map Carbon accounts to the provider's chart of accounts. Posted journals push using the mapped provider account code."
-msgstr "Carbon 계정을 공급자의 계정과목표에 매핑합니다. 전기된 전표는 매핑된 공급자 계정 코드를 사용하여 전송됩니다."
-
msgid "Map Extracted Invoice Lines"
msgstr "추출한 송장 라인 매핑"
@@ -10216,6 +10261,9 @@ msgstr "표가 아니라 총계정원장 잔액입니다: 작업 지시 자재
msgid "Not certified"
msgstr "인증되지 않음"
+msgid "Not configured"
+msgstr "구성되지 않음"
+
msgid "Not enough jobs to cover quantity"
msgstr "수량을 충당하기에 충분한 작업 지시가 없습니다."
@@ -10933,6 +10981,9 @@ msgstr "패스키"
msgid "Passkeys are disabled"
msgstr "패스키가 비활성화되었습니다"
+msgid "Paste the metadata XML if your identity provider does not publish a metadata URL"
+msgstr "자격 증명 공급자가 메타데이터 URL을 게시하지 않는 경우 메타데이터 XML을 붙여넣으세요"
+
msgid "Path"
msgstr "경로"
@@ -11612,9 +11663,15 @@ msgstr "2단계 인증 강제와 같은 고급 보안 제어로 회사를 보호
msgid "Protects your company's data"
msgstr "회사 데이터 보호"
+msgid "Prove ownership of each email domain with a DNS TXT record before it can route SAML SSO sign-ins. Add the record at DNS host, then click Verify — only verified domains participate in single sign-on."
+msgstr "이메일 도메인 소유권을 DNS TXT 레코드로 증명한 후 SAML SSO 로그인을 라우팅할 수 있습니다. DNS 호스트에서 레코드를 추가한 다음 확인을 클릭하세요 — 확인된 도메인만 싱글 사인온에 참여합니다."
+
msgid "Provide process knowledge and inputs"
msgstr "공정 지식과 의견을 제공하세요"
+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."
+msgstr "Carbon을 SAML 애플리케이션으로 등록할 때 이러한 URL을 자격 증명 공급자(Okta, Entra ID, Google Workspace 등)에 제공하세요."
+
msgid "Provider"
msgstr "공급자"
@@ -12485,9 +12542,6 @@ msgstr "요청일"
msgid "Require a 6-digit code from an authenticator app when signing in."
msgstr "로그인 시 인증 앱의 6자리 코드를 입력하세요."
-msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected."
-msgstr "누구든지 이 회사를 열기 전에 인증 앱이 필요합니다. 다른 회사는 영향을 받지 않습니다."
-
msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."
msgstr "이 회사를 열기 전에 인증자 앱을 요구합니다. 다른 회사는 영향을 받지 않습니다. <0>직원 계정 페이지</0>를 방문하여 각 사람의 상태를 확인하세요."
@@ -12500,6 +12554,9 @@ msgstr "금액 임계값을 기준으로 발주서에 대한 승인 필요"
msgid "Require approval for quality documents in your workflow"
msgstr "워크플로 내 품질 문서에 승인 필요"
+msgid "Require SAML SSO"
+msgstr "SAML SSO 필수"
+
msgid "Require two-factor authentication"
msgstr "2단계 인증 필수"
@@ -13041,6 +13098,9 @@ msgstr "저장 및 덮어쓰기"
msgid "Save applications"
msgstr "애플리케이션 저장"
+msgid "Save changes"
+msgstr "변경 사항 저장"
+
msgid "Save contacts"
msgstr "담당자 저장"
@@ -13583,6 +13643,9 @@ msgstr "서비스 상세정보"
msgid "Service ID"
msgstr "서비스 ID"
+msgid "Service Provider Details"
+msgstr "서비스 공급자 세부 정보"
+
msgid "services"
msgstr "서비스"
@@ -13912,9 +13975,6 @@ msgstr "Carbon에 로그인"
msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."
msgstr "매직 링크 대신 생체 인식으로 로그인하세요. 패스키는 Face ID, Touch ID 또는 기기 PIN으로 보호됩니다."
-msgid "Sign in with Email"
-msgstr "이메일로 로그인"
-
msgid "Sign in with Google"
msgstr "Google로 로그인"
@@ -13951,6 +14011,12 @@ msgstr "로그인에는 인증자 앱의 일회용 코드도 필요합니다"
msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."
msgstr "로그인할 때 더 이상 코드가 필요하지 않습니다. 확인하려면 인증 앱의 현재 6자리 코드를 입력하세요."
+msgid "Single Sign-On"
+msgstr "Single Sign-On"
+
+msgid "Single sign-on (SSO)"
+msgstr "Single Sign-On(SSO)"
+
msgid "Sites & locations"
msgstr "사이트 및 위치"
@@ -14074,6 +14140,9 @@ msgstr "소싱 유형"
msgid "Sourcing Type"
msgstr "소싱 유형"
+msgid "SP Metadata URL"
+msgstr "SP 메타데이터 URL"
+
msgid "Spare Part Consumption"
msgstr "예비 부품 소모"
@@ -14337,15 +14406,6 @@ msgstr "Stripe가 송장을 고객에게 이메일로 보내므로 주소가 필
msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
msgstr "이 Carbon 고객에 대한 Stripe 고객이 아직 없습니다. 전기하면 연결된 계정에 생성됩니다."
-msgid "Stripe Due Date"
-msgstr "Stripe 마감일"
-
-msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."
-msgstr "Stripe가 송장을 고객에게 이메일로 보내므로 주소가 필요합니다. 이것도 Carbon의 담당자 정보에 저장됩니다."
-
-msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
-msgstr "이 Carbon 고객에 대한 Stripe 고객이 아직 없습니다. 전기하면 연결된 계정에 생성됩니다."
-
msgid "Style of kanban output to show in the Kanban table"
msgstr "칸반 테이블에 표시할 칸반 출력 스타일"
@@ -15399,6 +15459,9 @@ msgstr "품목의 리비전 번호"
msgid "The sales order line this job was created to supply, tying the job to the customer demand behind it."
msgstr "이 작업 지시를 공급하기 위해 생성된 수주 라인으로, 작업 지시를 뒤의 고객 소요량과 연결합니다."
+msgid "The SAML metadata URL published by your identity provider"
+msgstr "자격 증명 공급자가 게시한 SAML 메타데이터 URL"
+
msgid "The schedule used to spread this asset's cost over its useful life (straight-line, declining balance, units of production)."
msgstr "이 자산의 원가를 내용연수에 걸쳐 배분하는 데 사용되는 상각 스케줄입니다(정액법, 정률법, 생산량비례법)."
@@ -15489,6 +15552,9 @@ msgstr "이 견적 요청을 받는 공급업체입니다. 각 공급업체는
msgid "The surface finishes available on your materials"
msgstr "자재에서 사용 가능한 표면 마감"
+msgid "The system a company uses to manage its people's logins — Okta, Entra ID, or Google Workspace — which vouches for who someone is when they sign in to Carbon via SSO."
+msgstr "회사에서 직원의 로그인을 관리하는 시스템(Okta, Entra ID 또는 Google Workspace)으로, SSO를 통해 Carbon에 로그인할 때 신원을 보증합니다."
+
msgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."
msgstr "설정된 시스템에서 귀사 데이터로 범위 내 모든 인수 테스트를 통과하고, 데이터가 검증되며, 귀사가 최종 승인합니다. 그다음 실제 가동을 시작합니다."
@@ -15636,6 +15702,9 @@ msgstr "이 파일은 더 이상 사용할 수 없거나 다운로드 권한이
msgid "This Fiscal Year"
msgstr "이번 회계연도"
+msgid "This has no effect until an email domain is verified below."
+msgstr "이메일 도메인이 아래에서 확인될 때까지 이는 효과가 없습니다."
+
msgid "This information will be used on document headers"
msgstr "이 정보는 문서 헤더에 사용됩니다"
@@ -15655,9 +15724,6 @@ msgstr "이 송장은 사용 가능한 마감일이 없습니다 — Stripe를
msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
msgstr "이 송장은 이미 이 Carbon 고객과 연결된 Stripe 고객에게 청구됩니다. 세부 사항을 변경하려면 Stripe 대시보드에서 편집하세요."
-msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
-msgstr "이 송장은 이미 이 Carbon 고객과 연결된 Stripe 고객에게 청구됩니다. 세부 사항을 변경하려면 Stripe 대시보드에서 편집하세요."
-
msgid "This is a controlled environment, so an authenticator app is required."
msgstr "이것은 제어되는 환경이므로 인증자 앱이 필수입니다."
@@ -15795,9 +15861,6 @@ msgstr "이 버전을 열 수 없습니다."
msgid "This version is published"
msgstr "이 버전은 게시되었습니다."
-msgid "This version is published. Create a new version to edit."
-msgstr "이 버전은 게시되었습니다. 편집하려면 새 버전을 생성하세요."
-
msgid "This version is published. Create a new version to edit."
msgstr "이 버전이 게시됩니다. 편집할 새 버전을 만듭니다."
@@ -16392,9 +16455,6 @@ msgstr "미전기 문서"
msgid "Unpublish"
msgstr "게시 해제"
-msgid "Unpublish {name}?"
-msgstr "{name}을 게시 해제하시겠습니까?"
-
msgid "Unpublish {name}?"
msgstr "게시 취소 {name}?"
@@ -16656,6 +16716,9 @@ msgstr "이 문서의 이름 변경, 교체, 재라벨링이 가능한 사용자
msgid "Users can update this value for themselves"
msgstr "사용자가 이 값을 직접 업데이트할 수 있습니다"
+msgid "Users on covered domains can sign in only with SAML SSO; magic link, Google, and passkeys are refused."
+msgstr "포함된 도메인의 사용자는 SAML SSO로만 로그인할 수 있으며, 매직 링크, Google 및 Passkey는 거부됩니다."
+
msgid "Users to Update"
msgstr "업데이트할 사용자"
@@ -16740,6 +16803,9 @@ msgstr "확인 오류"
msgid "Verification failed"
msgstr "검증 실패"
+msgid "Verified"
+msgstr "확인됨"
+
msgid "Verify"
msgstr "검증"
@@ -17671,6 +17737,9 @@ msgstr "고객 대상 가격표"
msgid "Your data is accessible and reasonably clean"
msgstr "데이터에 접근 가능하고 어느 정도 정리되어 있음"
+msgid "Your DNS provider may auto-append your domain to the record name — if so, enter only the part before it (e.g. _carbon-challenge plus any subdomain)."
+msgstr "DNS 공급자가 레코드 이름에 도메인을 자동으로 추가할 수 있습니다 — 그렇다면 그 앞 부분만 입력하세요 (예: _carbon-challenge 및 모든 하위 도메인)."
+
msgid "Your Email"
msgstr "이메일"
diff --git a/packages/locale/locales/ko/mes.po b/packages/locale/locales/ko/mes.po
index 5a4d3c126a..bca88dc1d0 100644
--- a/packages/locale/locales/ko/mes.po
+++ b/packages/locale/locales/ko/mes.po
@@ -280,6 +280,9 @@ msgstr "소비됨"
msgid "Consumed expired"
msgstr "소모 만료"
+msgid "Continue"
+msgstr "계속"
+
#. placeholder {0}: board.unplannedCost.days
msgid "Cost of unplanned maintenance, last {0} days"
msgstr "계획되지 않은 유지보수의 원가, 최근 {0}일"
@@ -1269,9 +1272,6 @@ msgstr "짧게"
msgid "Short pick {itemName}"
msgstr "{itemName} 부족 피킹"
-msgid "Sign in with Email"
-msgstr "이메일로 로그인"
-
msgid "Sign in with Google"
msgstr "Google로 로그인"
diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.po
index 5b93aac46d..6592dc7ed1 100644
--- a/packages/locale/locales/pl/erp.po
+++ b/packages/locale/locales/pl/erp.po
@@ -938,9 +938,6 @@ msgstr "Należności"
msgid "Accounts receivable for amounts owed by customers"
msgstr "Należności za kwoty należne od klientów"
-msgid "Accounts referenced by posting defaults or journal history that have no provider mapping yet."
-msgstr "Konta z domyślnych wpisów księgowych lub historii dowodów, które nie mają jeszcze mapowania dostawcy."
-
msgid "Accumulated Depreciation"
msgstr "Umorzenie"
@@ -977,6 +974,9 @@ msgstr "Cena nabycia"
msgid "Acquisition Date"
msgstr "Data nabycia"
+msgid "ACS URL"
+msgstr "Adres URL ACS"
+
msgid "Action"
msgstr "Akcja"
@@ -1055,6 +1055,9 @@ msgstr "Dodaj komentarz..."
msgid "Add a custom pricing row to override quantity, price, shipping, lead time, and tax"
msgstr "Dodaj niestandardowy wiersz cennika, aby nadpisać ilość, cenę, wysyłkę, czas realizacji i podatek"
+msgid "Add a domain"
+msgstr "Dodaj domenę"
+
msgid "Add a materials section that lists each item on the bill of materials with its quantity."
msgstr "Dodaj sekcję materiałów, która zawiera listę każdego elementu zestawienia materiałowego z jego ilością."
@@ -1235,6 +1238,9 @@ msgstr "Dodaj dostawcę"
msgid "Add the next capability on the same system instead of buying another tool."
msgstr "Dodaj następną funkcję w tym samym systemie zamiast kupować inne narzędzie."
+msgid "Add this TXT record at your DNS host, then click Verify. DNS changes can take a few minutes to propagate."
+msgstr "Dodaj ten rekord TXT u dostawcy DNS, a następnie kliknij Weryfikuj. Zmiany DNS mogą potrwać kilka minut."
+
msgid "Add Timecard"
msgstr "Dodaj kartę czasu pracy"
@@ -1442,6 +1448,9 @@ msgstr "Automatyzacja, którą budujesz na kanwie: jeden wyzwalacz, a następnie
msgid "An engineering change: the affected items whose methods are revised on a draft and released together, superseding the versions they replace."
msgstr "Zmiana konstrukcyjna — artykuły objęte zmianą, których metody zostały zmienione w wersji roboczej i uwolnione razem, zastępując poprzednie wersje."
+msgid "An Enterprise sign-in method where everyone on a company's registered email domains authenticates through the company's own SAML identity provider instead of a magic link, so IT grants and revokes access centrally."
+msgstr "Metoda logowania dla przedsiębiorstw, w której wszyscy użytkownicy z zarejestrowanych domen e-mail firmy uwierzytelniają się za pośrednictwem własnego dostawcy tożsamości SAML zamiast magicznego linku, dzięki czemu dział IT udziela i cofa dostęp centralnie."
+
msgid "An https request Carbon sends to a system of yours when a workflow reaches that step, carrying whatever headers and body you configured."
msgstr "Żądanie https, które Carbon wysyła do Twojego systemu, gdy przepływ pracy osiągnie ten krok, zawierając nagłówki i treść, które skonfigurowałeś."
@@ -1785,6 +1794,9 @@ msgstr "Czy chcesz utworzyć zlecenia produkcyjne dla tego zamówienia sprzedaż
msgid "Are you sure you want to deactivate {0}?"
msgstr "Czy na pewno chcesz dezaktywować {0}?"
+msgid "Are you sure you want to deactivate SAML SSO? Users on your registered domains will no longer be able to sign in through your identity provider. This cannot be undone."
+msgstr "Czy na pewno chcesz wyłączyć SAML SSO? Użytkownicy w Twoich zarejestrowanych domenach nie będą już mogli się logować poprzez dostawcę tożsamości. Tej operacji nie można cofnąć."
+
#. placeholder {0}: selectedCategory?.name
msgid "Are you sure you want to deactivate the {0} attribute category?"
msgstr "Czy na pewno chcesz dezaktywować kategorię atrybutów {0}?"
@@ -2890,6 +2902,9 @@ msgstr "Tylko dla Carbon · wpisz rzeczywiste cele dla tego klienta. Widzi warto
msgid "Carbon-only · the customer sees this text, locked."
msgstr "Tylko dla Carbon · klient widzi ten tekst, zablokowany."
+msgid "Carbon's default passwordless sign-in: an emailed one-time link that signs you in when opened, with no password to remember or leak."
+msgstr "Domyślne logowanie bez hasła w Carbon: wysłany e-mailem jednorazowy link, który Cię zaloguje po otwarciu, bez hasła do zapamiętania lub ujawnienia."
+
msgid "Carbon's name for a bill of material and bill of process (routing): the components plus the operations that make a part."
msgstr "Nazwa Carbon dla listy materiałów i listy operacji (marszruta): komponenty plus operacje, które tworzą część."
@@ -3459,6 +3474,9 @@ msgstr "Potwierdza, że każdy zaksięgowany zapis księgowy w okresie ma równe
msgid "Conflict reason"
msgstr "Powód konfliktu"
+msgid "Connect"
+msgstr "Połącz"
+
msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."
msgstr "Połącz Carbon ze swoimi narzędziami księgowości, zarządzania projektami, CAD i wieloma innymi."
@@ -3477,6 +3495,9 @@ msgstr "Połącz uchwyt Otherwise z węzłem do uruchomienia, gdy żaden warunek
msgid "Connect the outside tools your company already runs on"
msgstr "Połącz zewnętrzne narzędzia, które Twoja firma już wykorzystuje"
+msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."
+msgstr "Połącz dostawcę tożsamości, wklejając adres URL jego metadanych lub surowy kod XML metadanych — dokładnie jeden z nich."
+
msgid "Connected to"
msgstr "Połączono z"
@@ -3552,6 +3573,9 @@ msgstr "Zawartość"
msgid "Context"
msgstr "Kontekst"
+msgid "Continue"
+msgstr "Kontynuuj"
+
msgid "Contra-asset account for total depreciation of fixed assets"
msgstr "Konto aktywa przeciwnego dla całkowitej amortyzacji środków trwałych"
@@ -4561,6 +4585,9 @@ msgstr "Dezaktywuj pracowników"
msgid "Deactivate Process"
msgstr "Dezaktywuj proces"
+msgid "Deactivate Single Sign-On"
+msgstr "Dezaktywuj logowanie jednokrotne"
+
msgid "Deactivate Supplier"
msgstr "Dezaktywuj dostawcę"
@@ -5881,6 +5908,9 @@ msgstr "E-mail"
msgid "Email Address"
msgstr "Adres e-mail"
+msgid "Email Domains"
+msgstr "Domeny e-mail"
+
msgid "Email notifications are not included in your company's current plan; email preferences will apply if they are enabled."
msgstr "Powiadomienia e-mail nie są uwzględnione w bieżącym planie Twojej firmy; preferencje e-mail będą obowiązywać, jeśli zostaną włączone."
@@ -7435,6 +7465,9 @@ msgstr "Telefon domowy"
msgid "Hop {depth}"
msgstr "Przeskok {depth}"
+msgid "Host"
+msgstr "Host"
+
msgid "Host, secure, and back up the platform"
msgstr "Hostuj, zabezpiecz i wykonuj kopie zapasowe platformy"
@@ -7594,6 +7627,18 @@ msgstr "Klucz idempotencji"
msgid "Identifiers"
msgstr "Identyfikatory"
+msgid "Identity Provider"
+msgstr "Dostawca tożsamości"
+
+msgid "Identity provider (IdP)"
+msgstr "Dostawca tożsamości (IdP)"
+
+msgid "IdP Metadata URL"
+msgstr "Adres URL metadanych IdP"
+
+msgid "IdP Metadata XML"
+msgstr "XML metadanych IdP"
+
msgid "IDs and descriptions are generated for raw materials."
msgstr "Identyfikatory i opisy są generowane dla surowców."
@@ -8503,6 +8548,9 @@ msgstr "Mniej pracy ręcznej"
msgid "Less manual work, fewer errors"
msgstr "Mniej pracy ręcznej, mniej błędów"
+msgid "Let members sign in through your identity provider with SAML."
+msgstr "Umożliwij użytkownikom logowanie się za pośrednictwem dostawcy tożsamości z SAML."
+
msgid "Let's Build"
msgstr "Zbudujmy"
@@ -8793,6 +8841,9 @@ msgstr "Konwencja MACRS"
msgid "MACRS Property Class"
msgstr "Klasa Właściwości MACRS"
+msgid "Magic link"
+msgstr "Magiczny link"
+
msgid "Maintain a single part and item master"
msgstr "Utrzymuj pojedynczy katalog części i artykułów"
@@ -8871,6 +8922,9 @@ msgstr "Sprawia, że dokument jest aktywny i widoczny."
msgid "Manage"
msgstr "Zarządzaj"
+msgid "Manage authentication and sign-in requirements for your company."
+msgstr "Zarządzaj wymogami uwierzytelniania i logowania dla Twojej firmy."
+
msgid "Manage how shelf life is tracked, computed, and enforced across inventory."
msgstr "Zarządzaj sposobem śledzenia, obliczania i egzekwowania okresu przydatności w całym magazynie."
@@ -8904,9 +8958,6 @@ msgstr "Produkcja"
msgid "Map accounts"
msgstr "Zmapuj konta"
-msgid "Map Carbon accounts to the provider's chart of accounts. Posted journals push using the mapped provider account code."
-msgstr "Mapuj konta Carbon na plan kont dostawcy. Zaksięgowane dowody księgowe będą przesyłane, używając zmapowanego kodu konta dostawcy."
-
msgid "Map Extracted Invoice Lines"
msgstr "Mapuj wyekstrahowane pozycje faktury"
@@ -10210,6 +10261,9 @@ msgstr "To nie jest tabela, lecz saldo konta głównego: koszt gromadzi się gdy
msgid "Not certified"
msgstr "Nie certyfikowany"
+msgid "Not configured"
+msgstr "Nie skonfigurowano"
+
msgid "Not enough jobs to cover quantity"
msgstr "Niewystarczająco zleceń produkcyjnych aby pokryć ilość"
@@ -10927,6 +10981,9 @@ msgstr "Klucze dostępu"
msgid "Passkeys are disabled"
msgstr "Klucze dostępu są wyłączone"
+msgid "Paste the metadata XML if your identity provider does not publish a metadata URL"
+msgstr "Wklej kod XML metadanych, jeśli Twój dostawca tożsamości nie publikuje adresu URL metadanych"
+
msgid "Path"
msgstr "Ścieżka"
@@ -11606,9 +11663,15 @@ msgstr "Chroń swoją firmę za pomocą zaawansowanych kontroli bezpieczeństwa,
msgid "Protects your company's data"
msgstr "Chroni dane twojej firmy"
+msgid "Prove ownership of each email domain with a DNS TXT record before it can route SAML SSO sign-ins. Add the record at DNS host, then click Verify — only verified domains participate in single sign-on."
+msgstr "Udowodnij własność każdej domeny e-mail za pomocą rekordu TXT DNS, zanim będzie ona mogła obsługiwać logowania SAML SSO. Dodaj rekord u dostawcy DNS, a następnie kliknij Weryfikuj — tylko zweryfikowane domeny uczestniczą w logowaniu jednokrotnym."
+
msgid "Provide process knowledge and inputs"
msgstr "Udostępnij wiedzę procesową i dane wejściowe"
+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."
+msgstr "Podaj te adresy URL dostawcy tożsamości (Okta, Entra ID, Google Workspace, itp.) podczas rejestracji Carbon jako aplikacji SAML."
+
msgid "Provider"
msgstr "Dostawca"
@@ -12479,9 +12542,6 @@ msgstr "Data żądana"
msgid "Require a 6-digit code from an authenticator app when signing in."
msgstr "Wymagaj 6-cyfrowego kodu z aplikacji Authenticator przy logowaniu."
-msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected."
-msgstr "Wymagaj aplikacji uwierzytelniającej zanim ktokolwiek będzie mógł otworzyć tę firmę. Ich inne firmy nie będą dotknięte."
-
msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."
msgstr "Wymagaj aplikacji authenticator przed otwarciem tej firmy. Pozostałe firmy danej osoby nie są objęte. Odwiedź <0>stronę kont pracowników</0>, aby zobaczyć status każdej osoby."
@@ -12494,6 +12554,9 @@ msgstr "Wymagaj zatwierdzenia dla zamówień zakupu na podstawie progów kwotowy
msgid "Require approval for quality documents in your workflow"
msgstr "Wymagaj zatwierdzenia dla dokumentów jakości w przepływie pracy"
+msgid "Require SAML SSO"
+msgstr "Wymagaj SAML SSO"
+
msgid "Require two-factor authentication"
msgstr "Wymagaj uwierzytelniania dwuskładnikowego"
@@ -13035,6 +13098,9 @@ msgstr "Zapisz i Zastąp"
msgid "Save applications"
msgstr "Zapisz aplikacje"
+msgid "Save changes"
+msgstr "Zapisz zmiany"
+
msgid "Save contacts"
msgstr "Zapisz kontakty"
@@ -13577,6 +13643,9 @@ msgstr "Szczegóły usługi"
msgid "Service ID"
msgstr "Identyfikator Serwisu"
+msgid "Service Provider Details"
+msgstr "Szczegóły dostawcy usług"
+
msgid "services"
msgstr "usługi"
@@ -13906,9 +13975,6 @@ msgstr "Zaloguj się do Carbon"
msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."
msgstr "Zaloguj się za pomocą biometrii zamiast linku magicznego. Klucze dostępu są zabezpieczone za pomocą Face ID, Touch ID lub numeru PIN urządzenia."
-msgid "Sign in with Email"
-msgstr "Zaloguj się za pomocą poczty e-mail"
-
msgid "Sign in with Google"
msgstr "Zaloguj się za pomocą Google"
@@ -13945,6 +14011,12 @@ msgstr "Logowanie wymaga również kodu jednorazowego z aplikacji authenticator"
msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."
msgstr "Logowanie nie będzie już wymagać kodu. Wpisz bieżący 6-cyfrowy kod z aplikacji Authenticator, aby potwierdzić."
+msgid "Single Sign-On"
+msgstr "Logowanie jednokrotne"
+
+msgid "Single sign-on (SSO)"
+msgstr "Logowanie jednokrotne (SSO)"
+
msgid "Sites & locations"
msgstr "Lokalizacje i obiekty"
@@ -14068,6 +14140,9 @@ msgstr "Typ pozyskania"
msgid "Sourcing Type"
msgstr "Typ pozyskiwania"
+msgid "SP Metadata URL"
+msgstr "Adres URL metadanych SP"
+
msgid "Spare Part Consumption"
msgstr "Zużycie części zamiennych"
@@ -14325,12 +14400,6 @@ msgstr "Stripe już ma klienta z tym adresem e-mail"
msgid "Stripe Due Date"
msgstr "Termin Stripe"
-msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."
-msgstr "Stripe wysyła fakturę do klienta, dlatego wymagany jest adres. Zostanie to również zapisane w kontakcie w Carbon."
-
-msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
-msgstr "Stripe nie ma jeszcze klienta dla tego klienta Carbon. Księgowanie utworzy go na twoim podłączonym koncie."
-
msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."
msgstr "Stripe wysyła fakturę do klienta pocztą e-mail, więc wymagany jest adres. Zostanie również zapisany w kontakcie w Carbon."
@@ -15390,6 +15459,9 @@ msgstr "Numer rewizji części"
msgid "The sales order line this job was created to supply, tying the job to the customer demand behind it."
msgstr "Pozycja zamówienia sprzedaży, do której to zlecenie zostało utworzone, wiążące zlecenie z zapotrzebowaniem klienta stojącym za tym."
+msgid "The SAML metadata URL published by your identity provider"
+msgstr "Adres URL metadanych SAML opublikowany przez dostawcę tożsamości"
+
msgid "The schedule used to spread this asset's cost over its useful life (straight-line, declining balance, units of production)."
msgstr "Harmonogram używany do rozłożenia kosztu tego zasobu na jego okres użytkowania (liniowy, metoda degresywna, jednostki produkcji)."
@@ -15480,6 +15552,9 @@ msgstr "Dostawcy otrzymujący to RFQ; każdy otrzymuje swoją pozycję w RFQ, na
msgid "The surface finishes available on your materials"
msgstr "Dostępne wykończenia powierzchni Twoich materiałów"
+msgid "The system a company uses to manage its people's logins — Okta, Entra ID, or Google Workspace — which vouches for who someone is when they sign in to Carbon via SSO."
+msgstr "System, którego firma używa do zarządzania logowaniem użytkowników — Okta, Entra ID lub Google Workspace — który poświadcza tożsamość osoby podczas logowania do Carbon za pośrednictwem logowania jednokrotnego."
+
msgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."
msgstr "System przechodzi każdy test akceptacyjny w zakresie w Twoim skonfigurowanym systemie, z Twoimi danymi; dane są zweryfikowane; i podpisujesz. Następnie uruchamiasz się na żywo."
@@ -15627,6 +15702,9 @@ msgstr "Ten plik nie jest już dostępny lub nie masz uprawnień do jego pobrani
msgid "This Fiscal Year"
msgstr "Ten rok obrotowy"
+msgid "This has no effect until an email domain is verified below."
+msgstr "To nie ma żadnego wpływu do momentu weryfikacji domeny e-mail poniżej."
+
msgid "This information will be used on document headers"
msgstr "Te informacje będą używane w nagłówkach dokumentów"
@@ -15643,9 +15721,6 @@ msgstr "To zaproszenie do dołączenia do {0} wygasło. Możesz poprosić o wys
msgid "This invoice has no usable due date — choose one for Stripe."
msgstr "Ta faktura nie ma użytecznego terminu — wybierz jeden dla Stripe."
-msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
-msgstr "Ta faktura będzie wystawiona klientowi Stripe już powiązanemu z tym klientem Carbon. Aby zmienić jego szczegóły, edytuj go na pulpicie Stripe."
-
msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
msgstr "Ta faktura będzie naliczona klientowi Stripe już połączonemu z tym klientem Carbon. Aby zmienić jego szczegóły, edytuj go w pulpicie Stripe."
@@ -16378,7 +16453,7 @@ msgid "Unposted Documents"
msgstr "Nieopublikowane dokumenty"
msgid "Unpublish"
-msgstr "Cofnij publikację"
+msgstr "Cofnij publikowanie"
msgid "Unpublish {name}?"
msgstr "Cofnąć publikację {name}?"
@@ -16641,6 +16716,9 @@ msgstr "Użytkownicy i grupy uprawnieni do zmiany nazwy, zamiany lub ponownego e
msgid "Users can update this value for themselves"
msgstr "Użytkownicy mogą aktualizować tę wartość dla siebie"
+msgid "Users on covered domains can sign in only with SAML SSO; magic link, Google, and passkeys are refused."
+msgstr "Użytkownicy w domenach objętych wymogiem mogą się logować tylko za pomocą SAML SSO; linki magiczne, Google i klucze dostępu są blokowane."
+
msgid "Users to Update"
msgstr "Użytkownicy do aktualizacji"
@@ -16725,6 +16803,9 @@ msgstr "Błąd weryfikacji"
msgid "Verification failed"
msgstr "Weryfikacja nie powiodła się"
+msgid "Verified"
+msgstr "Zweryfikowany"
+
msgid "Verify"
msgstr "Weryfikuj"
@@ -17656,6 +17737,9 @@ msgstr "Twoje cenniki dostępne dla klientów"
msgid "Your data is accessible and reasonably clean"
msgstr "Twoje dane są dostępne i w rozsądnie czystej formie"
+msgid "Your DNS provider may auto-append your domain to the record name — if so, enter only the part before it (e.g. _carbon-challenge plus any subdomain)."
+msgstr "Twój dostawca DNS może automatycznie dołączyć Twoją domenę do nazwy rekordu — jeśli tak się stanie, wpisz tylko część przed nią (np. _carbon-challenge plus dowolna poddomena)."
+
msgid "Your Email"
msgstr "Twój e-mail"
diff --git a/packages/locale/locales/pl/mes.po b/packages/locale/locales/pl/mes.po
index 4b848df66c..62e0fb2ea6 100644
--- a/packages/locale/locales/pl/mes.po
+++ b/packages/locale/locales/pl/mes.po
@@ -280,6 +280,9 @@ msgstr "Zużyte"
msgid "Consumed expired"
msgstr "Zużyte wygasłe"
+msgid "Continue"
+msgstr "Kontynuuj"
+
#. placeholder {0}: board.unplannedCost.days
msgid "Cost of unplanned maintenance, last {0} days"
msgstr "Koszt nieplanowanego utrzymania ruchu, ostatnie {0} dni"
@@ -1269,9 +1272,6 @@ msgstr "Brakuje"
msgid "Short pick {itemName}"
msgstr "Krótki pick {itemName}"
-msgid "Sign in with Email"
-msgstr "Zaloguj się przez e-mail"
-
msgid "Sign in with Google"
msgstr "Zaloguj się przez Google"
diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.po
index 70b34d5ac1..f9d2283796 100644
--- a/packages/locale/locales/pt/erp.po
+++ b/packages/locale/locales/pt/erp.po
@@ -938,9 +938,6 @@ msgstr "Contas a receber"
msgid "Accounts receivable for amounts owed by customers"
msgstr "Contas a receber para valores devidos pelos clientes."
-msgid "Accounts referenced by posting defaults or journal history that have no provider mapping yet."
-msgstr "Contas referenciadas por padrões de contabilização ou histórico de diários que ainda não têm mapeamento de provedor."
-
msgid "Accumulated Depreciation"
msgstr "Depreciação acumulada"
@@ -977,6 +974,9 @@ msgstr "Custo de aquisição"
msgid "Acquisition Date"
msgstr "Data de aquisição"
+msgid "ACS URL"
+msgstr "URL ACS"
+
msgid "Action"
msgstr "Ação"
@@ -1055,6 +1055,9 @@ msgstr "Adicione um comentário..."
msgid "Add a custom pricing row to override quantity, price, shipping, lead time, and tax"
msgstr "Adicionar uma linha de precificação personalizada para substituir quantidade, preço, envio, lead time e imposto"
+msgid "Add a domain"
+msgstr "Adicionar um domínio"
+
msgid "Add a materials section that lists each item on the bill of materials with its quantity."
msgstr "Adicione uma seção de materiais que lista cada item na lista de materiais com sua quantidade."
@@ -1235,6 +1238,9 @@ msgstr "Adicionar Fornecedor"
msgid "Add the next capability on the same system instead of buying another tool."
msgstr "Adicione a próxima funcionalidade no mesmo sistema em vez de comprar outra ferramenta."
+msgid "Add this TXT record at your DNS host, then click Verify. DNS changes can take a few minutes to propagate."
+msgstr "Adicione este registro TXT no seu host DNS e clique em Verificar. As alterações de DNS podem levar alguns minutos para se propagar."
+
msgid "Add Timecard"
msgstr "Adicionar Cartão de Ponto"
@@ -1366,9 +1372,6 @@ msgstr "Todos os Locais"
msgid "All members of selected groups and selected individuals will be able to approve requests"
msgstr "Todos os membros dos grupos selecionados e indivíduos selecionados poderão aprovar solicitações"
-msgid "All posting accounts are mapped"
-msgstr "Todas as contas de contabilização estão mapeadas"
-
msgid "All rows imported — {inserted} inserted, {updated} updated."
msgstr "Todas as linhas importadas — {inserted} inseridas, {updated} atualizadas."
@@ -1445,6 +1448,9 @@ msgstr "Uma automação que você constrói em uma tela: um gatilho, seguido por
msgid "An engineering change: the affected items whose methods are revised on a draft and released together, superseding the versions they replace."
msgstr "Uma alteração de engenharia: os itens afetados cujos métodos são revisados em rascunho e liberados juntos, que substituem as versões anteriores."
+msgid "An Enterprise sign-in method where everyone on a company's registered email domains authenticates through the company's own SAML identity provider instead of a magic link, so IT grants and revokes access centrally."
+msgstr "Um método de autenticação empresarial em que todos os usuários dos domínios de email registrados da empresa se autenticam por meio do próprio provedor de identidade SAML da empresa, em vez de um link mágico, para que a equipe de TI possa conceder e revogar o acesso centralmente."
+
msgid "An https request Carbon sends to a system of yours when a workflow reaches that step, carrying whatever headers and body you configured."
msgstr "Uma solicitação https que o Carbon envia para um sistema seu quando um fluxo de trabalho atinge essa etapa, carregando quaisquer cabeçalhos e corpo que você configurou."
@@ -1788,6 +1794,9 @@ msgstr "Tem certeza de que deseja criar ordens de produção para este pedido de
msgid "Are you sure you want to deactivate {0}?"
msgstr "Tem a certeza de que deseja desativar {0}?"
+msgid "Are you sure you want to deactivate SAML SSO? Users on your registered domains will no longer be able to sign in through your identity provider. This cannot be undone."
+msgstr "Tem certeza de que deseja desativar SAML SSO? Os usuários em seus domínios registrados não conseguirão mais entrar através de seu provedor de identidade. Isto não pode ser desfeito."
+
#. placeholder {0}: selectedCategory?.name
msgid "Are you sure you want to deactivate the {0} attribute category?"
msgstr "Tem a certeza de que deseja desativar a categoria de atributo {0}?"
@@ -2893,6 +2902,9 @@ msgstr "Apenas Carbon · preencha os objetivos reais para este cliente. Eles vee
msgid "Carbon-only · the customer sees this text, locked."
msgstr "Apenas Carbon · o cliente vê este texto, bloqueado."
+msgid "Carbon's default passwordless sign-in: an emailed one-time link that signs you in when opened, with no password to remember or leak."
+msgstr "Login sem senha padrão do Carbon: um link de uso único enviado por email que inicia sua sessão quando aberto, sem uma senha para lembrar ou vazar."
+
msgid "Carbon's name for a bill of material and bill of process (routing): the components plus the operations that make a part."
msgstr "O nome do Carbon para uma lista de materiais e lista de operações (roteiro): os componentes mais as operações que compõem uma peça."
@@ -3462,6 +3474,9 @@ msgstr "Confirma que cada lançamento contabilizado no período tem débitos e c
msgid "Conflict reason"
msgstr "Motivo do conflito"
+msgid "Connect"
+msgstr "Conectar"
+
msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."
msgstr "Conecte o Carbon às suas ferramentas de contabilidade, gerenciamento de projetos, CAD e muito mais."
@@ -3480,6 +3495,9 @@ msgstr "Conecte o manipulador Caso contrário a um nó para executar quando nenh
msgid "Connect the outside tools your company already runs on"
msgstr "Conecte as ferramentas externas que sua empresa já utiliza"
+msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."
+msgstr "Conecte seu provedor de identidade colando seu URL de metadados ou seu XML de metadados brutos — exatamente um dos dois."
+
msgid "Connected to"
msgstr "Conectado a"
@@ -3555,6 +3573,9 @@ msgstr "Conteúdo"
msgid "Context"
msgstr "Contexto"
+msgid "Continue"
+msgstr "Continuar"
+
msgid "Contra-asset account for total depreciation of fixed assets"
msgstr "Conta contra ativos para depreciação total de ativos fixos"
@@ -4564,6 +4585,9 @@ msgstr "Desativar Funcionários"
msgid "Deactivate Process"
msgstr "Desativar Processo"
+msgid "Deactivate Single Sign-On"
+msgstr "Desativar Single Sign-On"
+
msgid "Deactivate Supplier"
msgstr "Desativar Fornecedor"
@@ -5884,6 +5908,9 @@ msgstr "Email"
msgid "Email Address"
msgstr "Endereço de Email"
+msgid "Email Domains"
+msgstr "Domínios de Email"
+
msgid "Email notifications are not included in your company's current plan; email preferences will apply if they are enabled."
msgstr "As notificações por email não estão incluídas no plano atual da sua empresa; as preferências de email serão aplicadas se habilitadas."
@@ -7438,6 +7465,9 @@ msgstr "Telefone Residencial"
msgid "Hop {depth}"
msgstr "Salto {depth}"
+msgid "Host"
+msgstr "Host"
+
msgid "Host, secure, and back up the platform"
msgstr "Hospedar, proteger e fazer backup da plataforma"
@@ -7597,6 +7627,18 @@ msgstr "Chave de Idempotência"
msgid "Identifiers"
msgstr "Identificadores"
+msgid "Identity Provider"
+msgstr "Provedor de Identidade"
+
+msgid "Identity provider (IdP)"
+msgstr "Provedor de identidade (IdP)"
+
+msgid "IdP Metadata URL"
+msgstr "URL de Metadados IdP"
+
+msgid "IdP Metadata XML"
+msgstr "XML de Metadados IdP"
+
msgid "IDs and descriptions are generated for raw materials."
msgstr "IDs e descrições são gerados para matérias-primas."
@@ -8506,6 +8548,9 @@ msgstr "Menos trabalho manual"
msgid "Less manual work, fewer errors"
msgstr "Menos trabalho manual, menos erros"
+msgid "Let members sign in through your identity provider with SAML."
+msgstr "Permita que os membros façam login através do seu provedor de identidade com SAML."
+
msgid "Let's Build"
msgstr "Vamos Construir"
@@ -8796,6 +8841,9 @@ msgstr "Convenção MACRS"
msgid "MACRS Property Class"
msgstr "Classe de Propriedade MACRS"
+msgid "Magic link"
+msgstr "Link mágico"
+
msgid "Maintain a single part and item master"
msgstr "Manter um único mestre de peça e item"
@@ -8874,6 +8922,9 @@ msgstr "Torna este documento ativo e visível."
msgid "Manage"
msgstr "Gerenciar"
+msgid "Manage authentication and sign-in requirements for your company."
+msgstr "Gerencie autenticação e requisitos de login para sua empresa."
+
msgid "Manage how shelf life is tracked, computed, and enforced across inventory."
msgstr "Gerenciar como a vida de prateleira é rastreada, calculada e aplicada no inventário."
@@ -8907,9 +8958,6 @@ msgstr "Manufatura"
msgid "Map accounts"
msgstr "Mapear contas"
-msgid "Map Carbon accounts to the provider's chart of accounts. Posted journals push using the mapped provider account code."
-msgstr "Mapeie contas Carbon para o plano de contas do fornecedor. Diários contabilizados são enviados usando o código de conta do fornecedor mapeado."
-
msgid "Map Extracted Invoice Lines"
msgstr "Mapear Linhas de Fatura Extraídas"
@@ -10213,6 +10261,9 @@ msgstr "Não é uma tabela, mas um saldo da razão: o custo se acumula conforme
msgid "Not certified"
msgstr "Não certificado"
+msgid "Not configured"
+msgstr "Não configurado"
+
msgid "Not enough jobs to cover quantity"
msgstr "Não há ordens de produção suficientes para cobrir a quantidade"
@@ -10930,6 +10981,9 @@ msgstr "Chaves de Acesso"
msgid "Passkeys are disabled"
msgstr "As chaves de acesso estão desabilitadas"
+msgid "Paste the metadata XML if your identity provider does not publish a metadata URL"
+msgstr "Cole o XML de metadados se seu provedor de identidade não publicar um URL de metadados"
+
msgid "Path"
msgstr "Caminho"
@@ -11609,9 +11663,15 @@ msgstr "Proteja sua empresa com controles de segurança avançados, como a aplic
msgid "Protects your company's data"
msgstr "Protege os dados da sua empresa"
+msgid "Prove ownership of each email domain with a DNS TXT record before it can route SAML SSO sign-ins. Add the record at DNS host, then click Verify — only verified domains participate in single sign-on."
+msgstr "Comprove a propriedade de cada domínio de email com um registro TXT de DNS antes de poder rotear acessos SAML SSO. Adicione o registro no seu host DNS e clique em Verificar — apenas os domínios verificados participam da autenticação única."
+
msgid "Provide process knowledge and inputs"
msgstr "Forneça conhecimento do processo e entradas"
+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."
+msgstr "Forneça esses URLs ao seu provedor de identidade (Okta, Entra ID, Google Workspace, etc.) ao registrar o Carbon como uma aplicação SAML."
+
msgid "Provider"
msgstr "Provedor"
@@ -12482,9 +12542,6 @@ msgstr "Data Solicitada"
msgid "Require a 6-digit code from an authenticator app when signing in."
msgstr "Exigir um código de 6 dígitos de uma aplicação autenticadora ao iniciar sessão."
-msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected."
-msgstr "Exigir um aplicativo autenticador antes que alguém possa abrir esta empresa. Suas outras empresas não são afetadas."
-
msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."
msgstr "Requer um aplicativo autenticador antes de qualquer pessoa poder abrir esta empresa. Suas outras empresas não são afetadas. Visite a <0>página de contas de funcionários</0> para ver o status de cada pessoa."
@@ -12497,6 +12554,9 @@ msgstr "Exigir aprovação para pedidos de compra com base em limites de valor"
msgid "Require approval for quality documents in your workflow"
msgstr "Exigir aprovação para documentos de qualidade no seu fluxo de trabalho"
+msgid "Require SAML SSO"
+msgstr "Exigir SAML SSO"
+
msgid "Require two-factor authentication"
msgstr "Requerer autenticação de dois fatores"
@@ -13038,6 +13098,9 @@ msgstr "Salvar e sobrescrever"
msgid "Save applications"
msgstr "Salvar aplicações"
+msgid "Save changes"
+msgstr "Salvar alterações"
+
msgid "Save contacts"
msgstr "Salvar contatos"
@@ -13479,7 +13542,7 @@ msgid "Self Managed"
msgstr "Autogerenciado"
msgid "Self-hosted or managed"
-msgstr "Auto-hospedado ou gerenciado"
+msgstr "Hospedagem própria ou gerenciada"
msgid "Self-onboarding"
msgstr "Auto-integração"
@@ -13580,6 +13643,9 @@ msgstr "Detalhes do Serviço"
msgid "Service ID"
msgstr "ID do Serviço"
+msgid "Service Provider Details"
+msgstr "Detalhes do Provedor de Serviço"
+
msgid "services"
msgstr "serviços"
@@ -13909,9 +13975,6 @@ msgstr "Entrar no Carbon"
msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."
msgstr "Inicie sessão com biometria em vez de uma ligação mágica. As chaves de acesso são protegidas por Face ID, Touch ID ou o PIN do seu dispositivo."
-msgid "Sign in with Email"
-msgstr "Entrar com Email"
-
msgid "Sign in with Google"
msgstr "Entrar com Google"
@@ -13948,6 +14011,12 @@ msgstr "Entrar também requer um código único do seu aplicativo autenticador"
msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."
msgstr "Iniciar sessão deixará de exigir um código. Introduza o código de 6 dígitos atual da sua aplicação autenticadora para confirmar."
+msgid "Single Sign-On"
+msgstr "Single Sign-On"
+
+msgid "Single sign-on (SSO)"
+msgstr "Single sign-on (SSO)"
+
msgid "Sites & locations"
msgstr "Locais e instalações"
@@ -14071,6 +14140,9 @@ msgstr "Tipo de origem"
msgid "Sourcing Type"
msgstr "Tipo de Fornecimento"
+msgid "SP Metadata URL"
+msgstr "URL de Metadados SP"
+
msgid "Spare Part Consumption"
msgstr "Consumo de Peças de Reposição"
@@ -14325,15 +14397,6 @@ msgstr "Stripe"
msgid "Stripe already has a customer with this email"
msgstr "Stripe já tem um cliente com este e-mail"
-msgid "Stripe Due Date"
-msgstr "Data de vencimento do Stripe"
-
-msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."
-msgstr "O Stripe envia a fatura para o cliente, portanto um endereço é obrigatório. Isso também será salvo no contato no Carbon."
-
-msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
-msgstr "Stripe ainda não tem um cliente para este cliente do Carbon. A Contabilização criará um na sua conta conectada."
-
msgid "Stripe Due Date"
msgstr "Data de Vencimento Stripe"
@@ -15396,6 +15459,9 @@ msgstr "O número de revisão da peça"
msgid "The sales order line this job was created to supply, tying the job to the customer demand behind it."
msgstr "A linha do pedido de venda que esta ordem de produção foi criada para atender, vinculando a ordem de produção à demanda do cliente por trás."
+msgid "The SAML metadata URL published by your identity provider"
+msgstr "O URL de metadados SAML publicado por seu provedor de identidade"
+
msgid "The schedule used to spread this asset's cost over its useful life (straight-line, declining balance, units of production)."
msgstr "O cronograma usado para distribuir o custo deste ativo durante sua vida útil (linha reta, saldo decrescente, unidades de produção)."
@@ -15486,6 +15552,9 @@ msgstr "Os fornecedores que recebem este RFQ; cada fornecedor recebe sua própri
msgid "The surface finishes available on your materials"
msgstr "Os acabamentos de superfície disponíveis nos seus materiais"
+msgid "The system a company uses to manage its people's logins — Okta, Entra ID, or Google Workspace — which vouches for who someone is when they sign in to Carbon via SSO."
+msgstr "O sistema que uma empresa usa para gerenciar o acesso de seus usuários — Okta, Entra ID ou Google Workspace — e confirmar a identidade de quem entra no Carbon via SSO."
+
msgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."
msgstr "O sistema passa em todos os testes de aceitação no escopo do seu sistema configurado, com seus dados; os dados são validados; e você assina. Depois, entre em operação."
@@ -15633,6 +15702,9 @@ msgstr "Este arquivo não está mais disponível, ou você não tem permissão p
msgid "This Fiscal Year"
msgstr "Este Ano Fiscal"
+msgid "This has no effect until an email domain is verified below."
+msgstr "Isto não tem efeito até que um domínio de email seja verificado abaixo."
+
msgid "This information will be used on document headers"
msgstr "Esta informação será usada nos cabeçalhos de documentos"
@@ -15649,9 +15721,6 @@ msgstr "Este convite para participar de {0} expirou. Você pode solicitar que um
msgid "This invoice has no usable due date — choose one for Stripe."
msgstr "Esta fatura não tem uma data de vencimento utilizável — escolha uma para Stripe."
-msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
-msgstr "Esta fatura será cobrada do cliente Stripe já vinculado a este cliente Carbon. Para alterar seus detalhes, edite-a no painel do Stripe."
-
msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
msgstr "Esta fatura será cobrada do cliente Stripe já vinculado a este cliente Carbon. Para alterar seus detalhes, edite-o no painel Stripe."
@@ -15792,9 +15861,6 @@ msgstr "Esta versão não pode ser aberta"
msgid "This version is published"
msgstr "Esta versão é publicada."
-msgid "This version is published. Create a new version to edit."
-msgstr "Esta versão é publicada. Crie uma nova versão para editar."
-
msgid "This version is published. Create a new version to edit."
msgstr "Esta versão está publicada. Crie uma nova versão para editar."
@@ -16389,9 +16455,6 @@ msgstr "Documentos Não Lançados"
msgid "Unpublish"
msgstr "Cancelar publicação"
-msgid "Unpublish {name}?"
-msgstr "Cancelar publicação de {name}?"
-
msgid "Unpublish {name}?"
msgstr "Cancelar Publicação de {name}?"
@@ -16653,6 +16716,9 @@ msgstr "Usuários e grupos autorizados a renomear, substituir ou re-rotular este
msgid "Users can update this value for themselves"
msgstr "Usuários podem atualizar este valor para si mesmos"
+msgid "Users on covered domains can sign in only with SAML SSO; magic link, Google, and passkeys are refused."
+msgstr "Os usuários em domínios cobertos podem entrar apenas com SAML SSO; link mágico, Google e chaves de acesso são recusados."
+
msgid "Users to Update"
msgstr "Usuários a atualizar"
@@ -16737,6 +16803,9 @@ msgstr "Erro de Verificação"
msgid "Verification failed"
msgstr "Verificação falhou"
+msgid "Verified"
+msgstr "Verificado"
+
msgid "Verify"
msgstr "Verificar"
@@ -17668,6 +17737,9 @@ msgstr "Suas listas de preços voltadas para o cliente"
msgid "Your data is accessible and reasonably clean"
msgstr "Os seus dados são acessíveis e razoavelmente limpos"
+msgid "Your DNS provider may auto-append your domain to the record name — if so, enter only the part before it (e.g. _carbon-challenge plus any subdomain)."
+msgstr "Seu provedor de DNS pode anexar automaticamente seu domínio ao nome do registro — se for o caso, digite apenas a parte anterior (por exemplo, _carbon-challenge mais qualquer subdomínio)."
+
msgid "Your Email"
msgstr "Seu Email"
diff --git a/packages/locale/locales/pt/mes.po b/packages/locale/locales/pt/mes.po
index 96b948040c..cc75598b35 100644
--- a/packages/locale/locales/pt/mes.po
+++ b/packages/locale/locales/pt/mes.po
@@ -280,6 +280,9 @@ msgstr "Consumido"
msgid "Consumed expired"
msgstr "Consumido vencido"
+msgid "Continue"
+msgstr "Continuar"
+
#. placeholder {0}: board.unplannedCost.days
msgid "Cost of unplanned maintenance, last {0} days"
msgstr "Custo de manutenção não planejada, últimos {0} dias"
@@ -1269,9 +1272,6 @@ msgstr "Falta"
msgid "Short pick {itemName}"
msgstr "Colheita curta {itemName}"
-msgid "Sign in with Email"
-msgstr "Entrar com E-mail"
-
msgid "Sign in with Google"
msgstr "Entrar com Google"
diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.po
index 8d37e11978..fcdef57741 100644
--- a/packages/locale/locales/ru/erp.po
+++ b/packages/locale/locales/ru/erp.po
@@ -938,9 +938,6 @@ msgstr "Дебиторская задолженность"
msgid "Accounts receivable for amounts owed by customers"
msgstr "Дебиторская задолженность за суммы, причитающиеся от покупателей"
-msgid "Accounts referenced by posting defaults or journal history that have no provider mapping yet."
-msgstr "Счета, на которые ссылаются стандарты проведения или история операций, но которые пока не имеют сопоставления провайдера."
-
msgid "Accumulated Depreciation"
msgstr "Накопленная амортизация"
@@ -977,6 +974,9 @@ msgstr "Стоимость приобретения"
msgid "Acquisition Date"
msgstr "Дата приобретения"
+msgid "ACS URL"
+msgstr "URL ACS"
+
msgid "Action"
msgstr "Действие"
@@ -1055,6 +1055,9 @@ msgstr "Добавить комментарий..."
msgid "Add a custom pricing row to override quantity, price, shipping, lead time, and tax"
msgstr "Добавить пользовательскую строку ценообразования для переопределения количества, цены, доставки, срока поставки и налога"
+msgid "Add a domain"
+msgstr "Добавить домен"
+
msgid "Add a materials section that lists each item on the bill of materials with its quantity."
msgstr "Добавить раздел материалов, в котором указывается каждый элемент спецификации материалов с его количеством."
@@ -1235,6 +1238,9 @@ msgstr "Добавить поставщика"
msgid "Add the next capability on the same system instead of buying another tool."
msgstr "Добавьте следующую возможность в ту же систему вместо покупки другого инструмента."
+msgid "Add this TXT record at your DNS host, then click Verify. DNS changes can take a few minutes to propagate."
+msgstr "Добавьте эту TXT запись на хосте DNS, затем нажмите Проверить. Изменения DNS могут занять несколько минут на распространение."
+
msgid "Add Timecard"
msgstr "Добавить табель учета рабочего времени"
@@ -1366,9 +1372,6 @@ msgstr "Все местоположения"
msgid "All members of selected groups and selected individuals will be able to approve requests"
msgstr "Все члены выбранных групп и выбранные лица смогут утвердить запросы"
-msgid "All posting accounts are mapped"
-msgstr "Все счета для проведения сопоставлены"
-
msgid "All rows imported — {inserted} inserted, {updated} updated."
msgstr "Все строки импортированы — {inserted} вставлено, {updated} обновлено."
@@ -1445,6 +1448,9 @@ msgstr "Автоматизация, которую вы создаете на х
msgid "An engineering change: the affected items whose methods are revised on a draft and released together, superseding the versions they replace."
msgstr "Конструкторское изменение: затронутая номенклатура, методы которой пересмотрены в черновике и совместно выпущены, вытесняя версии, которые они заменяют."
+msgid "An Enterprise sign-in method where everyone on a company's registered email domains authenticates through the company's own SAML identity provider instead of a magic link, so IT grants and revokes access centrally."
+msgstr "Метод входа для предприятия, при котором все сотрудники компании с зарегистрированными доменами электронной почты аутентифицируются через собственного поставщика удостоверений SAML компании вместо волшебной ссылки, поэтому IT централизованно предоставляет и отзывает доступ."
+
msgid "An https request Carbon sends to a system of yours when a workflow reaches that step, carrying whatever headers and body you configured."
msgstr "HTTPS-запрос, который Carbon отправляет в вашу систему, когда рабочий процесс достигает этого шага, с любыми заголовками и телом, которые вы настроили."
@@ -1788,6 +1794,9 @@ msgstr "Вы уверены, что хотите создать производ
msgid "Are you sure you want to deactivate {0}?"
msgstr "Вы уверены, что хотите деактивировать {0}?"
+msgid "Are you sure you want to deactivate SAML SSO? Users on your registered domains will no longer be able to sign in through your identity provider. This cannot be undone."
+msgstr "Вы уверены, что хотите отключить SAML SSO? Пользователи на ваших зарегистрированных доменах больше не смогут входить через поставщика удостоверений. Это действие невозможно отменить."
+
#. placeholder {0}: selectedCategory?.name
msgid "Are you sure you want to deactivate the {0} attribute category?"
msgstr "Вы уверены, что хотите деактивировать категорию атрибутов {0}?"
@@ -2893,6 +2902,9 @@ msgstr "Carbon-only · заполните реальные цели для эт
msgid "Carbon-only · the customer sees this text, locked."
msgstr "Carbon-only · покупатель видит этот текст, заблокировано."
+msgid "Carbon's default passwordless sign-in: an emailed one-time link that signs you in when opened, with no password to remember or leak."
+msgstr "Встроенный вход без пароля Carbon: ссылка однократного использования, отправляемая по электронной почте, которая подписывает вас при открытии без необходимости помнить или подвергать риску утечки пароль."
+
msgid "Carbon's name for a bill of material and bill of process (routing): the components plus the operations that make a part."
msgstr "Название Carbon для спецификации материалов и Перечня операций (маршрут): компоненты плюс операции, которые производят деталь."
@@ -3462,6 +3474,9 @@ msgstr "Подтверждает, что каждая проводка, пров
msgid "Conflict reason"
msgstr "Причина конфликта"
+msgid "Connect"
+msgstr "Подключиться"
+
msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."
msgstr "Подключите Carbon к своим инструментам бухгалтерского учета, управления проектами, CAD и многому другому."
@@ -3480,6 +3495,9 @@ msgstr "Подключите обработчик Otherwise к узлу для
msgid "Connect the outside tools your company already runs on"
msgstr "Подключить внешние инструменты, которые уже использует ваша организация"
+msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."
+msgstr "Подключите вашего поставщика удостоверений, вставив либо URL его метаданных, либо его необработанный XML-файл метаданных — ровно один из двух."
+
msgid "Connected to"
msgstr "Подключено к"
@@ -3555,6 +3573,9 @@ msgstr "Содержание"
msgid "Context"
msgstr "Контекст"
+msgid "Continue"
+msgstr "Продолжить"
+
msgid "Contra-asset account for total depreciation of fixed assets"
msgstr "Контрактивный счет учета на общую амортизацию основных средств"
@@ -4564,6 +4585,9 @@ msgstr "Деактивировать сотрудников"
msgid "Deactivate Process"
msgstr "Деактивировать процесс"
+msgid "Deactivate Single Sign-On"
+msgstr "Деактивировать Single Sign-On"
+
msgid "Deactivate Supplier"
msgstr "Деактивировать поставщика"
@@ -5884,6 +5908,9 @@ msgstr "Электронная почта"
msgid "Email Address"
msgstr "Адрес электронной почты"
+msgid "Email Domains"
+msgstr "Домены электронной почты"
+
msgid "Email notifications are not included in your company's current plan; email preferences will apply if they are enabled."
msgstr "Уведомления по электронной почте не включены в текущий план вашей организации; настройки электронной почты будут применяться, если они включены."
@@ -7438,6 +7465,9 @@ msgstr "Домашний телефон"
msgid "Hop {depth}"
msgstr "Шаг {depth}"
+msgid "Host"
+msgstr "Хост"
+
msgid "Host, secure, and back up the platform"
msgstr "Размещение, защита и резервное копирование платформы"
@@ -7597,6 +7627,18 @@ msgstr "Ключ идемпотентности"
msgid "Identifiers"
msgstr "Идентификаторы"
+msgid "Identity Provider"
+msgstr "Поставщик удостоверений"
+
+msgid "Identity provider (IdP)"
+msgstr "Поставщик удостоверений (IdP)"
+
+msgid "IdP Metadata URL"
+msgstr "URL метаданных IdP"
+
+msgid "IdP Metadata XML"
+msgstr "XML метаданных IdP"
+
msgid "IDs and descriptions are generated for raw materials."
msgstr "Идентификаторы и описания генерируются для сырья."
@@ -8506,6 +8548,9 @@ msgstr "Меньше ручной работы"
msgid "Less manual work, fewer errors"
msgstr "Меньше ручной работы, меньше ошибок"
+msgid "Let members sign in through your identity provider with SAML."
+msgstr "Позвольте членам входить через вашего поставщика удостоверений с помощью SAML."
+
msgid "Let's Build"
msgstr "Начнём производство"
@@ -8796,6 +8841,9 @@ msgstr "Соглашение MACRS"
msgid "MACRS Property Class"
msgstr "Класс имущества MACRS"
+msgid "Magic link"
+msgstr "Волшебная ссылка"
+
msgid "Maintain a single part and item master"
msgstr "Ведите единый реестр деталей и товаров"
@@ -8874,6 +8922,9 @@ msgstr "Делает этот документ активным и видимы
msgid "Manage"
msgstr "Управление"
+msgid "Manage authentication and sign-in requirements for your company."
+msgstr "Управляйте требованиями аутентификации и входа для вашей компании."
+
msgid "Manage how shelf life is tracked, computed, and enforced across inventory."
msgstr "Управление отслеживанием, вычислением и применением срока хранения в запасах."
@@ -8907,9 +8958,6 @@ msgstr "Производство"
msgid "Map accounts"
msgstr "Сопоставить счета"
-msgid "Map Carbon accounts to the provider's chart of accounts. Posted journals push using the mapped provider account code."
-msgstr "Сопоставьте счета Carbon с планом счетов поставщика. Проведенные операции отправляются с использованием сопоставленного кода счета поставщика."
-
msgid "Map Extracted Invoice Lines"
msgstr "Сопоставить извлеченные строки счета-фактуры"
@@ -10213,6 +10261,9 @@ msgstr "Это не таблица, а остаток главной книги:
msgid "Not certified"
msgstr "Не сертифицировано"
+msgid "Not configured"
+msgstr "Не настроено"
+
msgid "Not enough jobs to cover quantity"
msgstr "Недостаточно производственных заказов для покрытия количества"
@@ -10930,6 +10981,9 @@ msgstr "Ключи доступа"
msgid "Passkeys are disabled"
msgstr "Ключи доступа отключены"
+msgid "Paste the metadata XML if your identity provider does not publish a metadata URL"
+msgstr "Вставьте XML метаданных, если ваш поставщик удостоверений не публикует URL метаданных"
+
msgid "Path"
msgstr "Путь"
@@ -11609,9 +11663,15 @@ msgstr "Защитите свою организацию передовыми с
msgid "Protects your company's data"
msgstr "Защищает данные вашей организации"
+msgid "Prove ownership of each email domain with a DNS TXT record before it can route SAML SSO sign-ins. Add the record at DNS host, then click Verify — only verified domains participate in single sign-on."
+msgstr "Докажите владение каждым доменом электронной почты с помощью TXT записи DNS перед маршрутизацией входов SAML SSO. Добавьте запись на хосте DNS, затем нажмите Проверить — только проверенные домены участвуют в единой авторизации."
+
msgid "Provide process knowledge and inputs"
msgstr "Предоставить знания о процессе и входные данные"
+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."
+msgstr "Предоставьте эти URL вашему поставщику удостоверений (Okta, Entra ID, Google Workspace и т. д.) при регистрации Carbon в качестве приложения SAML."
+
msgid "Provider"
msgstr "Система"
@@ -12482,9 +12542,6 @@ msgstr "Запрошенная дата"
msgid "Require a 6-digit code from an authenticator app when signing in."
msgstr "Требовать 6-значный код из приложения-аутентификатора при входе."
-msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected."
-msgstr "Требовать использование приложения аутентификатора, прежде чем кто-либо сможет открыть эту организацию. Их другие организации не затрагиваются."
-
msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."
msgstr "Требовать приложение аутентификатора перед тем как кто-либо сможет открыть эту организацию. Их другие организации не затронуты. Посетите страницу <0>учетных записей сотрудников</0>, чтобы увидеть статус каждого человека."
@@ -12497,6 +12554,9 @@ msgstr "Требовать утверждение для заказов пост
msgid "Require approval for quality documents in your workflow"
msgstr "Требовать утверждение для документов качества в вашем рабочем процессе"
+msgid "Require SAML SSO"
+msgstr "Требовать SAML SSO"
+
msgid "Require two-factor authentication"
msgstr "Требовать двухфакторную аутентификацию"
@@ -13038,6 +13098,9 @@ msgstr "Сохранить и перезаписать"
msgid "Save applications"
msgstr "Сохранить применения"
+msgid "Save changes"
+msgstr "Сохранить изменения"
+
msgid "Save contacts"
msgstr "Сохранить контактные лица"
@@ -13481,9 +13544,6 @@ msgstr "Самоуправляемый"
msgid "Self-hosted or managed"
msgstr "Локальная установка или облачная"
-msgid "Self-onboarding"
-msgstr "Самостоятельное внедрение"
-
msgid "Self-onboarding"
msgstr "Самостоятельное подключение"
@@ -13583,6 +13643,9 @@ msgstr "Сведения об услуге"
msgid "Service ID"
msgstr "ID обслуживания"
+msgid "Service Provider Details"
+msgstr "Детали поставщика услуг"
+
msgid "services"
msgstr "услуги"
@@ -13912,9 +13975,6 @@ msgstr "Войти в Carbon"
msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."
msgstr "Войдите с использованием биометрии вместо волшебной ссылки. Ключи доступа защищены Face ID, Touch ID или PIN-кодом вашего устройства."
-msgid "Sign in with Email"
-msgstr "Войти с помощью электронной почты"
-
msgid "Sign in with Google"
msgstr "Войти с помощью Google"
@@ -13951,6 +14011,12 @@ msgstr "При входе также требуется одноразовый
msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."
msgstr "Вход больше не будет требовать кода. Введите текущий 6-значный код из приложения-аутентификатора для подтверждения."
+msgid "Single Sign-On"
+msgstr "Single Sign-On"
+
+msgid "Single sign-on (SSO)"
+msgstr "Single sign-on (SSO)"
+
msgid "Sites & locations"
msgstr "Объекты и местоположения"
@@ -14074,6 +14140,9 @@ msgstr "Тип источника"
msgid "Sourcing Type"
msgstr "Тип источника"
+msgid "SP Metadata URL"
+msgstr "URL метаданных SP"
+
msgid "Spare Part Consumption"
msgstr "Потребление запасных частей"
@@ -14332,16 +14401,7 @@ msgid "Stripe Due Date"
msgstr "Срок выполнения Stripe"
msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."
-msgstr "Stripe отправляет счет-фактуру клиенту по электронной почте, поэтому требуется адрес. Он также будет сохранен в контакте в Carbon."
-
-msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
-msgstr "Stripe еще не имеет покупателя для этого покупателя Carbon. Проведение создаст его на вашем подключенном счете."
-
-msgid "Stripe Due Date"
-msgstr "Срок выполнения Stripe"
-
-msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."
-msgstr "Stripe отправляет счет клиенту, поэтому требуется адрес. Это также будет сохранено в контакт в Carbon."
+msgstr "Stripe отправляет счет-фактуру клиенту по электронной почте, поэтому требуется адрес. Это также будет сохранено в контакт в Carbon."
msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
msgstr "Stripe еще не имеет покупателя для этого покупателя Carbon. Проведение создаст его на вашем подключенном счете."
@@ -15399,6 +15459,9 @@ msgstr "Номер ревизии детали."
msgid "The sales order line this job was created to supply, tying the job to the customer demand behind it."
msgstr "Строка заказа покупателя, для которой был создан этот производственный заказ, связывая заказ с находящимся за ним спросом покупателя."
+msgid "The SAML metadata URL published by your identity provider"
+msgstr "URL метаданных SAML, опубликованный вашим поставщиком удостоверений"
+
msgid "The schedule used to spread this asset's cost over its useful life (straight-line, declining balance, units of production)."
msgstr "График, используемый для распределения стоимости этого актива на протяжении его срока полезного использования (линейный метод, уменьшаемый остаток, единицы выпуска)."
@@ -15489,6 +15552,9 @@ msgstr "Поставщики, получающие этот запрос цен;
msgid "The surface finishes available on your materials"
msgstr "Доступные поверхностные покрытия ваших материалов"
+msgid "The system a company uses to manage its people's logins — Okta, Entra ID, or Google Workspace — which vouches for who someone is when they sign in to Carbon via SSO."
+msgstr "Система, которую компания использует для управления входами своих сотрудников — Okta, Entra ID или Google Workspace — которая подтверждает личность пользователя при входе в Carbon через SSO."
+
msgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."
msgstr "Система проходит все тесты приемки в области охвата в вашей настроенной системе с вашими данными; данные проверяются; и вы подписываете акт. Затем переход в боевую эксплуатацию."
@@ -15636,6 +15702,9 @@ msgstr "Этот файл больше недоступен, или у вас н
msgid "This Fiscal Year"
msgstr "Этот финансовый год"
+msgid "This has no effect until an email domain is verified below."
+msgstr "Это не вступит в силу до проверки домена электронной почты ниже."
+
msgid "This information will be used on document headers"
msgstr "Эта информация будет использована в заголовках документов"
@@ -15655,9 +15724,6 @@ msgstr "Этот счет-фактура не имеет используемо
msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
msgstr "Этот счет-фактура будет выставлен покупателю Stripe, уже связанному с этим покупателем Carbon. Чтобы изменить его данные, отредактируйте его в панели Stripe."
-msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
-msgstr "Этот счет-фактура будет выставлен покупателю Stripe, уже связанному с этим покупателем Carbon. Чтобы изменить его данные, отредактируйте его в панели Stripe."
-
msgid "This is a controlled environment, so an authenticator app is required."
msgstr "Это контролируемая среда, поэтому требуется приложение аутентификации."
@@ -16650,6 +16716,9 @@ msgstr "Пользователи и группы, которым разреше
msgid "Users can update this value for themselves"
msgstr "Пользователи могут обновлять это значение для себя"
+msgid "Users on covered domains can sign in only with SAML SSO; magic link, Google, and passkeys are refused."
+msgstr "Пользователи на охватываемых доменах могут входить только с SAML SSO; волшебная ссылка, Google и ключи доступа отклоняются."
+
msgid "Users to Update"
msgstr "Пользователи для обновления"
@@ -16734,6 +16803,9 @@ msgstr "Ошибка проверки"
msgid "Verification failed"
msgstr "Ошибка проверки"
+msgid "Verified"
+msgstr "Проверено"
+
msgid "Verify"
msgstr "Проверить"
@@ -17665,6 +17737,9 @@ msgstr "Ваши ценовые списки для клиентов"
msgid "Your data is accessible and reasonably clean"
msgstr "Ваши данные доступны и находятся в относительно чистом виде"
+msgid "Your DNS provider may auto-append your domain to the record name — if so, enter only the part before it (e.g. _carbon-challenge plus any subdomain)."
+msgstr "Ваш поставщик DNS может автоматически добавить ваш домен к имени записи — если это так, введите только часть перед ней (например, _carbon-challenge плюс любой поддомен)."
+
msgid "Your Email"
msgstr "Ваша электронная почта"
diff --git a/packages/locale/locales/ru/mes.po b/packages/locale/locales/ru/mes.po
index 63ebe844bd..5f861a4ad6 100644
--- a/packages/locale/locales/ru/mes.po
+++ b/packages/locale/locales/ru/mes.po
@@ -280,6 +280,9 @@ msgstr "Использовано"
msgid "Consumed expired"
msgstr "Израсходовано - истек срок"
+msgid "Continue"
+msgstr "Продолжить"
+
#. placeholder {0}: board.unplannedCost.days
msgid "Cost of unplanned maintenance, last {0} days"
msgstr "Себестоимость внепланового техобслуживания за последние {0} дней"
@@ -1269,9 +1272,6 @@ msgstr "Недостача"
msgid "Short pick {itemName}"
msgstr "Короткий отбор {itemName}"
-msgid "Sign in with Email"
-msgstr "Войти по электронной почте"
-
msgid "Sign in with Google"
msgstr "Войти через Google"
diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.po
index 391df5829c..eb12d76263 100644
--- a/packages/locale/locales/tr/erp.po
+++ b/packages/locale/locales/tr/erp.po
@@ -475,9 +475,6 @@ msgstr "Siparişe göre üretim bileşeni, parçaları ana iş emrine birlikte v
msgid "A managed cloud-hosted version of Carbon"
msgstr "Carbon'ın yönetilen bulut barındırılan sürümü"
-msgid "A managed version with all the advanced features"
-msgstr "Tüm gelişmiş özelliklerle yönetilen sürüm"
-
msgid "A managed version with all the advanced features"
msgstr "Tüm gelişmiş özellikleri içeren yönetilen bir sürüm"
@@ -941,9 +938,6 @@ msgstr "Alacak hesapları"
msgid "Accounts receivable for amounts owed by customers"
msgstr "Müşteriler tarafından borçlu olunan tutarlar için alacak hesapları."
-msgid "Accounts referenced by posting defaults or journal history that have no provider mapping yet."
-msgstr "Muhasebeleştirme varsayılanları veya muhasebe fişi geçmişi tarafından referans gösterilen ancak henüz sağlayıcı eşlemesi olmayan hesaplar."
-
msgid "Accumulated Depreciation"
msgstr "Birikmiş amortisman"
@@ -980,6 +974,9 @@ msgstr "Edinme maliyeti"
msgid "Acquisition Date"
msgstr "Satın alma tarihi"
+msgid "ACS URL"
+msgstr "ACS URL'si"
+
msgid "Action"
msgstr "İşlem"
@@ -1058,6 +1055,9 @@ msgstr "Bir yorum ekle..."
msgid "Add a custom pricing row to override quantity, price, shipping, lead time, and tax"
msgstr "Miktarı, fiyatı, nakliyeyi, tedarik süresini ve vergiyi geçersiz kılmak için özel bir fiyatlandırma satırı ekleyin"
+msgid "Add a domain"
+msgstr "Alan adı ekle"
+
msgid "Add a materials section that lists each item on the bill of materials with its quantity."
msgstr "Ürün ağacısındaki her stok kartını miktarı ile listeleyen bir bölüm ekleyin"
@@ -1238,6 +1238,9 @@ msgstr "Tedarikçi Ekle"
msgid "Add the next capability on the same system instead of buying another tool."
msgstr "Aynı sistem üzerinde bir sonraki özelliği ekleyin, başka bir araç satın almak yerine."
+msgid "Add this TXT record at your DNS host, then click Verify. DNS changes can take a few minutes to propagate."
+msgstr "Bu TXT kaydını DNS sağlayıcınıza ekleyin, ardından Doğrula'ya tıklayın. DNS değişiklikleri yaygınlaştırılması birkaç dakika sürebilir."
+
msgid "Add Timecard"
msgstr "Zaman Kartı Ekle"
@@ -1369,9 +1372,6 @@ msgstr "Tüm Konumlar"
msgid "All members of selected groups and selected individuals will be able to approve requests"
msgstr "Seçilen gruplardaki ve bireylerdeki tüm üyeler talepleri onaylayabilecektir"
-msgid "All posting accounts are mapped"
-msgstr "Tüm muhasebeleştirme hesapları eşlendi"
-
msgid "All rows imported — {inserted} inserted, {updated} updated."
msgstr "{inserted} eklendi, {updated} güncellendi — tüm satırlar içe aktarıldı."
@@ -1448,6 +1448,9 @@ msgstr "Bir kanvas üzerinde oluşturduğunuz bir otomasyon: bir tetikleyici, ar
msgid "An engineering change: the affected items whose methods are revised on a draft and released together, superseding the versions they replace."
msgstr "Bir mühendislik değişikliği: yöntemleri taslak üzerinde revize edilen ve birlikte yayınlanan, yerini aldıkları sürümlerin yerine geçen etkilenen öğeler."
+msgid "An Enterprise sign-in method where everyone on a company's registered email domains authenticates through the company's own SAML identity provider instead of a magic link, so IT grants and revokes access centrally."
+msgstr "Bir şirketin kayıtlı e-posta etki alanlarındaki herkesin sihirli bağlantı yerine şirketin kendi SAML kimlik sağlayıcısı aracılığıyla doğrulanması sağlayan bir Kurumsal oturum açma yöntemi; böylece BT merkezi olarak erişim verir ve kaldırır."
+
msgid "An https request Carbon sends to a system of yours when a workflow reaches that step, carrying whatever headers and body you configured."
msgstr "Bir iş akışı bu adıma ulaştığında Carbon'un sisteminize gönderdiği bir https isteği, yapılandırdığınız başlıkları ve gövdeyi taşır."
@@ -1791,6 +1794,9 @@ msgstr "Bu satış siparişi için iş emirleri oluşturmak istediğinizden emin
msgid "Are you sure you want to deactivate {0}?"
msgstr "{0}'yi devre dışı bırakmak istediğinizden emin misiniz?"
+msgid "Are you sure you want to deactivate SAML SSO? Users on your registered domains will no longer be able to sign in through your identity provider. This cannot be undone."
+msgstr "SAML SSO'yu devre dışı bırakmak istediğinizden emin misiniz? Kayıtlı etki alanlarınızdaki kullanıcılar artık kimlik sağlayıcınız aracılığıyla oturum açamayacaklardır. Bu işlem geri alınamaz."
+
#. placeholder {0}: selectedCategory?.name
msgid "Are you sure you want to deactivate the {0} attribute category?"
msgstr "{0} öznitelik kategorisini devre dışı bırakmak istediğinizden emin misiniz?"
@@ -2896,6 +2902,9 @@ msgstr "Yalnızca Carbon · bu müşteri için gerçek hedefleri doldurun. Değe
msgid "Carbon-only · the customer sees this text, locked."
msgstr "Carbon-only · müşteri bu metni görür, kilitli."
+msgid "Carbon's default passwordless sign-in: an emailed one-time link that signs you in when opened, with no password to remember or leak."
+msgstr "Carbon'un varsayılan parolasız oturum açma: e-postayla gönderilen, açıldığında sizi oturum açan ve hatırlanması veya sızması gereken bir parola olmayan tek kullanımlık bir bağlantı."
+
msgid "Carbon's name for a bill of material and bill of process (routing): the components plus the operations that make a part."
msgstr "Carbon'ın ürün ağacı ve operasyon listesi (rota) için adı: bir parçayı yapan bileşenler artı operasyonlar."
@@ -3465,6 +3474,9 @@ msgstr "Dönemdeki her muhasebeleştirilmiş muhasebe fişinin eşit borç ve al
msgid "Conflict reason"
msgstr "Çatışma nedeni"
+msgid "Connect"
+msgstr "Bağlan"
+
msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."
msgstr "Carbon'ı muhasebe, proje yönetimi ve CAD araçlarınızla ve çok daha fazlasıyla bağlayın."
@@ -3483,6 +3495,9 @@ msgstr "Hiçbir koşul eşleşmediğinde çalıştırılacak bir düğüme Aksi
msgid "Connect the outside tools your company already runs on"
msgstr "Şirketinizin zaten kullandığı dış araçları bağlayın"
+msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."
+msgstr "Kimlik sağlayıcınızı, meta veri URL'sini veya ham meta veri XML'sini yapıştırarak bağlayın — ikisinden tam olarak birini yapıştırın."
+
msgid "Connected to"
msgstr "Bağlı"
@@ -3558,6 +3573,9 @@ msgstr "İçerik"
msgid "Context"
msgstr "Bağlam"
+msgid "Continue"
+msgstr "Devam Et"
+
msgid "Contra-asset account for total depreciation of fixed assets"
msgstr "Sabit kıymetlerin toplam amortismanı için karşı hesap"
@@ -4567,6 +4585,9 @@ msgstr "Çalışanları Devre Dışı Bırak"
msgid "Deactivate Process"
msgstr "İş Sürecini Devre Dışı Bırak"
+msgid "Deactivate Single Sign-On"
+msgstr "Tekli Oturum Açmayı Devre Dışı Bırak"
+
msgid "Deactivate Supplier"
msgstr "Tedarikçiyi Devre Dışı Bırak"
@@ -5887,6 +5908,9 @@ msgstr "E-posta"
msgid "Email Address"
msgstr "E-posta Adresi"
+msgid "Email Domains"
+msgstr "E-posta Etki Alanları"
+
msgid "Email notifications are not included in your company's current plan; email preferences will apply if they are enabled."
msgstr "E-posta bildirimleri şirketinizin mevcut planına dahil değildir; e-posta tercihleriniz etkinleştirildiğinde uygulanacaktır."
@@ -7441,6 +7465,9 @@ msgstr "Ev Telefonu"
msgid "Hop {depth}"
msgstr "Atlama {depth}"
+msgid "Host"
+msgstr "Ana bilgisayar"
+
msgid "Host, secure, and back up the platform"
msgstr "Platformu barındırın, güvenli hale getirin ve yedekleyin"
@@ -7600,6 +7627,18 @@ msgstr "İdempotentlik Anahtarı"
msgid "Identifiers"
msgstr "Tanımlayıcılar"
+msgid "Identity Provider"
+msgstr "Kimlik Sağlayıcı"
+
+msgid "Identity provider (IdP)"
+msgstr "Kimlik Sağlayıcı (IdP)"
+
+msgid "IdP Metadata URL"
+msgstr "IdP Meta Veri URL'si"
+
+msgid "IdP Metadata XML"
+msgstr "IdP Meta Veri XML'si"
+
msgid "IDs and descriptions are generated for raw materials."
msgstr "Kimlikler ve açıklamalar hammadde için oluşturulur."
@@ -8509,6 +8548,9 @@ msgstr "Daha az manuel çalışma"
msgid "Less manual work, fewer errors"
msgstr "Daha az manuel çalışma, daha az hata"
+msgid "Let members sign in through your identity provider with SAML."
+msgstr "Üyelerin SAML ile kimlik sağlayıcınız üzerinden oturum açmasını sağlayın."
+
msgid "Let's Build"
msgstr "Üretelim"
@@ -8799,6 +8841,9 @@ msgstr "MACRS Sözleşmesi"
msgid "MACRS Property Class"
msgstr "MACRS Mülk Sınıfı"
+msgid "Magic link"
+msgstr "Sihirli Bağlantı"
+
msgid "Maintain a single part and item master"
msgstr "Tek bir parça ve madde ana kaydını yönetin"
@@ -8877,6 +8922,9 @@ msgstr "Bu belgeyi aktif ve görünür yapar."
msgid "Manage"
msgstr "Yönet"
+msgid "Manage authentication and sign-in requirements for your company."
+msgstr "Şirketiniz için kimlik doğrulama ve oturum açma gereksinimlerini yönetin."
+
msgid "Manage how shelf life is tracked, computed, and enforced across inventory."
msgstr "Envanterdeki raf ömrünün nasıl izlendiğini, hesaplandığını ve uygulandığını yönetin."
@@ -8910,9 +8958,6 @@ msgstr "Üretim"
msgid "Map accounts"
msgstr "Hesapları Eşle"
-msgid "Map Carbon accounts to the provider's chart of accounts. Posted journals push using the mapped provider account code."
-msgstr "Carbon hesaplarını sağlayıcının hesap planı ile eşleştirin. Muhasebeleştirilmiş muhasebe fişleri eşleştirilmiş sağlayıcı hesap kodu kullanılarak iletilir."
-
msgid "Map Extracted Invoice Lines"
msgstr "Çıkarılan Fatura Satırlarını Eşle"
@@ -10216,6 +10261,9 @@ msgstr "Bir tablo değil, büyük defter bakiyesi: iş emri malzemeleri çıktı
msgid "Not certified"
msgstr "Sertifikalı değil"
+msgid "Not configured"
+msgstr "Yapılandırılmadı"
+
msgid "Not enough jobs to cover quantity"
msgstr "Miktarı karşılamak için yeterli iş emri yok"
@@ -10933,6 +10981,9 @@ msgstr "Geçiş Anahtarları"
msgid "Passkeys are disabled"
msgstr "Geçiş Anahtarları Devre Dışı Bırakılmış"
+msgid "Paste the metadata XML if your identity provider does not publish a metadata URL"
+msgstr "Kimlik sağlayıcınız bir meta veri URL'si yayınlamıyorsa meta veri XML'sini yapıştırın"
+
msgid "Path"
msgstr "Yol"
@@ -11612,9 +11663,15 @@ msgstr "Şirketinizi iki faktörlü kimlik doğrulama zorunluluğu gibi gelişmi
msgid "Protects your company's data"
msgstr "Şirketinizin verilerini korur"
+msgid "Prove ownership of each email domain with a DNS TXT record before it can route SAML SSO sign-ins. Add the record at DNS host, then click Verify — only verified domains participate in single sign-on."
+msgstr "Her bir e-posta etki alanının sahipliğini kanıtlayın - SAML SSO oturum açma işlemini yönlendirebilmesi için DNS TXT kaydıyla. Kaydı DNS ana bilgisayarına ekleyin, ardından Doğrula'ya tıklayın — yalnızca doğrulanmış etki alanları çoklu oturum açmada yer alır."
+
msgid "Provide process knowledge and inputs"
msgstr "Süreç bilgisi ve girdileri sağlayın"
+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."
+msgstr "Carbon'u bir SAML uygulaması olarak kaydederken bu URL'leri kimlik sağlayıcınıza (Okta, Entra ID, Google Workspace, vb.) sağlayın."
+
msgid "Provider"
msgstr "Sağlayıcı"
@@ -12485,9 +12542,6 @@ msgstr "Talep Edilen Tarih"
msgid "Require a 6-digit code from an authenticator app when signing in."
msgstr "Oturum açarken kimlik doğrulayıcı uygulamasından 6 haneli kod isteyini."
-msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected."
-msgstr "Bu şirketi açmadan önce bir kimlik doğrulayıcı uygulaması gerekli hale getirin. Diğer şirketler etkilenmez."
-
msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."
msgstr "Bu şirketi açabilmek için doğrulayıcı uygulamayı gerektir. Diğer şirketleri etkilenmez. Her kişinin durumunu görmek için <0>çalışan hesapları sayfasını</0> ziyaret edin."
@@ -12500,6 +12554,9 @@ msgstr "Belirli tutar eşiklerine göre satın alma siparişleri için onay gere
msgid "Require approval for quality documents in your workflow"
msgstr "İş akışınızdaki kalite belgeleri için onay gerektirir"
+msgid "Require SAML SSO"
+msgstr "SAML SSO Gerekli"
+
msgid "Require two-factor authentication"
msgstr "İki faktörlü kimlik doğrulamayı gerektir"
@@ -13041,6 +13098,9 @@ msgstr "Kaydet ve Üzerine Yaz"
msgid "Save applications"
msgstr "Uygulamaları kaydet"
+msgid "Save changes"
+msgstr "Değişiklikleri kaydet"
+
msgid "Save contacts"
msgstr "İlgili Kişileri Kaydet"
@@ -13583,6 +13643,9 @@ msgstr "Hizmet Detayları"
msgid "Service ID"
msgstr "Hizmet Kimliği"
+msgid "Service Provider Details"
+msgstr "Hizmet Sağlayıcı Ayrıntıları"
+
msgid "services"
msgstr "hizmetler"
@@ -13912,9 +13975,6 @@ msgstr "Carbon'a giriş yapın"
msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."
msgstr "Sihirli bağlantı yerine biyometrik kimlik doğrulama ile oturum açın. Geçiş Anahtarları Face ID, Touch ID veya cihaz PIN'iniz tarafından korunur."
-msgid "Sign in with Email"
-msgstr "E-posta ile Giriş Yap"
-
msgid "Sign in with Google"
msgstr "Google ile giriş yap"
@@ -13951,6 +14011,12 @@ msgstr "Oturum açma ayrıca doğrulayıcı uygulamanızdan bir kerelik kod gere
msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."
msgstr "Oturum açma artık kod gerektirmez. Onaylamak için kimlik doğrulayıcı uygulamanızdan mevcut 6 haneli kodu girin."
+msgid "Single Sign-On"
+msgstr "Tekli Oturum Açma"
+
+msgid "Single sign-on (SSO)"
+msgstr "Tekli oturum açma (SSO)"
+
msgid "Sites & locations"
msgstr "Siteler & konumlar"
@@ -14074,6 +14140,9 @@ msgstr "Tedarik türü"
msgid "Sourcing Type"
msgstr "Kaynak Türü"
+msgid "SP Metadata URL"
+msgstr "SP Meta Veri URL'si"
+
msgid "Spare Part Consumption"
msgstr "Yedek Parça Tüketimi"
@@ -14331,15 +14400,6 @@ msgstr "Stripe'ın zaten bu e-postaya sahip bir müşterisi var"
msgid "Stripe Due Date"
msgstr "Stripe Son Tarihi"
-msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."
-msgstr "Stripe faturayı müşteriye e-posta ile gönderir, bu nedenle bir adres gereklidir. Bu, Carbon'daki ilgili kişiye de kaydedilecektir."
-
-msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
-msgstr "Bu Carbon müşterisi için Stripe'da henüz müşteri yok. Muhasebeleştirme, bağlı hesabınızda bir tane oluşturacak."
-
-msgid "Stripe Due Date"
-msgstr "Stripe Son Tarihi"
-
msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."
msgstr "Stripe faturayı müşteriye e-postayla gönderir, bu nedenle bir adres gereklidir. Bu, Carbon'daki ilgili kişiye de kaydedilecek."
@@ -15399,6 +15459,9 @@ msgstr "Parçanın revizyon numarası"
msgid "The sales order line this job was created to supply, tying the job to the customer demand behind it."
msgstr "Bu iş emrinin arzulanacak satış siparişi satırı, iş emrini arkasındaki müşteri talebine bağlayan."
+msgid "The SAML metadata URL published by your identity provider"
+msgstr "Kimlik sağlayıcınız tarafından yayınlanan SAML meta veri URL'si"
+
msgid "The schedule used to spread this asset's cost over its useful life (straight-line, declining balance, units of production)."
msgstr "Bu varlığın maliyetini faydalı ömrüne yaymayla kullanılan çizelge (doğrusal, azalan bakiye, üretim birimleri)."
@@ -15489,6 +15552,9 @@ msgstr "Bu RFQ'yu alan tedarikçiler; her biri kendi fiyatlandırmaları ile yan
msgid "The surface finishes available on your materials"
msgstr "Malzemelerinizde kullanılabilir yüzey bitişleri"
+msgid "The system a company uses to manage its people's logins — Okta, Entra ID, or Google Workspace — which vouches for who someone is when they sign in to Carbon via SSO."
+msgstr "Bir şirketin kişilerinin oturum açışlarını yönetmek için kullandığı sistem — Okta, Entra ID veya Google Workspace — bu sistem SSO aracılığıyla Carbon'a oturum açarken birinin kimliğinin doğru olduğunu doğrular."
+
msgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."
msgstr "Sistem, yapılandırılmış sisteminizde kapsamdaki her kabul testini geçer, verilerinizle; veriler doğrulanır; ve siz onay verirsiniz. Ardından canlı yayına geçin."
@@ -15636,6 +15702,9 @@ msgstr "Bu dosya artık kullanılabilir değil veya bunu indirme izniniz yok."
msgid "This Fiscal Year"
msgstr "Bu Mali Yıl"
+msgid "This has no effect until an email domain is verified below."
+msgstr "Bu, aşağıda bir e-posta etki alanı doğrulanana kadar hiçbir etkisi yoktur."
+
msgid "This information will be used on document headers"
msgstr "Bu bilgiler belge başlıklarında kullanılacaktır"
@@ -15652,9 +15721,6 @@ msgstr "{0} grubuna katılma davetinizin süresi doldu. Yeni bir davet talebinde
msgid "This invoice has no usable due date — choose one for Stripe."
msgstr "Bu fatura, Stripe için kullanılabilir bir son tarih içermiyor — lütfen bir tane seçin."
-msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
-msgstr "Bu fatura, bu Carbon müşterisine zaten bağlı olan Stripe müşterisine faturalandırılacaktır. Ayrıntılarını değiştirmek için Stripe panosunda düzenleyin."
-
msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
msgstr "Bu fatura, zaten bu Carbon müşterisine bağlı olan Stripe müşterisine faturalanacak. Ayrıntılarını değiştirmek için Stripe panosunda düzenleyin."
@@ -16389,9 +16455,6 @@ msgstr "Deftere Geçmemiş Belgeler"
msgid "Unpublish"
msgstr "Yayını kaldır"
-msgid "Unpublish {name}?"
-msgstr "Yayını {name} için kaldır?"
-
msgid "Unpublish {name}?"
msgstr "{name} yayınlaması kaldırılsın mı?"
@@ -16653,6 +16716,9 @@ msgstr "Bu belgeyi yeniden adlandırmaya, değiştirmeye veya yeniden etiketleme
msgid "Users can update this value for themselves"
msgstr "Kullanıcılar bu değeri kendileri için güncelleyebilir"
+msgid "Users on covered domains can sign in only with SAML SSO; magic link, Google, and passkeys are refused."
+msgstr "Kapsanan etki alanlarındaki kullanıcılar yalnızca SAML SSO ile oturum açabilir; sihirli bağlantı, Google ve geçiş anahtarları reddedilir."
+
msgid "Users to Update"
msgstr "Güncellenecek Kullanıcılar"
@@ -16737,6 +16803,9 @@ msgstr "Doğrulama Hatası"
msgid "Verification failed"
msgstr "Doğrulama başarısız"
+msgid "Verified"
+msgstr "Doğrulandı"
+
msgid "Verify"
msgstr "Doğrula"
@@ -17668,6 +17737,9 @@ msgstr "Müşterilerinize sunduğunuz fiyat listeleri"
msgid "Your data is accessible and reasonably clean"
msgstr "Verileriniz erişilebilir ve makul ölçüde temizdir"
+msgid "Your DNS provider may auto-append your domain to the record name — if so, enter only the part before it (e.g. _carbon-challenge plus any subdomain)."
+msgstr "DNS sağlayıcınız kaydın adına etki alanınızı otomatik olarak ekleyebilir — eğer öyleyse, yalnızca önceki kısmı girin (ör. _carbon-challenge artı herhangi bir alt alan adı)."
+
msgid "Your Email"
msgstr "E-posta Adresiniz"
diff --git a/packages/locale/locales/tr/mes.po b/packages/locale/locales/tr/mes.po
index b06a0fd5f2..eda3b3f520 100644
--- a/packages/locale/locales/tr/mes.po
+++ b/packages/locale/locales/tr/mes.po
@@ -280,6 +280,9 @@ msgstr "Tüketildi"
msgid "Consumed expired"
msgstr "Tüketildi süresi doldu"
+msgid "Continue"
+msgstr "Devam Et"
+
#. placeholder {0}: board.unplannedCost.days
msgid "Cost of unplanned maintenance, last {0} days"
msgstr "Planlanmamış bakım maliyeti, son {0} gün"
@@ -1269,9 +1272,6 @@ msgstr "Azalt"
msgid "Short pick {itemName}"
msgstr "Kısmi toplama {itemName}"
-msgid "Sign in with Email"
-msgstr "E-posta ile Giriş Yap"
-
msgid "Sign in with Google"
msgstr "Google ile giriş yap"
diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.po
index 6ae84fd104..8e46b0c570 100644
--- a/packages/locale/locales/zh/erp.po
+++ b/packages/locale/locales/zh/erp.po
@@ -938,9 +938,6 @@ msgstr "应收账款"
msgid "Accounts receivable for amounts owed by customers"
msgstr "客户应付金额的应收账款。"
-msgid "Accounts referenced by posting defaults or journal history that have no provider mapping yet."
-msgstr "由过账默认值或凭证历史引用但还没有供应商映射的账户。"
-
msgid "Accumulated Depreciation"
msgstr "累计折旧"
@@ -977,6 +974,9 @@ msgstr "购置成本"
msgid "Acquisition Date"
msgstr "收购日期"
+msgid "ACS URL"
+msgstr "ACS URL"
+
msgid "Action"
msgstr "操作"
@@ -1055,6 +1055,9 @@ msgstr "添加评论..."
msgid "Add a custom pricing row to override quantity, price, shipping, lead time, and tax"
msgstr "添加自定义定价行以覆盖数量、价格、运费、提前期和税费"
+msgid "Add a domain"
+msgstr "添加一个域"
+
msgid "Add a materials section that lists each item on the bill of materials with its quantity."
msgstr "添加一个列出物料清单上每个物料及其数量的物料部分。"
@@ -1235,6 +1238,9 @@ msgstr "添加供应商"
msgid "Add the next capability on the same system instead of buying another tool."
msgstr "在同一系统上添加下一个功能,而不是购买另一个工具。"
+msgid "Add this TXT record at your DNS host, then click Verify. DNS changes can take a few minutes to propagate."
+msgstr "在您的 DNS 主机上添加此 TXT 记录,然后单击验证。DNS 更改可能需要几分钟才能传播。"
+
msgid "Add Timecard"
msgstr "添加工时卡"
@@ -1442,6 +1448,9 @@ msgstr "您在画布上构建的自动化:一个触发器,然后是检查条
msgid "An engineering change: the affected items whose methods are revised on a draft and released together, superseding the versions they replace."
msgstr "工程变更是指受影响的物料,其方法在草稿上修订后一起下达,以取代之前的版本。"
+msgid "An Enterprise sign-in method where everyone on a company's registered email domains authenticates through the company's own SAML identity provider instead of a magic link, so IT grants and revokes access centrally."
+msgstr "一种企业登录方法,公司注册电子邮件域中的所有人通过公司自己的 SAML 身份提供商进行身份验证,而不是使用魔法链接,因此 IT 可以集中授予和撤销访问权限。"
+
msgid "An https request Carbon sends to a system of yours when a workflow reaches that step, carrying whatever headers and body you configured."
msgstr "当工作流到达该步骤时,Carbon向您的系统发送的HTTPS请求,携带您配置的任何标头和请求体。"
@@ -1785,6 +1794,9 @@ msgstr "确定要为此销售订单创建工单吗?这将为所有尚未有工
msgid "Are you sure you want to deactivate {0}?"
msgstr "你确定要停用 {0} 吗?"
+msgid "Are you sure you want to deactivate SAML SSO? Users on your registered domains will no longer be able to sign in through your identity provider. This cannot be undone."
+msgstr "您确定要停用 SAML SSO 吗?注册域上的用户将无法再通过身份提供者登录。此操作无法撤销。"
+
#. placeholder {0}: selectedCategory?.name
msgid "Are you sure you want to deactivate the {0} attribute category?"
msgstr "您确定要停用 {0} 属性类别吗?"
@@ -2890,6 +2902,9 @@ msgstr "仅限Carbon · 为此客户填入真实目标。他们可以看到这
msgid "Carbon-only · the customer sees this text, locked."
msgstr "仅限Carbon · 客户可以看到此文本,已锁定。"
+msgid "Carbon's default passwordless sign-in: an emailed one-time link that signs you in when opened, with no password to remember or leak."
+msgstr "Carbon 的默认无密码登录:一个通过电子邮件发送的一次性链接,打开时会自动登录您,无需记住或泄露任何密码。"
+
msgid "Carbon's name for a bill of material and bill of process (routing): the components plus the operations that make a part."
msgstr "Carbon对物料清单和工序清单(工艺路线)的称呼:组成零件的物料和工序。"
@@ -3459,6 +3474,9 @@ msgstr "确认该期间每项已过账分录的借方和贷方相等。如果任
msgid "Conflict reason"
msgstr "冲突原因"
+msgid "Connect"
+msgstr "连接"
+
msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."
msgstr "将 Carbon 连接到您的会计、项目管理和 CAD 工具等更多应用。"
@@ -3477,6 +3495,9 @@ msgstr "将 Otherwise 句柄连接到节点,以便在没有条件匹配时运
msgid "Connect the outside tools your company already runs on"
msgstr "连接您的公司已在使用的外部工具"
+msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."
+msgstr "通过粘贴身份提供商的元数据 URL 或原始元数据 XML(两者中恰好一个)来连接您的身份提供商。"
+
msgid "Connected to"
msgstr "连接到"
@@ -3552,6 +3573,9 @@ msgstr "内容"
msgid "Context"
msgstr "上下文"
+msgid "Continue"
+msgstr "继续"
+
msgid "Contra-asset account for total depreciation of fixed assets"
msgstr "固定资产累计折旧对冲资产账户"
@@ -4561,6 +4585,9 @@ msgstr "停用员工"
msgid "Deactivate Process"
msgstr "停用流程"
+msgid "Deactivate Single Sign-On"
+msgstr "停用单点登录"
+
msgid "Deactivate Supplier"
msgstr "停用供应商"
@@ -5881,6 +5908,9 @@ msgstr "电子邮件"
msgid "Email Address"
msgstr "电子邮件地址"
+msgid "Email Domains"
+msgstr "电子邮件域"
+
msgid "Email notifications are not included in your company's current plan; email preferences will apply if they are enabled."
msgstr "电子邮件通知不包含在贵公司的当前计划中;如果启用电子邮件偏好设置,这些偏好将适用。"
@@ -6255,9 +6285,6 @@ msgstr "豁免证书"
msgid "Exemption Reason"
msgstr "豁免原因"
-msgid "Existing mappings. Pick a different provider account to re-map."
-msgstr "现有映射。选择不同的提供商账户进行重新映射。"
-
msgid "Existing mappings. Pick a different provider option to re-map."
msgstr "现有映射。选择不同的提供商选项进行重新映射。"
@@ -7438,6 +7465,9 @@ msgstr "家庭电话"
msgid "Hop {depth}"
msgstr "跳转 {depth}"
+msgid "Host"
+msgstr "主机"
+
msgid "Host, secure, and back up the platform"
msgstr "托管、保护和备份平台"
@@ -7597,6 +7627,18 @@ msgstr "幂等键"
msgid "Identifiers"
msgstr "标识符"
+msgid "Identity Provider"
+msgstr "身份提供商"
+
+msgid "Identity provider (IdP)"
+msgstr "身份提供商 (IdP)"
+
+msgid "IdP Metadata URL"
+msgstr "IdP 元数据 URL"
+
+msgid "IdP Metadata XML"
+msgstr "IdP 元数据 XML"
+
msgid "IDs and descriptions are generated for raw materials."
msgstr "ID 和描述是为原材料生成的。"
@@ -8506,6 +8548,9 @@ msgstr "更少的手动工作"
msgid "Less manual work, fewer errors"
msgstr "更少的手动工作,更少的错误"
+msgid "Let members sign in through your identity provider with SAML."
+msgstr "允许成员通过您的身份提供商使用 SAML 登录。"
+
msgid "Let's Build"
msgstr "让我们构建"
@@ -8796,6 +8841,9 @@ msgstr "MACRS公约"
msgid "MACRS Property Class"
msgstr "MACRS资产类别"
+msgid "Magic link"
+msgstr "魔法链接"
+
msgid "Maintain a single part and item master"
msgstr "维护单一零件和物料主数据"
@@ -8874,6 +8922,9 @@ msgstr "启用此文件并使其可见。"
msgid "Manage"
msgstr "管理"
+msgid "Manage authentication and sign-in requirements for your company."
+msgstr "管理您公司的身份验证和登录要求。"
+
msgid "Manage how shelf life is tracked, computed, and enforced across inventory."
msgstr "管理保质期在库存管理中的跟踪、计算和执行方式。"
@@ -8907,9 +8958,6 @@ msgstr "制造"
msgid "Map accounts"
msgstr "映射科目"
-msgid "Map Carbon accounts to the provider's chart of accounts. Posted journals push using the mapped provider account code."
-msgstr "将Carbon账户映射到提供商的会计科目表。已过账凭证使用映射的提供商账户代码进行推送。"
-
msgid "Map Extracted Invoice Lines"
msgstr "映射提取的发票行项目"
@@ -10213,6 +10261,9 @@ msgstr "不是表,而是总账余额:成本随着工单物料的领料而累
msgid "Not certified"
msgstr "未认证"
+msgid "Not configured"
+msgstr "未配置"
+
msgid "Not enough jobs to cover quantity"
msgstr "工单数量不足以覆盖所需数量"
@@ -10930,6 +10981,9 @@ msgstr "通行密钥"
msgid "Passkeys are disabled"
msgstr "通行密钥已禁用"
+msgid "Paste the metadata XML if your identity provider does not publish a metadata URL"
+msgstr "如果您的身份提供商未发布元数据 URL,请粘贴元数据 XML"
+
msgid "Path"
msgstr "路径"
@@ -11609,9 +11663,15 @@ msgstr "通过双因素认证强制执行等高级安全控制来保护您的公
msgid "Protects your company's data"
msgstr "保护您公司的数据"
+msgid "Prove ownership of each email domain with a DNS TXT record before it can route SAML SSO sign-ins. Add the record at DNS host, then click Verify — only verified domains participate in single sign-on."
+msgstr "在路由 SAML SSO 登录前,通过 DNS TXT 记录证明每个电子邮件域的所有权。在 DNS 主机上添加记录,然后单击验证 — 仅经过验证的域参与单点登录。"
+
msgid "Provide process knowledge and inputs"
msgstr "提供流程知识和输入"
+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."
+msgstr "在将 Carbon 注册为 SAML 应用程序时,将这些 URL 提供给您的身份提供商(Okta、Entra ID、Google Workspace 等)。"
+
msgid "Provider"
msgstr "提供商"
@@ -12482,9 +12542,6 @@ msgstr "要求日期"
msgid "Require a 6-digit code from an authenticator app when signing in."
msgstr "登录时需要来自身份验证器应用的 6 位数字代码。"
-msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected."
-msgstr "需要身份验证器应用才能打开此公司。其他公司不受影响。"
-
msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."
msgstr "需要身份验证应用程序才能打开此公司。他们的其他公司不受影响。访问<0>员工账户页面</0>以查看每个人的状态。"
@@ -12497,6 +12554,9 @@ msgstr "根据金额阈值对采购订单需要审批"
msgid "Require approval for quality documents in your workflow"
msgstr "工作流中的质量文档需要审批"
+msgid "Require SAML SSO"
+msgstr "需要 SAML SSO"
+
msgid "Require two-factor authentication"
msgstr "需要双因素认证"
@@ -13038,6 +13098,9 @@ msgstr "保存并覆盖"
msgid "Save applications"
msgstr "保存应用"
+msgid "Save changes"
+msgstr "保存更改"
+
msgid "Save contacts"
msgstr "保存联系人"
@@ -13580,6 +13643,9 @@ msgstr "服务详情"
msgid "Service ID"
msgstr "服务ID"
+msgid "Service Provider Details"
+msgstr "服务提供商详情"
+
msgid "services"
msgstr "服务"
@@ -13909,9 +13975,6 @@ msgstr "登录 Carbon"
msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."
msgstr "使用生物识别而不是魔法链接登录。通行密钥由 Face ID、Touch ID 或您的设备 PIN 保护。"
-msgid "Sign in with Email"
-msgstr "用邮箱登录"
-
msgid "Sign in with Google"
msgstr "用 Google 登录"
@@ -13948,6 +14011,12 @@ msgstr "登录还需要来自您的身份验证器应用的一次性代码"
msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."
msgstr "登录将不再需要代码。输入您的身份验证器应用中的当前 6 位数字代码以确认。"
+msgid "Single Sign-On"
+msgstr "单点登录"
+
+msgid "Single sign-on (SSO)"
+msgstr "单点登录 (SSO)"
+
msgid "Sites & locations"
msgstr "站点和位置"
@@ -14071,6 +14140,9 @@ msgstr "采购类型"
msgid "Sourcing Type"
msgstr "采购类型"
+msgid "SP Metadata URL"
+msgstr "SP 元数据 URL"
+
msgid "Spare Part Consumption"
msgstr "备件消耗"
@@ -14325,20 +14397,11 @@ msgstr "Stripe"
msgid "Stripe already has a customer with this email"
msgstr "Stripe 已拥有此电子邮件的客户"
-msgid "Stripe Due Date"
-msgstr "Stripe 到期日"
-
-msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."
-msgstr "Stripe 会向客户发送发票电子邮件,因此需要地址。这也将保存到 Carbon 中的联系人。"
-
-msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
-msgstr "Stripe还没有该Carbon客户对应的客户。过账将在您的连接账户上创建一个。"
-
msgid "Stripe Due Date"
msgstr "Stripe 到期日期"
msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."
-msgstr "Stripe 将发票发送给客户,因此需要地址。这也将保存到 Carbon 中的联系人。"
+msgstr "Stripe 将发票通过电子邮件发送给客户,因此需要地址。这也将保存到 Carbon 中的联系人。"
msgid "Stripe has no customer for this Carbon customer yet. Posting will create one on your connected account."
msgstr "Stripe还没有该Carbon客户对应的客户。过账将在您的连接账户上创建一个。"
@@ -15396,6 +15459,9 @@ msgstr "零件的修订版号"
msgid "The sales order line this job was created to supply, tying the job to the customer demand behind it."
msgstr "为供应而创建此作业的销售订单行,将作业与其后的客户需求联系起来。"
+msgid "The SAML metadata URL published by your identity provider"
+msgstr "您的身份提供商发布的 SAML 元数据 URL"
+
msgid "The schedule used to spread this asset's cost over its useful life (straight-line, declining balance, units of production)."
msgstr "用于在其使用年限内分摊此资产成本的排程(直线法、余额递减法、生产单位法)。"
@@ -15486,6 +15552,9 @@ msgstr "接收此RFQ的供应商;每个都在RFQ上获得自己的行,他们
msgid "The surface finishes available on your materials"
msgstr "你的原材料可用的表面处理工艺"
+msgid "The system a company uses to manage its people's logins — Okta, Entra ID, or Google Workspace — which vouches for who someone is when they sign in to Carbon via SSO."
+msgstr "公司用来管理员工登录的系统——Okta、Entra ID 或 Google Workspace——当员工通过 SSO 登录 Carbon 时,它会证明身份。"
+
msgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."
msgstr "系统在您配置的系统中通过了每个范围内的验收测试,使用您的数据;数据已验证;您签署确认。然后上线。"
@@ -15633,6 +15702,9 @@ msgstr "此文件不再可用,或您没有权限下载它。"
msgid "This Fiscal Year"
msgstr "此会计年度"
+msgid "This has no effect until an email domain is verified below."
+msgstr "在下面验证电子邮件域之前,这不会产生任何影响。"
+
msgid "This information will be used on document headers"
msgstr "此信息将用于文件标题"
@@ -15649,9 +15721,6 @@ msgstr "加入 {0} 的邀请已过期。您可以请求将新邀请发送到您
msgid "This invoice has no usable due date — choose one for Stripe."
msgstr "此发票没有可用的到期日——为Stripe选择一个。"
-msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
-msgstr "此发票将为已与此Carbon客户关联的Stripe客户计费。要更改其详细信息,请在Stripe仪表板中编辑。"
-
msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."
msgstr "此发票将计费给已链接到此 Carbon 客户的 Stripe 客户。要更改其详细信息,请在 Stripe 仪表板中编辑它。"
@@ -15792,9 +15861,6 @@ msgstr "无法打开此版本"
msgid "This version is published"
msgstr "这个版本已发布"
-msgid "This version is published. Create a new version to edit."
-msgstr "这个版本已发布。创建新版本进行编辑。"
-
msgid "This version is published. Create a new version to edit."
msgstr "此版本已发布。创建新版本进行编辑。"
@@ -16650,6 +16716,9 @@ msgstr "允许用户和组重命名、替换或重新标记此文件;上传者
msgid "Users can update this value for themselves"
msgstr "用户可以自行更新此值"
+msgid "Users on covered domains can sign in only with SAML SSO; magic link, Google, and passkeys are refused."
+msgstr "覆盖域上的用户只能使用 SAML SSO 登录;magic link、Google 和通行密钥被拒绝。"
+
msgid "Users to Update"
msgstr "要更新的用户"
@@ -16734,6 +16803,9 @@ msgstr "验证错误"
msgid "Verification failed"
msgstr "验证失败"
+msgid "Verified"
+msgstr "已验证"
+
msgid "Verify"
msgstr "验证"
@@ -17599,7 +17671,11 @@ msgid ""
" {0} than the\n"
" ordered quantity of {1}. What would you like\n"
" to do with the extra parts?"
-msgstr "您完成了 {leftoverQuantity} 个以上 \n {0},比 \n 订购数量 {1} 多。您想 \n 用多余的零件怎么办?"
+msgstr ""
+"您完成了 {leftoverQuantity} 个以上 \n"
+" {0},比 \n"
+" 订购数量 {1} 多。您想 \n"
+" 用多余的零件怎么办?"
msgid "You do not have permission to edit workflows"
msgstr "您没有权限编辑工作流"
@@ -17665,6 +17741,9 @@ msgstr "您面向客户的价格表"
msgid "Your data is accessible and reasonably clean"
msgstr "您的数据可访问且相对干净"
+msgid "Your DNS provider may auto-append your domain to the record name — if so, enter only the part before it (e.g. _carbon-challenge plus any subdomain)."
+msgstr "您的 DNS 提供商可能会自动将您的域追加到记录名称中 — 如果是这样,只需输入它之前的部分(例如 _carbon-challenge 加上任何子域)。"
+
msgid "Your Email"
msgstr "你的电子邮件"
diff --git a/packages/locale/locales/zh/mes.po b/packages/locale/locales/zh/mes.po
index 17434f0933..41201fe219 100644
--- a/packages/locale/locales/zh/mes.po
+++ b/packages/locale/locales/zh/mes.po
@@ -280,6 +280,9 @@ msgstr "已消耗"
msgid "Consumed expired"
msgstr "已消耗已过期"
+msgid "Continue"
+msgstr "继续"
+
#. placeholder {0}: board.unplannedCost.days
msgid "Cost of unplanned maintenance, last {0} days"
msgstr "过去 {0} 天的计划外维护成本"
@@ -1269,9 +1272,6 @@ msgstr "缺货"
msgid "Short pick {itemName}"
msgstr "短缺拣货 {itemName}"
-msgid "Sign in with Email"
-msgstr "使用邮箱登录"
-
msgid "Sign in with Google"
msgstr "使用 Google 登录"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9d6110af35..a14d9d0929 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -2258,6 +2258,9 @@ importers:
dompurify:
specifier: 'catalog:'
version: 3.4.0
+ jose:
+ specifier: 'catalog:'
+ version: 6.0.11
kysely:
specifier: 'catalog:'
version: 0.28.15
@@ -2315,7 +2318,7 @@ importers:
version: 5.8.3
vitest:
specifier: 'catalog:'
packages/env:
dependencies: