You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(plugin-auth): remove the inert AUTH_SSO_PROVIDER_SCHEMA export (#13413)
AUTH_SSO_PROVIDER_SCHEMA was a publicly exported ssoProvider column
mapping with zero code consumers -- four repo-wide hits: its own
declaration, two frozen CHANGELOG lines and one comment, measured with
a positive control on a live sibling symbol in the same file. Unlike
the scim sibling (#11777), it was not inert by construction:
@better-auth/sso@1.7.1 accepts SSOOptions.schema.ssoProvider and the
runtime honours it -- the mapping was unused BY CHOICE (#10074 ruling
A: the bridge stays at the adapter layer).
Removed under ADR-0049 enforce-or-remove: it was a second source of
truth for column names owned by the adapter layer
(AUTH_MODEL_TO_PROTOCOL + mechanical camelCase-to-snake_case in
objectql-adapter.ts) over the sys_sso_provider platform object, pinned
by the sso/scim parity block. A NOTE in its place keeps the
domainVerified / ADR-0024 (2) knowledge and records that the sso()
schema option exists and is deliberately unused, so the absence reads
as a choice rather than a limitation. The one comment in
auth-manager.ts that pointed at the constant is retargeted to that
NOTE (surface amendment declared on the card before editing).
Claude-Session: https://claude.ai/code/session_012WkdHQwHr2KQmaX7P1BHzi
Co-authored-by: Claude <noreply@anthropic.com>
**BREAKING (public export removed):**`AUTH_SSO_PROVIDER_SCHEMA` no longer exists. It was an `ssoProvider` column mapping exported from `@objectstack/plugin-auth` (via `export * from './auth-schema-config.js'`) that nothing ever read — four repo-wide hits: its own declaration, two frozen CHANGELOG lines and one comment, measured against a positive control on a live sibling symbol in the same file, and corroborated by an org-wide code search that returned only this repo's own two files.
6
+
7
+
Unlike its scim sibling (removed the same way), this one was not inert by construction: `@better-auth/sso@1.7.1` genuinely accepts a schema option (`SSOOptions.schema.ssoProvider.{modelName,fields,additionalFields}`, honoured at runtime), and the mapping was still never handed to it — unused by choice (#10074, ruling A: the bridge stays at the adapter layer). Removed under ADR-0049 enforce-or-remove because it was a **second source of truth** for the same column names. The load-bearing one is the adapter layer — `AUTH_MODEL_TO_PROTOCOL` plus the mechanical camelCase-to-snake_case field resolution in `objectql-adapter.ts`, over the `sys_sso_provider` platform object that declares the columns — pinned by the dedicated sso/scim block in `better-auth-schema-parity.test.ts`. A dead copy is worse than none: nothing fails when it drifts from the live names, and the next reader cannot tell which of the two is authoritative.
8
+
9
+
A NOTE in its place keeps what outlives the constant: the `domainVerified` / ADR-0024 ② knowledge (the eighth field domain verification adds, its `domain_verified` column, and that the one-time `domainVerificationToken` is not a provider column), and the fact that the `sso()` schema option exists and is deliberately unused — so the absence reads as a choice, not as "sso accepts no schema option" (the stale claim #8224 swept).
10
+
11
+
Behaviour is unchanged. No SSO column name, platform object, adapter mapping or wire shape moves.
12
+
13
+
Breaking ships as `minor` per the launch-window convention (`scripts/check-changeset-no-major.mjs`).
14
+
15
+
<!-- adr-0087: not-required (no-migration-prescription) A dead public constant is deleted; nothing consumed it in this repo (measured on origin/main at 090f2302e with a positive control on a live symbol in the same file) or anywhere in the org (code search returned only this repo's own declaration and a comment), so no caller has code to rewrite. It is not a metadata surface: no Zod schema, no packages/spec declaration, no authorable key and no stored representation, so objectstack migrate meta has nothing to visit and there is no tombstone to mint. The column names it duplicated are unchanged and keep their real declaration on the sys_sso_provider platform object under the adapter's mechanical field rule; an external importer, if one exists, is told by the compiler at the import line, which is more precise than a ledger entry. Nothing to migrate, so no migration is prescribed. -->
0 commit comments