better-auth
1.7.25 · 14 Nov 2026MIT21M / weekRepositoryHomepagenpmAtom feed
1.7.27 is the newest release of 1.x.
In short
39 new41 fixed1 internal
Security
14 advisories affect 1.3.0; 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
Sveltekit cookie helper plugin
SSO plugin with OIDC and SAML support
Linear social provider
Add encryption for OTPs and other verification information
Notion provider
Add
sendOnSignInoption to make sending verification link in sign in route explicitAdd
inferAuthto infer plugin types and more on the client without needing client pluginsAdd
rememberMeoption tosignUpEmailAdd slack social provider
Add an option to encrypt oauth tokens by default
OnPasswordReset callback
AfterEmailVerification callback
SIWE plugin
admin: Update user
anonymous: Update generateName to support returning a promise
api-key: Async support for verify key
api-key:
requireNameto enforce name on keysdrizzle: Support camel case schema generation
email-otp: Support email verification override
generic-oauth: Add support for additional token URL params in generic OAuth
magic-link: Support errorCallbackURL & newUserCallbackURL
oidc: Add refresh token support to discovery document and token endpoint
oidc: Support JWKs with JWT plugin
oidc: Add support for public clients with PKCE authentication
oidc-provider: Trusted clients
oidc-provider: Support encrypting and hashing secrets
organization:
listUserInvitationsadds the ability to list all invitations for a given userorganization: AdditionalFields for org, member, invitation & team
organization: Multi-team support
social-providers: Add Faceit Social Provider
social-providers: Add Faceit Social Provider "
sso: Configurable provider limit
stripe: Pass context obejct to stripe plugin callbacks
username: Check username availability
username: Add custom username normalization option
Bug Fixes
Import setCookie from tanstack start core package
Exclude current user from username update checks
Correct way detect facebook limited token jwt
Update Discord link to use the correct invite URL in blogs section
Linking accounts for anon users with one tap and passkey
Don't require email for account linking
Add
imageoption tosignUpEmailtypes and schemaImplement standard Base64 encoding for HTTP Basic Auth in token refresh and validation
Schema generation when using advanced.databse.useNumberId
Mysql foreign key constraints on generate
Zodv4 migration leftover due to conflict
Sso typecheck
Global onSuccess callback hook not being called
admin: Throw an error if user id in
/remove-useris invalidadmin: Before create hook was not triggered when creating a user through the admin plugin
admin: Pass
ctxto user create db hookapi-key: Incorrect rate limit error status code
api-key: Incorrect rate limit error status code
api-key: Non-expiring API keys (with expiresAt set to null) were being deleted by mistake
cli: Format drizzle schema output
db: Add varchar to postgres string mapping and normalize type comparison
drizzle-cli: Use serial as PK when
useNumberIdis enableddrizzle-cli: Use serial as PK when
useNumberIdis enableddropbox: Added support for the token access type option
email-otp: Throw USER_NOT_FOUND when sign-up is disabled
email-otp: Throw USER_NOT_FOUND when sign-up is disabled
expo: Expo plugin should import types from the types path
generic-oauth: Error callback should avoid malformed URLs when the original URL already has query parameters
jwt: Allow to generate JWKS with other algorithm than the default one
mcp: Issue with hardcoded baseURL in withMcpAuth
mongodb: Honor custom generateId in create
next-cookies: Don't throw in monorepo workspaces
oauth: Google prompt doesn't allow
+oauth: Extended oauth2 tokens with
refresh_token_expires_infieldoidc-provider: Relax offline_access scope validation by removing prompt=consent requirement
open-api: Include additional fields
organization: List-teams endpoint returns
unknownorganization: Allow org owner to update their own roles
origin-check: Support protocol-specific wildcard trusted origins
phone-number: Verification value should be removed after successful password reset
social-providers: Twitch provider not returning if email is valid
sso: Saml redirection
stripe: Allow upgrading incomplete subscriptions
stripe: Prevent duplicate customers
two-factor: Incorrect default OTP period & fix incorrect docs
two-factor: Incorrect default OTP period & fix incorrect docs
two-factor: Getting totp uri shouldn't require twoFactor enabled
two-factor: Otp separator mismatch
two-factor: Use twoFactorEnabled flag instead of database lookup for OTP validation
username: Add
callbackURLoption tosignInUsername
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.