better-auth
1.7.25 · 14 Nov 2026MIT21M / weekRepositoryHomepagenpmAtom feed
1.7.27 is the newest release of 1.x.
In short
1 removed15 new41 fixed
- Removed
Remove deep array merge when merging hooks context
Security
14 advisories affect 1.3.5; 1.6.22 fixes them
- CriticalBetter Auth: OAuth refresh-token replay via missing client authentication on oidc-provider and mcp pluginsGHSA-pw9m-5jxm-xr6h · 7 Jul 2026Fixed in 1.6.11
- CriticalBetter Auth Has Two-Factor Authentication Bypass via Premature Session Caching (session.cookieCache)GHSA-xg6x-h9c9-2m83 · 3 Apr 2026Fixed in 1.4.9
- HighBetter Auth: Account takeover via pre-account hijacking on magic-link and email-OTP sign-inGHSA-qq9h-g4jm-xgf3 · 24 Jul 2026Fixed in 1.6.22
- High@better-auth/oauth-provider's OAuth authorization-code grant allows concurrent redemption when two token requests race the find-then-delete primitiveGHSA-7w99-5wm4-3g79 · 7 Jul 2026Fixed in 1.6.11
- HighBetter Auth has insecure cryptographic defaults in oidcProvider: alg=none advertised and plain PKCE accepted by defaultGHSA-9h47-pqcx-hjr4 · 7 Jul 2026Fixed in 1.6.11
9 more
- HighBetter Auth has stored XSS in the auth-server origin via javascript: redirect_uri in oidc-provider and mcpGHSA-86j7-9j95-vpqj · 7 Jul 2026Fixed in 1.6.13
- HighBetter Auth has an account takeover issue via OAuth auto-link to unverified pre-registered emailGHSA-g38m-r43w-p2q7 · 7 Jul 2026Fixed in 1.6.11
- HighBetter Auth vulnerable to unauthorized invitation acceptance via unverified email match in organization pluginGHSA-fmh4-wcc4-5jm3 · 7 Jul 2026Fixed in 1.6.11
- HighBetter Auth: Rate limiter keys IPv6 addresses individually and is bypassable via prefix rotationGHSA-p6v2-xcpg-h6xw · 15 May 2026Fixed in 1.4.17
- HighBetter Auth's rou3 Dependency has Double-Slash Path Normalization which can Bypass disabledPaths Config and Rate LimitsGHSA-x732-6j76-qmhm · 16 Dec 2025Fixed in 1.4.5
- HighBetter Auth affected by external request basePath modification DoSGHSA-569q-mpph-wgww · 1 Dec 2025Fixed in 1.4.2
- HighBetter Auth: Unauthenticated API key creation through api-key pluginGHSA-99h5-pjcv-gr6v · 9 Oct 2025Fixed in 1.3.26
- ModerateBetter Auth: OAuth callback accepts mismatched `state` when cookie-backed state storage is used without PKCEGHSA-wxw3-q3m9-c3jr · 15 May 2026Fixed in 1.6.2
- LowBetter Auth: Stale sessions persist after user deletion across admin, anonymous, and SCIM flowsGHSA-2vg6-77g8-24mp · 7 Jul 2026Fixed in 1.6.11
Release note
Features
List organization memebrs with pagination and filter queries
Return false from
generateIdcallback to imply database-generated IDSupport multiple aud for apple oauth
Allow
getUserInfoto return number typeRemove revoked session from active sessions list
Add telemetry
cli: Added --yes for generate/migrate, deprecated --y
oidc-provider: Add
clientto getAdditionalUserInfoClaim callbackoidc-provider: Allow passing oauth consent code via query params
organization: Additional fields support separate client-server projects
organization: Add membersLimit param to allow to fetch more or less members than the membership limit
organization: Add option for requiring email verificaiton
passkey: Allow custom passkey name during registration
stripe: Create billing portal session
Bug Fixes
Shouldn't refresh a token if access token expires is undefined or null
Ensure session is added to context when reading from cookie cache
Make sveltekit plugin ALS-agnostic
Use same expires at date for cookie session data payload and signature
Resolve notion oauth user info extraction
Cast dates from db to Date when using date methods
Twitter refresh token requires basic authentication
Pass
loginHintto Microsoft oauth URLCast dates from session to Date when using date methods
Incorrect initialization of remaining value within API key
Add missing team reference in teamMember schema
Await
ctxin middlewarePlugins options type compatibility issue with
exactOptionalPropertyTypesenabled in ts-configClient secret should be optional in configuring the generic oauth plugin
Ensure zod v4 type annotations work with core types
- Removed
Remove deep array merge when merging hooks context
Allow returning response object to skip after hooks
Handle inconsistent user update error in phone number plugin
admin: Export type definitions from the admin plugin
cli:
--yesoption does not work on@better-auth/cli generatecli: Prisma schema generate mismatch on custom plugin table names
cli: Only show the overwrite message when the schema file exists and the code has changed
deps: Update better-auth dependencies - in #3916
expo: Improve cookie expiration handling
generic-oauth: Set account id from mapped user fields when creating account
jwt: Ensure alg is added to the jwks when generating via /token endpoint
jwt: Expose jwt options to plugins
magic-link: Magic link URL construction
mcp: Redirect returns json instead of 302
mssql: "text" datatype is not working with mssql
org: Use correct slug lookup when setting active org
organization: Updated types for the user argument in
allowUserToCreateOrganizationto support custom fieldsorganization: Team members should be cleaned up on delete team
organization: Convert emails to lower case for invitation lookups
organizaton: Avoid cross organization member role updates
plugins: Export siwe plugin
reddit: Refresh access token should use
basicauthstripe: Prevent duplicate trials when switching plans
stripe: Update customer id should also trigger secondary storage update
stripe: Fallback to subscription id instead of picking the first sub if id is provided
tiktok: Client id is not used for TikTok social provider
username:
isUsernameAvailableshould validate usernamesusername:
isUsernameAvailableshould validate usernames "username: Remove normalize transform for displayUsername
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.