Repository navigation
Releases: better-auth/better-auth
Release list
v1.8.0-beta.4
Important
Action required
Custom Twitch and Paybin ID-token sign-ins using the default getUserInfo must include idToken.accessToken. Standard redirect-based sign-in requires no changes.
@better-auth/core
❗ Breaking Changes
- Changed Paybin to use its published
/oauth/*endpoints and return UserInfo data instead of stored ID-token claims, so profile mappings must handle omitted email and custom ID-token sign-ins using the default profile reader must supplyaccessToken(#11860) - Changed Spotify profile fields to match the current user profile, so mappings must handle nullable display names, omitted email, and nullable image dimensions, and a missing display name leaves the local name unset while raw profile fields remain available (#11865)
- Changed Twitch to fetch current profile data with access tokens instead of using stored ID-token claims, so profile mappings must handle optional fields and custom ID-token sign-ins using the default profile reader must supply
accessToken(#11848)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
Full changelog: v1.8.0-beta.3...v1.8.0-beta.4
v1.7.15
better-auth
Bug Fixes
- Fixed organization and API key metadata, and OAuth proxy sign-ins with a
constructorfield inadditionalData, failing with a prototype pollution error (#12142) - Improved
BETTER_AUTH_SECRETSerror messages to report the entry position instead of including the entry value (#12098) - Fixed the admin
update-userendpoint to rejectdata.idwith a 400 error instead of attempting to change the user's primary key (#12099) - Fixed the admin plugin to reject banned users when a session is created outside an endpoint, such as through
internalAdapter.createSession(#12100) - Fixed headers and cookies set by a non-returning
hooks.beforehook being dropped from the response, with the endpoint's value winning when both set the same header or cookie (#12145) - Fixed the Vue client's
useSession(useFetch)returning no session during Nuxt SSR whenbaseURLis inferred from the environment (#12109) - Fixed the
genericOAuthHubSpot helper truncating access tokens with reserved characters and now returningnullinstead of requesting/access-tokens/undefinedwhen no token is present (#12108) - Fixed
/sign-in/usernameand/is-username-availablerejecting usernames that sign-up accepts whenvalidationOrder.usernameispost-normalization(#12097)
For detailed changes, see CHANGELOG
auth
Bug Fixes
- Fixed
auth initfor Remix and React Router v7 to generate anapp/routes/api.auth.$.tsresource route that mountsauth.handlerinstead of a second auth instance with an unsupported database option (#12118) - Fixed
auth aioverwriting MCP config files it cannot parse, such as those with comments or trailing commas, by leaving them unchanged and printing the config to add manually (#12111) - Fixed
auth loginandauth logoutre-launching the CLI throughnpx auth@latestin an endless loop (#12110) - Fixed
auth inithanging during database migration and removed a stray debug line about path aliases (#12148)
For detailed changes, see CHANGELOG
@better-auth/stripe
Bug Fixes
- Fixed
/subscription/successreturning a 500 for non-stringcallbackURLandcheckoutSessionIdquery values by rejecting them with a 400 (#12105) - Fixed
/subscription/successto validatecallbackURLagainst trusted origins after replacing{CHECKOUT_SESSION_ID}, preventing redirects to untrusted origins viacheckoutSessionId(#12102)
For detailed changes, see CHANGELOG
@better-auth/api-key
Bug Fixes
- Fixed API keys in secondary storage failing to verify, load, and list when the storage client returns already-parsed JSON, such as
@upstash/redis(#12107)
For detailed changes, see CHANGELOG
@better-auth/cimd
Bug Fixes
- Fixed the Node metadata transport crashing the process on responses with an out-of-range status or invalid reason phrase by reporting the client as
invalid_client(#12103)
For detailed changes, see CHANGELOG
@better-auth/core
Bug Fixes
- Fixed built-in social providers following HTTP redirects on token exchange, refresh, verification, and JWKS signing key requests (#12106)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
Full changelog: v1.7.14...v1.7.15
v1.6.34
better-auth
Bug Fixes
- Fixed
ACCOUNT_NOT_FOUNDwhen retrieving an access token after stateless OAuth sign-in links a new provider to an existing user (#11300)
For detailed changes, see CHANGELOG
@better-auth/sso
Bug Fixes
- Fixed SAML sign-in for providers that use
samlConfig.callbackUrlas their ACS URL withoutspMetadata.metadata, which had failed withinvalid_saml_responsesince 1.6.21 (#11730)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
Full changelog: v1.6.33...v1.6.34
v1.8.0-beta.3
Important
Action required
OAuth profile types for Apple, Cognito, Discord, Dropbox, Facebook, GitHub, GitLab, Gumroad, Linear, Microsoft Entra ID, Notion, Patreon, PayPal, Railway, Slack, and Twitter(X) were reviewed against each provider's official resources and updated to match. If you use custom profile mappings or profile types for any of them, review the changes below and handle fields that are now optional, nullable, or retyped.
better-auth
❗ Breaking Changes
- Fixed the Gumroad OAuth helper to return
undefinedfor accounts without a name, matching its declared profile type (#11864) - Fixed the Patreon OAuth helper to normalize null names and images to missing values while preserving empty strings, and to allow email to be null or omitted when email access is not granted (#11863)
- Fixed Slack sign-in to support scoped profiles with optional
SlackProfileemail and profile claims, use POST for userinfo in the built-in provider and Generic OAuth helper, and reject Slack errors returned with HTTP 200 (#11851)
For detailed changes, see CHANGELOG
@better-auth/core
❗ Breaking Changes
- Fixed Apple profile types to align with identity tokens, making private-email status, user status, and pictures optional and accepting boolean or string email-verification claims (#11842)
- Fixed
CognitoProfileto make profile and token claims optional, accept boolean or"true"/"false"verification values, fall back tocognito:usernamefor ID-token names, and verify tokens against both documented issuer formats (#11843) - Fixed Discord profile types to reflect optional user metadata, added avatar decoration, collectible, and primary guild details, and defaulted missing email verification to false (#11867)
- Fixed Dropbox profile types to include account status, locale, referral links, pairing status, account type, team policies, and root information, with
home_pathrequired for team roots (#11846) - Fixed Facebook Limited Login profile callbacks to accept tokens without name, email, or picture claims (#11856)
- Fixed
GithubProfiletypes to match GitHub API responses, with numericidand account counters, nullable details, and omitted scope-dependent fields such astwitter_username(#11839) - Fixed GitLab profile handling for nullable details and omitted conditional fields, made
lockeda required boolean, and preserved stored images for null avatars when profile updates are enabled (#11853) - Fixed
LinearUser.avatarUrlto be required and typed asstring | null, preserved stored images for null avatars during enabled profile updates, and made authorization scopes comma-separated (#11855) - Fixed
MicrosoftEntraIDProfileclaim types so timestamps are numbers,groups,acrs, andxms_ccare string arrays,in_corpis boolean, and conditional claims and profile photos can be omitted (#11854) - Fixed Notion users without an avatar to keep their existing profile image when profile updates are enabled, with optional
type, nullablenameandavatar_url, missingimageasundefined, and optionalperson.email_verifiedmetadata (#11859) - Fixed PayPal profile types to handle omitted names, email, and verification claims when personal permissions are not granted, defaulting missing email verification to false (#11862)
- Fixed
RailwayProfileto makeemail,name, andpictureoptional, reflecting the granted scopes (#11861) - Fixed Slack sign-in to support scoped profiles with optional
SlackProfileemail and profile claims, use POST for userinfo in the built-in provider and Generic OAuth helper, and reject Slack errors returned with HTTP 200 (#11851) - Fixed
TwitterProfiletypes so nested entity objects, arrays, and URL details can be omitted ornull, and added description cashtags, mentions, and URL preview metadata (#11852)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
Full changelog: v1.8.0-beta.2...v1.8.0-beta.3
v1.7.14
better-auth
Bug Fixes
- Fixed two-factor TOTP to accept imported Base32 secrets stored as
base32:<secret>(#12031)
For detailed changes, see CHANGELOG
@better-auth/core
Bug Fixes
- Fixed Kakao sign-in to forward
loginHintso the Kakao Account login page opens with the ID field prefilled (#12045)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
Full changelog: v1.7.13...v1.7.14
v1.7.13
better-auth
Bug Fixes
- Fixed type declarations so type-only exports are no longer listed as values, making a value import fail type checking instead of failing at runtime (#11985)
For detailed changes, see CHANGELOG
@better-auth/core
Features
- Added token endpoint authentication options to the Vercel social provider, including dynamic OIDC tokens and private key JWT client assertions, without replacing the built-in sign-in flow (#11948)
Bug Fixes
- Added
tokenEndpointAuth: { method }to the Cloudflare provider and deprecatedtokenEndpointAuthMethod, which remains supported (#11997)
For detailed changes, see CHANGELOG
@better-auth/stripe
Features
- Added support for Stripe SDK v23 in the Stripe plugin (#11954)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
@allenzhou101, @bytaesu, @godwit-bo
Full changelog: v1.7.12...v1.7.13
v1.8.0-beta.2
Important
Action required
-
If your Zoom profile mappings use exhaustive login-type checks, update them to handle the login types
11,21, and23. (#11850) -
fix(vk)!: correct profile phone number type (#11849)
VK profile callbacks now accept phone numbers as strings. Profile mappings must treat
user.phoneas a string instead of a number. -
If you use Naver profile mappings, update them to handle omitted personal fields and supply an email when Naver does not share one. (#11858)
-
If you use Kakao profile mappings, update them to handle a missing
kakao_account. (#11857) -
If you use Roblox profile mappings, update them to handle optional scoped fields, a
nullpicture, andunknowncustom claims. (#11866) -
fix(linkedin)!: correct profile locale type (#11844)
LinkedIn profile callbacks now accept locale language tags such as
en-US. Profile mappings must readlocaleas a string instead of a country/language object. -
If your Google profile mappings rely on ID token claims such as email verification, update them to handle claims that are now optional. (#11847)
-
fix(huggingface)!: align organization profile types (#11845)
Hugging Face profile mappings must iterate over organization arrays and can read optional plan and security restrictions. Organization roles are strings; use
securityRestrictionsinstead of the deprecated SSO and MFA flags. -
If you use
mapProfileToUserwith Polar, update it to read the scoped, nullable userinfo claims instead of the previous user profile fields. (#11840) -
If you use custom Kick profile mappings or
getUserInfocallbacks, update them to treatKickProfile.user_idas a number instead of a string. (#11841)
@better-auth/core
❗ Breaking Changes
- Fixed
GoogleProfileto reflect Google's optional ID token claims and to treat an absent email verification claim as unverified (#11847) - fix(huggingface)!: align organization profile types (#11845)
- Fixed Kakao profiles to make
KakaoProfile.kakao_accountoptional and to separate consent scopes with commas in authorization requests, as Kakao documents (#11857) - Fixed
KickProfile.user_idto be a number instead of a string (#11841) - fix(linkedin)!: correct profile locale type (#11844)
- Fixed
NaverProfile.responseto make personal profile fields optional, matching what Naver may omit (#11858) - Fixed Polar accounts to be identified by their userinfo subject and exposed the scoped, nullable userinfo claims in
mapProfileToUserinstead of unrelated user profile fields (#11840) - Fixed Roblox userinfo types so scoped
RobloxProfilefields are optional,picturecan benull, and custom claims areunknown, and preserved stored images when a Roblox avatar is missing and profile updates are enabled (#11866) - fix(vk)!: correct profile phone number type (#11849)
- Fixed Zoom profile types to include the phone number, WeChat, and Alipay login types (
11,21, and23) (#11850)
For detailed changes, see CHANGELOG
@better-auth/oauth-provider
Features
- feat(oauth-provider): give consentReferenceId the request and the user's choice (#11967)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
Full changelog: v1.8.0-beta.1...v1.8.0-beta.2
v1.7.12
Important
Action required
- If you use ID token sign-in with a provider that has no
clientId, setclientIdto every client ID your apps sign in with. (#11931)
better-auth
Bug Fixes
- Fixed the JWT plugin to verify JWTs and session cookie-cache JWTs with the stored key's algorithm instead of the token header's, and to warn when signing or verifying a JWT without an issuer or audience (#11925)
- Fixed OAuth callbacks completed through the OAuth proxy to run the same checks as the standard OAuth callback, including issuer and ID token nonce validation (#11930)
- Fixed
auth.api.getSession()to keep the original database error aserror.causewhen the session lookup fails (#11924)
For detailed changes, see CHANGELOG
@better-auth/core
Bug Fixes
- Fixed
mapProfileToUserfailing to typecheck underexactOptionalPropertyTypeswhen it returnsundefinedforname,email, orimage(#11918) - Fixed ID token sign-in to reject tokens when the provider has no client ID, since their audience cannot be checked (#11931)
- Fixed a custom Facebook
getUserInfoto no longer receive client-submitted access tokens issued to another Facebook app, and ID tokens missingexporiatare now rejected (#11919) - Restored the Twitch and Paybin ID token handling from before 1.7.11, which made account info fail once the ID token stored at sign-in expired (#11920)
- Added a
causeoption as a third argument toAPIError.from()to keep the underlying error for server-side callers without exposing it in the response (#11924)
For detailed changes, see CHANGELOG
@better-auth/mcp
Bug Fixes
- Fixed
requireMcpAuthto accept only OAuth access tokens and reject session JWTs from the JWT plugin, even when they share the issuer and audience (#11934)
For detailed changes, see CHANGELOG
@better-auth/sso
Bug Fixes
- Fixed OIDC SSO sign-in to reject ID tokens missing
exporiatand providers with an empty client ID, matching social sign-in (#11935)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
Full changelog: v1.7.11...v1.7.12
v1.7.11
better-auth
Bug Fixes
- Fixed repeated PostgreSQL migration diffs for
int8columns. (#10719) - Fixed database-backed rate limiting returning an excessively large
X-Retry-Aftervalue. (#11521)
For detailed changes, see CHANGELOG
@better-auth/core
Bug Fixes
- Fixed plugin
initreturns withoptions: undefinedfailing type checks underexactOptionalPropertyTypes. (#11907) - Fixed ID token signature and claim validation for Twitch and Paybin sign-in. Custom Paybin issuers must publish RS256 signing keys at
<issuer>/.well-known/jwks.json. (#11884) - Reduced installation size while preserving OpenTelemetry instrumentation attributes. (#11623)
For detailed changes, see CHANGELOG
@better-auth/oauth-provider
Bug Fixes
- Fixed OpenAPI schemas for
/oauth2/consentand/oauth2/continueto match their redirect responses. (#10881) - Fixed CIMD metadata refreshes overwriting concurrent administrator changes to discovered clients. (#11830)
For detailed changes, see CHANGELOG
@better-auth/expo
Bug Fixes
- Fixed Expo social account linking with ID tokens when a session cookie is present. (#10207)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
@aryan1306, @bytaesu, @cpojer, @gustavovalverde, @noobnooc, @rendermani, @sahiljagtap08
Full changelog: v1.7.10...v1.7.11
v1.8.0-beta.1
better-auth
Features
- Added a browser account chooser for Google sign-in buttons using FedCM on supported Chrome browsers (#11343)
For detailed changes, see CHANGELOG
@better-auth/drizzle-adapter
Bug Fixes
- fix(drizzle-adapter): preserve required fields in relations v2 schemas (#11836)
For detailed changes, see CHANGELOG
@better-auth/oauth-provider
Features
- Added support for assigning
client_credentialsscopes during protected OAuth client registration (#11832)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
@bytaesu, @gustavovalverde, @qamarq
Full changelog: v1.8.0-beta.0...v1.8.0-beta.1