Restart-when: closed #3002 (fold into that stable-line migration batch), or npm view @better-auth/sso version moves off the pinned 1.7.0-rc.2
Found while implementing #8193 (PR #8221), verifying the stale version attestation in auth-manager.ts. Observation-class: nothing is broken today, the current bridge works. Filed unassigned, no pm:queue, for the record. Measured, not inferred.
The stale claim
packages/plugins/plugin-auth/src/auth-manager.ts carried this next to the sso() plugin registration:
unlike `oauthProvider`, @better-auth/sso hardcodes its `ssoProvider`
model and accepts NO `schema` option (verified against 1.6.20 — no
mergeSchema, runtime never reads options.schema). Its table mapping to
`sys_sso_provider` must therefore be resolved by the better-auth adapter
/ a global model map, not per-plugin here (see AUTH_SSO_PROVIDER_SCHEMA).
That was true of 1.6.20. It is not true of the pinned @better-auth/sso@1.7.0-rc.2:
SSOOptions declares a schema member (dist/index-D1yk91me.d.mts): schema.ssoProvider.{ modelName, fields, additionalFields }, where fields covers issuer, oidcConfig, samlConfig, userId, providerId, organizationId, domain, domainVerified.- The runtime honours it (
dist/index.mjs, the plugin's own schema: block): modelName: options?.modelName ?? options?.schema?.ssoProvider?.modelName ?? "ssoProvider", and every field resolves fieldName: options?.fields?.X ?? options?.schema?.ssoProvider?.fields?.X ?? "X".
PR #8221 corrects the comment to record what was actually re-measured, and deliberately leaves the bridge itself alone.
Why this might matter
The ssoProvider to sys_sso_provider mapping is currently done at the adapter / global-model-map layer (AUTH_MODEL_TO_PROTOCOL, AUTH_SSO_PROVIDER_SCHEMA) precisely because the plugin was believed to offer no other way. With schema.ssoProvider.modelName plus a per-field fieldName map now available upstream, that mapping could plausibly be expressed as a plugin option instead — closer to how oauthProvider is handled, and one fewer schema-less special case for the adapter to carry.
Why it is NOT being changed here
So this is recorded rather than acted on. Whether it is worth doing at all is a triage call — the current bridge may be preferable for reasons beyond this plugin.
Generalizable lesson
The comment was a version-stamped attestation that outlived its version, and the bump that invalidated it also shipped the total OIDC-registration breakage in #8193. Both were the same root cause: a dependency's surface moved and no gate noticed. Anywhere a comment says "verified against X", the pinned version drifting past X should be treated as an unverified claim, not a stale note.
Backlink: found during #8193.
Generated by Claude Code
Restart-when: closed #3002 (fold into that stable-line migration batch), or npm view @better-auth/sso version moves off the pinned 1.7.0-rc.2
Found while implementing #8193 (PR #8221), verifying the stale version attestation in
auth-manager.ts. Observation-class: nothing is broken today, the current bridge works. Filed unassigned, nopm:queue, for the record. Measured, not inferred.The stale claim
packages/plugins/plugin-auth/src/auth-manager.tscarried this next to thesso()plugin registration:That was true of 1.6.20. It is not true of the pinned
@better-auth/sso@1.7.0-rc.2:SSOOptionsdeclares aschemamember (dist/index-D1yk91me.d.mts):schema.ssoProvider.{ modelName, fields, additionalFields }, wherefieldscoversissuer,oidcConfig,samlConfig,userId,providerId,organizationId,domain,domainVerified.dist/index.mjs, the plugin's ownschema:block):modelName: options?.modelName ?? options?.schema?.ssoProvider?.modelName ?? "ssoProvider", and every field resolvesfieldName: options?.fields?.X ?? options?.schema?.ssoProvider?.fields?.X ?? "X".PR #8221 corrects the comment to record what was actually re-measured, and deliberately leaves the bridge itself alone.
Why this might matter
The
ssoProvidertosys_sso_providermapping is currently done at the adapter / global-model-map layer (AUTH_MODEL_TO_PROTOCOL,AUTH_SSO_PROVIDER_SCHEMA) precisely because the plugin was believed to offer no other way. Withschema.ssoProvider.modelNameplus a per-fieldfieldNamemap now available upstream, that mapping could plausibly be expressed as a plugin option instead — closer to howoauthProvideris handled, and one fewer schema-less special case for the adapter to carry.Why it is NOT being changed here
plugin-auth/src/objectql-adapter.ts) has in-flight work from [security]sys_sso_provider.oidc_configcarries the OIDCclientSecretin a cleartext JSON textarea, by its own field description #8009.objectql-adapter.test.tscoversssoProvidertosys_sso_provider).So this is recorded rather than acted on. Whether it is worth doing at all is a triage call — the current bridge may be preferable for reasons beyond this plugin.
Generalizable lesson
The comment was a version-stamped attestation that outlived its version, and the bump that invalidated it also shipped the total OIDC-registration breakage in #8193. Both were the same root cause: a dependency's surface moved and no gate noticed. Anywhere a comment says "verified against
X", the pinned version drifting pastXshould be treated as an unverified claim, not a stale note.Backlink: found during #8193.
Generated by Claude Code