Repository navigation
[Chore] Patch Better Auth while preserving sign-in and account linking - #3636
Merged
mrubens merged 3 commits intoOct 31, 2026
Merged
Conversation
Contributor
|
No new code issues found. Reviewed the explicit-link state marker, callback-path handling, Microsoft profile validation, and setup provider mapping against Better Auth 1.7.12. CI lint, type checks, and app build passed; tests were still running when checked. See session Reviewed 3300494 |
…d use callbackPath
roomote-roomote
Bot
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
October 31, 2026 04:23
This was referenced Oct 31, 2026
Merged
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.
Related issue
Addresses all six Better Auth Dependabot alerts: #310, #311, #312, #313, #314, and #315: one critical, two high, three low. No alerts were dismissed. They remain open on the default branch until merge and GitHub dependency rescan; the proposed graph contains no vulnerable targeted resolutions.
Why this PR exists
Patch the cohesive authentication bundle while preserving deployed provider callbacks, existing linked identities, sign-in and explicit account linking. The authentication attempt documented in PR #3628 identified real 1.7 migration requirements; this PR implements those requirements. It does not include the parser, Hono, or broad schema/dependency remediation in the other open PRs.
What changed
/api/auth/oauth2/callback/:idURLs for authorization and code exchange, resolving the host per request; internally dispatch GET and form POST callbacks to core.microsoft-entra-idprovider ID andsubaccount identity. Retain GUID/common/organizations/consumers tenants, OIDC userinfo name/email/preferred-username behavior and offline access. Explicitly verify the ID token with upstream signature, issuer, audience, expiry and tenant checks, and bind its nonce and userinfo subject to the flow.^4.5.0(resolution 4.6.7). Keeping the former override resolved 4.4.3 and failed actual auth initialization withz.validate is not a function. The workspace Zod 3 pin and unrelated schema work remain untouched. Lockfile generated by pnpm, retaining compatible existing transitive resolutions rather than broadly refreshing dependencies.No intended user-facing workflow or database-schema change. Upstream 1.7.7 security notes describe purpose-separated OAuth/Magic Link state and PostgreSQL rate-limit fixes; the changelog covers the migration and later compatibility fixes. Roll out participating auth servers together and restart sign-ins/account-linking flows begun before the upgrade; existing database sessions are retained.
How it was tested
minimumReleaseAge: 10080and all exclusions are byte-for-byte unchanged. Every installed release-family package has a single 1.7.12 resolution, outside the six advisory ranges.Screenshots
Sign-in form rendering only:
Protected settings after development session seeding, not an OAuth login:
Checklist
[Fix],[Feat],[Improve],[Refactor],[Docs], or[Chore]followed by a user-facing descriptionpnpm lintandpnpm check-typespass locallypnpm changeset