fix(deps): update dependency better-auth to v1.6.9#284
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
fix(deps): update dependency better-auth to v1.6.9#284renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #284 +/- ##
=======================================
Coverage 54.06% 54.06%
=======================================
Files 128 128
Lines 4056 4056
Branches 828 828
=======================================
Hits 2193 2193
Misses 1860 1860
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
domus-cron | b1b93e2 | Commit Preview URL Branch Preview URL |
Apr 29 2026, 11:14 AM |
959e4a4 to
7b221bc
Compare
7b221bc to
b1b93e2
Compare
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.
This PR contains the following updates:
1.6.5→1.6.9Release Notes
better-auth/better-auth (better-auth)
v1.6.9Compare Source
Patch Changes
815ecf6]:v1.6.8Compare Source
Patch Changes
#9253
856ab24Thanks @baptisteArno! - fix(organization): allow passing id throughbeforeCreateTeamandbeforeCreateInvitationMirrors #4765 for teams and invitations:
adapter.createTeamandadapter.createInvitationnow passforceAllowId: true, so ids returned from the respective hooks survive the DB insert.#9331
9aa8e63Thanks @gustavovalverde! - fix(oauth): supportmapProfileToUserfallback for providers that may omit emailSocial sign-in with OAuth providers that may return no email address (Discord phone-only accounts, Apple subsequent sign-ins, GitHub private emails, Facebook, LinkedIn, and Microsoft Entra ID managed users) can now be unblocked by synthesizing an email inside
mapProfileToUser. Rejection logger messages now point at this workaround and at the new "Handling Providers Without Email" docs section.Provider profile types now reflect where
emailcan benullor absent:DiscordProfile.emailisstring | nulland optional (absent when theemailscope is not granted)AppleProfile.emailis optionalGithubProfile.emailisstring | nullFacebookProfile.emailis optionalFacebookProfile.email_verifiedis optional (Meta's Graph API does not include this field)LinkedInProfile.emailis optionalLinkedInProfile.email_verifiedis optionalMicrosoftEntraIDProfile.emailis optionalTypeScript consumers who previously dereferenced
profile.emaildirectly insidemapProfileToUserwill see a compile error that matches the runtime reality; use a nullish-coalescing fallback (profile.email ?? ...) or null-check the field.Sign-in still rejects with
error=email_not_found(social callback) orerror=email_is_missing(Generic OAuth plugin) when neither the provider normapProfileToUserproduces an email. First-class support for users without an email, keyed on(providerId, accountId)per OpenID Connect Core §5.7, is tracked in #9124.Updated dependencies [
9aa8e63]:v1.6.7Compare Source
Patch Changes
#9211
307196aThanks @stewartjarod! - PreserveSet-Cookieheaders accumulated onctx.responseHeaderswhen an endpoint throwsAPIError. Cookie side-effects fromdeleteSessionCookie(and anyctx.setCookie/ctx.setHeadercalls before the throw) are no longer silently discarded on the error path.#9292
4f373eeThanks @gustavovalverde! - Accept an array of Client IDs on providers that verify ID tokens by audience (Google, Apple, Microsoft Entra, Facebook, Cognito). The first entry is used for the authorization code flow; all entries are accepted when verifying an ID token'saudclaim, so a single backend can serve Web, iOS, and Android clients with their platform-specific Client IDs.Passing a single string keeps working; no migration needed.
Also exports
getPrimaryClientIdfrom@better-auth/core/oauth2for provider authors: it returns the primary Client ID (the raw string, or the entry at array index 0), paired withclientSecretfor the authorization code flow. Providers now reject empty arrays, empty strings, and missing config at sign-in time instead of silently producing a malformed authorization URL. Google, Apple, and Facebook require bothclientIdandclientSecretbecause each of those providers mandates a client secret for their server-side code exchange. Microsoft Entra and Cognito only requireclientId, since both support public-client flows with PKCE alone (no secret).#9293
e1b1cfcThanks @gustavovalverde! - Guard againstc.bodybeing undefined inparseState. Callback requests that arrive as GET leavec.bodyunset in some runtimes, which causedc.body.stateto throw aTypeErrorbefore the existing error redirect could run. The state lookup now short-circuits on the query parameter and falls back toc.body?.statesafely, so a callback without a state parameter redirects to the error page instead of crashing.#4894
d053a45Thanks @Kinfe123! - FirecallbackOnVerificationwhen a phone number is verified withupdatePhoneNumber: true. The callback previously only ran on initial verification, so consumers relying on it (e.g. to sync verified numbers to an external system) would miss the event when an authenticated user changed their number.Updated dependencies [
307196a,4a180f0,4f373ee]:v1.6.6Compare Source
Patch Changes
#9214
4debfb6Thanks @ping-maxwell! - fix(custom-session): use coerced boolean for disableRefresh query param validation#9235
9ea7eb1Thanks @bytaesu! - Preserve thePartitionedattribute when thecustomSessionplugin and framework integrations forwardSet-Cookieheaders.#9266
ab4c10fThanks @ping-maxwell! - fix(organization): infer team additional fields correctly#9219
a61083eThanks @bytaesu! - Allow removing a phone number withupdateUser({ phoneNumber: null }). The verified flag is reset atomically. Changing to a different number still requires OTP verification throughverify({ updatePhoneNumber: true }).#9226
e64ff72Thanks @gustavovalverde! - Consolidate host/IP classification behind@better-auth/core/utils/hostand close several loopback/SSRF bypasses that the previous per-package regex checks missed.Electron user-image proxy: SSRF bypasses closed (
@better-auth/electron).fetchUserImagepreviously gated outbound requests with a bespoke IPv4/IPv6 regex that missed multiple vectors. All of the following were reachable in production and are now blocked:http://tenant.localhost/and other*.localhostnames (RFC 6761 reserves the entire TLD for loopback).http://[::ffff:169.254.169.254]/(IPv4-mapped IPv6 to AWS IMDS, the classic SSRF bypass).http://metadata.google.internal/,http://metadata.goog/(GCP instance metadata).http://instance-data/,http://instance-data.ec2.internal/(AWS IMDS alternate FQDNs).http://100.100.100.200/(Alibaba Cloud IMDS; lives in RFC 6598 shared address space100.64/10, which the old regex did not cover).http://0.0.0.0:PORT/(the Linux/macOS kernel routes the unspecified address to loopback: Oligo's "0.0.0.0 Day").http://[fc00::...]/,http://[fd00::...]/(IPv6 ULA per RFC 4193) and IPv6 link-localfe80::/10, neither of which the regex recognized.Documentation ranges (RFC 5737 / RFC 3849), benchmarking (
198.18/15), multicast, and broadcast are also now rejected.better-auth:0.0.0.0is no longer treated as loopback. The previousisLoopbackHostimplementation inpackages/better-auth/src/utils/url.tsclassified0.0.0.0alongside127.0.0.1/::1/localhost.0.0.0.0is the unspecified address, not loopback; treating it as such lets browser-origin requests reach localhost-bound dev services (Oligo's "0.0.0.0 Day"). The helper now accepts the full127.0.0.0/8range and any*.localhostname, and rejects0.0.0.0.better-auth: trusted-origin substring hardening.getTrustedOriginspreviously usedhost.includes("localhost") || host.includes("127.0.0.1")when deciding whether to add anhttp://variant for a dynamicbaseURL.allowedHostsentry. Misconfigurations likeevil-localhost.comor127.0.0.1.nip.iowould incorrectly gain an HTTP origin in the trust list. The check now uses the shared classifier, so only real loopback hosts get the HTTP variant.@better-auth/oauth-provider: RFC 8252 compliance.127.0.0.0/8range (not just127.0.0.1) plus[::1], with port-flexible comparison. Port-flexible matching is limited to IP literals; DNS names such aslocalhostcontinue to use exact-string matching per §8.3 ("NOT RECOMMENDED" for loopback).validateIssuerUrluses the shared loopback check rather than a two-hostname literal comparison.New module:
@better-auth/core/utils/host. ExposesclassifyHost,isLoopbackIP,isLoopbackHost, andisPublicRoutableHost. One RFC 6890 / RFC 6761 / RFC 8252 implementation that handles IPv4, IPv6 (including bracketed literals, zone IDs, IPv4-mapped addresses, and 6to4 / NAT64 / Teredo tunnel forms with embedded-IPv4 recursion), and FQDNs, with a curated cloud-metadata FQDN set. All bespoke loopback/private/link-local checks across the monorepo now route through it.Updated dependencies [
b5742f9,a844c7d,e64ff72]:Configuration
📅 Schedule: (in timezone Asia/Makassar)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.