better-auth
Bug Fixes
- Added an error code to the
change-email-disabledresponse to help clients identify the rejection reason (#8948) - Fixed access-control role statement types so predefined organization roles expose only their configured permissions in TypeScript (#9507)
- Fixed the anonymous plugin to correctly call
onLinkAccountwhen email verification triggers auto sign-in (#9548) - Fixed device authorization to bind pending codes to the verifying session, preventing any authenticated user from approving or denying another user's device code (#9573)
- Fixed a race condition in the magic-link plugin that allowed concurrent requests to mint multiple sessions from the same single-use token (#9572)
- Fixed the
oidc-providerandmcpplugins to requireclient_secretfor confidential clients on refresh token grants and use constant-time secret comparison (#9576) - Hardened
oidc-providerandmcpplugins to follow OAuth 2.1: removed"none"from advertised signing algorithms, defaulted plain PKCE off, and rejected incomplete PKCE parameters (#9575) - Fixed an invitation takeover vulnerability by enabling
requireEmailVerificationOnInvitationby default and extending the verification gate togetInvitationandlistUserInvitations(#9577)
For detailed changes, see CHANGELOG
@better-auth/oauth-provider
Bug Fixes
- Fixed a race condition in the OAuth authorization-code grant that allowed concurrent token-exchange requests to mint multiple token sets from the same authorization code
- Fixed a race condition in OAuth refresh-token rotation that allowed concurrent requests to fork refresh token families, and added a
uniqueconstraint onoauthRefreshToken.token - Fixed OAuth account linking to require a verified local email before linking an OAuth identity to a local account (#9578)
For detailed changes, see CHANGELOG
@better-auth/core
Bug Fixes
- Fixed an invalid import list in the instrumentation module (#9582)
- Widened
advanced.ipAddress.ipv6Subnetto accept any valid IPv6 prefix length (0-128) instead of a narrow set of values (#9545)
For detailed changes, see CHANGELOG
@better-auth/scim
Bug Fixes
- Fixed session cleanup to run when admin, anonymous, or SCIM operations delete a user (#9162)
- Fixed
generateSCIMTokento rejectproviderIdvalues that collide with built-in account providers, preventing tokens from authenticating against unintended accounts (#9579)
For detailed changes, see CHANGELOG
@better-auth/sso
Bug Fixes
- Fixed SSO provider registration to require an org admin or owner role, preventing any organization member from registering providers (#9220)
- Fixed an SSRF vulnerability by validating user-supplied OIDC endpoint URLs against a public-routable host allowlist at provider registration and update (#9574)
For detailed changes, see CHANGELOG
auth
Features
- Added an atomic
claimOneadapter primitive for consuming database rows without race conditions (#9560)
Bug Fixes
- Renamed the
claimOneadapter primitive toconsumeOneand addedinternalAdapter.consumeVerificationValuefor atomically consuming verification rows (#9568)
For detailed changes, see CHANGELOG
@better-auth/api-key
Bug Fixes
- Fixed API key rate-limited responses to return HTTP 429 instead of 401, so clients can distinguish throttling from authentication failures (#9505)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
@dipan-ck, @GautamBytes, @gustavovalverde, @Kvizas, @ping-maxwell, @stewartjarod
Full changelog: v1.6.10...v1.6.11