chore(deps)!: better-auth 1.7.0-rc.2 + the production-dependency batch (#3517) - #3632
Merged
Merged
Conversation
#3517) Takes over dependabot #3517 (rebased onto current main, where js-yaml/tar/next already moved) and carries the better-auth family from 1.7.0-rc.1 to 1.7.0-rc.2. rc.2 restructures account identity, which is a breaking change for this repo: `account.accountId` is now `account.providerAccountId`, `account.issuer` is required, and every lookup keys on (issuer, providerAccountId). - AUTH_ACCOUNT_CONFIG maps `providerAccountId` onto the existing `account_id` column and adds `issuer`; `sys_account` gains the column plus the unique (issuer, account_id) index better-auth declares on its own table. - internalAdapter.createAccount() now supplies `issuer` + `providerAccountId`; credential accounts carry better-auth's own `local:credential`. - /unlink-account narrowed to `{ accountId }` = the account ROW id, so the sys_account action and the client SDK follow. - New boot-time backfill stamps `issuer` on pre-1.7 rows — `local:credential` for passwords, `local:oauth:<provider>` for configured social providers, the registered IdP's `iss` from sys_sso_provider for federated ones. What it cannot derive it reports rather than guesses, because a wrong issuer is indistinguishable from a missing one at sign-in. SecondaryStorage also gained two required methods; both are now implemented over the kernel cache service: `getAndDelete` (single-use verification values) and `increment` (fixed-window rate-limit counter — secondary-storage rate limiting throws at boot without it). @better-auth/scim stays at 1.7.0-rc.1: rc.2 replaces the plugin wholesale (code-defined connections; six new models; no generate-token endpoint), which is an ADR-0071 feature migration rather than a version bump. Its peer range accepts rc.2 core and it still carries the GHSA-j8v8-g9cx-5qf4 fix. Verified: full suite (132 turbo tasks) green, eslint clean, OSV-Scanner clean on the regenerated lockfile, and a real showcase boot proves better-auth writes `issuer` on sign-up, that sign-in resolves the account, and that the backfill stamps a legacy row through the real ObjectQL engine. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WmLE2YnDZKh1jXy5KFFE3e
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckThis PR changes 8 package(s): 29 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
marked this pull request as ready for review
July 27, 2026 11:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces dependabot #3517 (its base is ~40 commits stale, and its three red checks are all fixed here) and additionally carries the better-auth family from
1.7.0-rc.1to1.7.0-rc.2.Why #3517 was red
docker.ioi/o timeout pullingnode:22-slimThe dependency batch
@oclif/core4.13.0,@hono/node-server2.0.12,hono4.12.32,tar7.5.22,jose6.2.4,pinyin-pro3.28.2, plus the private docs app's fumadocs 16.12.1 / next 16.2.12 / react 19.2.8 / lucide-react 1.27.0.js-yamlwas already at 5.2.2 on main.BREAKING — better-auth 1.7.0-rc.2 account identity
rc.2 renames
account.accountIdtoaccount.providerAccountId, adds a requiredaccount.issuer, and resolves every account by(issuer, providerAccountId). An unmapped or unstamped issuer is not a type error — it is a silent "no such account" on every sign-in.AUTH_ACCOUNT_CONFIGmapsproviderAccountIdonto the existingaccount_idcolumn (same value, renamed upstream — no data moves) and addsissuer.sys_accountgains theissuercolumn, plus the unique(issuer, account_id)index better-auth declares on its own table. The column is deliberately nullable: a NOT NULL column cannot be added to a table that already holds rows, and schema sync runs before the backfill.internalAdapter.createAccount()now passesissuer+providerAccountId; credential accounts carry better-auth's ownlocal:credential./unlink-accountnarrowed to{ accountId }, whereaccountIdis the account row id — thesys_accountrow action andclient.auth.accounts.unlink()follow, andaccounts.list()now returnsissuer+providerAccountId.Upgrading an existing deployment
Rows written before 1.7 have no issuer and are invisible to sign-in, so the auth plugin runs an idempotent boot-time backfill (
backfillAccountIssuer, also exported for hosts that migrate on their own schedule). It stamps what it can derive:local:credentiallocal:oauth:<providerId>issfromsys_sso_providerAccounts from a federated IdP that is no longer registered cannot be derived. They are logged with provider id and row count rather than guessed — a wrong issuer is indistinguishable from a missing one at sign-in, and it also occupies the unique slot the correct row needs. Those users sign in again through that provider once the row is stamped with the IdP's issuer or removed so a fresh login re-links it.
Also required by 1.7
SecondaryStoragegained two mandatory methods, both now implemented over the kernel cache service:getAndDelete(single-use verification values) andincrement(fixed-window rate-limit counter —rateLimit.storage: 'secondary-storage'throws at boot without it). Neither cache primitive is atomic; each carries a comment stating the exact race it leaves open and that an adapter with GETDEL/INCR closes both.@better-auth/scim stays at 1.7.0-rc.1
rc.2 replaces the SCIM plugin wholesale: code-defined connections + static credentials instead of runtime-generated tokens, the
scimProvidermodel andgenerate-tokenendpoint gone, six new models (scimUser,scimGroup,scimGroupMember,scimSubject,scimConnectionBinding,scimIdentityTombstone). Adopting it means new platform objects, retiringsys_scim_provider, and a new way for a tenant to register a connection — an ADR-0071 feature migration, not a version bump. rc.1's peer range accepts rc.2 core and it still carries the GHSA-j8v8-g9cx-5qf4 fix. Flagged inpnpm-workspace.yamlso nobody "aligns" it by reflex.Verification
pnpm test— 132/132 turbo tasks green;pnpm buildgreen;eslintclean;tsc --noEmitclean.check-override-consistencyandcheck-changeset-fixedpass.issueronsys_account, sign-in resolves the account, and the backfill stamps a legacy issuer-less row through the real ObjectQL engine. The existing OIDC authorization-code dogfood flow (authorize → code → token) passes against rc.2.Generated by Claude Code