better-auth
Features
- Made the
Authinstance directly fetchable (#9431) - Added
hydrateSessionto seed the client with a server-fetched session souseSessionreturns data on the first render (#8733) - Added an immutable username option that locks a username after it is first set, while still allowing other profile fields to be updated (#9240)
Bug Fixes
- Fixed organization invitation roles to support dynamic values (#9437)
- Fixed link accessibility issues (#9521)
- Fixed incorrect email casing in one-tap, email-OTP, and email-verification flows (#9369)
- Fixed the OpenAPI schema for
POST /sign-in/socialwhich incorrectly declared required fields (#9268) - Added a warning when the cookie plugin is placed last in the plugins array (#9484)
- Fixed
useSessionto revalidate correctly after admin impersonation (#9402) - Fixed duplicate
Set-Cookieheaders being sent on redirect responses (#9497) - Fixed the bearer plugin to write only one entry per cookie name when merging session tokens (#9387)
- Fixed the captcha plugin breaking the email-OTP flow (#8339)
- Fixed instrumentation resolution in the adapter factory via package self-reference (#9340)
- Fixed instrumentation to use the pure entry point in Cloudflare Workers environments (#9395)
- Fixed enumeration protection to apply correctly when
autoSignInis disabled (#8839) - Fixed a
TypeErrorcaused by non-ASCII characters in an OAutherror_descriptionduring redirect (#9065) - Fixed the
deleteAccountparameter name fromaccountIdtoidin the internal adapter (#9503) - Fixed OAuth callbacks to reject responses that are missing a provider account ID (#9456)
- Fixed
mapProfileToUserto serve as a fallback for OAuth providers that may omit the email field (#9331) - Fixed
beforeCreateTeamandbeforeCreateInvitationhooks to allow passing a customid(#9253) - Fixed
cancelPendingInvitationsOnReInvitebeing unreachable because re-invite incorrectly returned 400 (#9453) - Fixed a
TS2742error by re-exporting field types when usingadditionalFields(#9349) - Fixed the active organization role not being refreshed on sign-out (#9440)
- Fixed
setActiveTeamto correctly scope team selection to the active organization (#9239) - Fixed a missing
getNonceclient alias in the SIWE plugin (#9461) - Fixed the username plugin to respect
callbackURLon sign-in (#9475)
For detailed changes, see CHANGELOG
@better-auth/stripe
Bug Fixes
- Fixed
onSubscriptionUpdateto expose thestripeSubscriptionobject and corrected a stale snapshot issue (#9354) - Fixed library-owned Checkout Session fields to no longer be overridable via
getCheckoutSessionParams(#9481) - Fixed
onSubscriptionDeletedand trial callbacks to receive the post-update subscription instead of the stale one (#9356) - Fixed
getCheckoutSessionParamsto preservefreeTrialand internal metadata during merging (#9474) - Renamed internal subscription webhook variables for improved clarity (#9355)
For detailed changes, see CHANGELOG
@better-auth/oauth-provider
Bug Fixes
- Fixed authorization flows to work correctly when no
stateparameter is provided (#9328) - Fixed missing exports for declaration helper types (#9406)
- Fixed
prompt=loginto be honored correctly throughout the consent continuation flow (#9344) - Fixed missing database indexes on OAuth foreign keys (#9389)
For detailed changes, see CHANGELOG
@better-auth/passkey
Bug Fixes
- Fixed unhandled failures during the passkey autofill ceremony (#9429)
- Fixed a TypeScript
exactOptionalPropertyTypesincompatibility in the passkey plugin (#9270)
For detailed changes, see CHANGELOG
auth
Bug Fixes
- Fixed the CLI to emit valid Kysely initialization configs (#9455)
- Improved CLI auth config loading by using
c12v4'sresolveModulefor more reliable module resolution (#9477)
For detailed changes, see CHANGELOG
@better-auth/api-key
Bug Fixes
- Fixed
api.verifyApiKeyto correctly validate keys against theconfigId(#9393)
For detailed changes, see CHANGELOG
@better-auth/i18n
Features
- Added built-in translations for 22 languages (#9157)
For detailed changes, see CHANGELOG
@better-auth/sso
Bug Fixes
- Fixed
spMetadatato usefindSAMLProviderso that the default SSO configuration works correctly (#9398)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
@adrianmxb, @baptisteArno, @bytaesu, @Craga89, @cyphercodes, @dipan-ck, @erquhart, @GautamBytes, @gustavovalverde, @IcanDivideBy0, @jaydeep-pipaliya, @mausic, @onmax, @pi0, @ping-maxwell, @sovetski, @zllovesuki
Full changelog: v1.7.0-beta.2...v1.7.0-beta.3