better-auth
Bug Fixes
- Fixed
/device/codereturning a 500 on a user or device code collision with the Drizzle adapter by retrying with a new code (#12853) - Fixed concurrent email OTP requests for the same address so both emails carry the same valid code on databases with a unique
verification.identifier(#12893) - Fixed sending a new email OTP to replace the earlier code for that address so stale codes no longer cause refusals (#12893)
- Fixed sending a new phone number OTP to replace the earlier code so a code sent during a check stays valid (#12893)
- Fixed verifying an unregistered phone number without
signUpOnVerificationto return a 400PHONE_NUMBER_NOT_EXISTerror instead of a 500 (#12893) - Fixed user deletion to report success only when the user is actually deleted, returning
FAILED_TO_DELETE_USERwhen a hook vetoes or the database skips the delete (#12858) - Fixed
/revoke-sessionand/admin/revoke-user-sessionto stop reporting success when the session survives the revocation (#12858) - Fixed revoking all of a user's sessions to fail when
secondaryStoragecannot clear the cached sessions, instead of reporting success (#12858) - Fixed
getSessionfailing when a session cached insecondaryStorageis missing its user, by reading the user from the database (#12858) - Fixed revoked sessions staying valid in secondary storage when a database
afterhook throws during password reset or user deletion (#12806) - Fixed
generateBackupCodesto read fresh user state so sessions cached before two-factor enrollment can generate codes and revoked sessions are rejected (#12907) - Fixed
/update-userwith theusernameplugin rejecting your own username as already taken when called with a bearer token (#12860)
For detailed changes, see CHANGELOG
@better-auth/oauth-provider
Bug Fixes
- Fixed Client ID Metadata Document registration treating a failed insert as a registration race when wrapped error query parameters contain words like "duplicate", and now returning the original database error (#12853)
- Fixed the OAuth provider
WWW-Authenticate: Basicchallenge to include therealmparameter required by RFC 7617 (#12789) - Fixed client IDs containing characters not allowed by RFC 6749 causing a 500 on PostgreSQL, now returning an
invalid_clientresponse (#12854) - Fixed requesting an OAuth device code without a
resourcefailing with a 500 on Prisma with PostgreSQL, CockroachDB, or MongoDB (#12854) - Fixed
oauthProviderClientrequests without a body failing with a 415 error on pages with a signed OAuth query (#12863) - Fixed client assertion verification to use the most recently cached key set when overlapping JWKS refreshes finish out of order (#12850)
For detailed changes, see CHANGELOG
@better-auth/core
Bug Fixes
- Fixed user deletion to report success only when the user is actually deleted, returning
FAILED_TO_DELETE_USERwhen a hook vetoes or the database skips the delete (#12858) - Fixed revoking all of a user's sessions to fail when
secondaryStoragecannot clear the cached sessions, instead of reporting success (#12858) - Fixed the Drizzle schema check being dropped when a project resolves two copies of
@better-auth/core(#12905) - Fixed after-commit hooks queued with
onErrornot running when an earlier queued hook throws (#12806) - Fixed a timed-out JWKS refresh blocking a refresh against a newer cached key set (#12850)
For detailed changes, see CHANGELOG
auth
Bug Fixes
- Improved
auth infoto redact more secret variants, including snake_case, kebab-case, uppercase, plural names, private key passphrases, and nested values (#12896) - Fixed
auth generatefor Prisma adding a duplicate back-relation when the model already has one under another name (#12896)
For detailed changes, see CHANGELOG
@better-auth/api-key
Bug Fixes
- Fixed API key reference list writes hanging on Cloudflare Workers when an earlier request ended without releasing its lock (#12909)
For detailed changes, see CHANGELOG
@better-auth/cimd
Bug Fixes
- Fixed
metadataStaleIfErrorso known clients regain stored-registration fallback once another request successfully saves the same metadata fetch after a rejected save (#12850)
For detailed changes, see CHANGELOG
@better-auth/drizzle-adapter
Bug Fixes
- Fixed the
relations-v2Drizzle adapter throwingUnexpected 'undefined' in filter valueon drizzle-orm 1.0.0-rc.5 and later for joinedfindManyqueries without awhere(#12940)
For detailed changes, see CHANGELOG
@better-auth/i18n
Bug Fixes
- Fixed user deletion to report success only when the user is actually deleted, returning
FAILED_TO_DELETE_USERwhen a hook vetoes or the database skips the delete (#12858)
For detailed changes, see CHANGELOG
@better-auth/sso
Bug Fixes
- Fixed SSO provider registration to enforce
providersLimiteven when an account already has more providers thanfindManyreturns (#12929)
For detailed changes, see CHANGELOG
@better-auth/stripe
Bug Fixes
- Fixed Stripe subscription lookups to filter
activeandtrialingstatus in the database so the current subscription is no longer missed when canceled history is large (#12930)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
@akshatmalik-bruh, @aliamanatali, @arhxam, @bytaesu, @elango5292, @Eternity0207, @exKAZUu, @ghazy2001, @gustavovalverde, @jonathansamines, @ping-maxwell, @Tushar-Khandelwal-2004, @umeraamir69
Full changelog: v1.7.27...v1.7.28