Important
Action required
- If you use SCIM with an adapter that has no native transactions, switch to an adapter with native transactions to provision users and groups. (#12413)
- If you use the MongoDB adapter and an index build fails because of duplicate values, missing
createIndexpermission, or a conflicting index on the same field, fix the cause and restart. (#12299) - If you rely on
updatechanging every row that matches a non-unique filter, useupdateManyinstead. (#12390)
better-auth
Bug Fixes
- Fixed plugin packages importing from the
better-authroot, so bundlers no longer emit unused Kysely chunks when used withbetter-auth/minimal(#12404) - fix(core): use ObjectId-shaped derived ids for Prisma ObjectId columns (#12126)
- Fixed the device approval page showing a valid code as invalid when the same signed-in user looked it up twice at once, such as under React Strict Mode (#12392)
- Fixed sign-ins with a
genericOAuthprovider usingdiscoveryUrland OAuth provider requests usingresourceshanging on Cloudflare Workers (#12395) - Fixed Generic OAuth to send
authorizationHeaderson access token refresh, added an optionalheadersinput torefreshAccessTokenandrefreshAccessTokenRequest, and prevented invalid combined headers with differently cased client authentication headers (#12401) - fix(generic-oauth): send discoveryHeaders to same-origin JWKS and keep them on the discovery origin (#12179)
- Fixed intermittent
schema does not existandrelation does not existerrors on PostgreSQL during the startup schema check andnpx auth@latest migratewhen other schemas are dropped concurrently (#11912) - fix(sign-up): send sign-up emails after the transaction commits (#12052)
- Fixed SIWE verification to stop exposing internal error messages in its 401 response and log them on the server instead (#12403)
For detailed changes, see CHANGELOG
@better-auth/oauth-provider
Bug Fixes
- Fixed the OAuth provider returning
[object Promise]instead of the refresh token whenformatRefreshToken.encryptis async (#12409) - fix(core): use ObjectId-shaped derived ids for Prisma ObjectId columns (#12126)
- Fixed sign-ins with a
genericOAuthprovider usingdiscoveryUrland OAuth provider requests usingresourceshanging on Cloudflare Workers (#12395) - fix(oauth-provider): report rejected post-logout redirect URIs as invalid_redirect_uri (#12391)
- fix(oauth-provider): return invalid_grant when reuse revokes an in-flight issuance (#11911)
- Fixed OAuth provider consent denial to redirect to the client only while the client is enabled and its
redirect_uriis still valid (#12385) - fix(oauth-provider): revoke in-flight access tokens on adapters without foreign keys (#12389)
For detailed changes, see CHANGELOG
@better-auth/core
Bug Fixes
- Fixed
nullfilters onidand reference fields being coerced to0whenadvanced.database.generateIdis"serial"(#12402) - Fixed authentication requests hanging on Cloudflare Workers when the request that started schema validation ended before validation finished (#11716)
- fix(core): use ObjectId-shaped derived ids for Prisma ObjectId columns (#12126)
- Fixed Generic OAuth to send
authorizationHeaderson access token refresh, added an optionalheadersinput torefreshAccessTokenandrefreshAccessTokenRequest, and prevented invalid combined headers with differently cased client authentication headers (#12401) - Fixed telemetry to report Cloudflare Workers as
workerdinstead ofnodewhennodejs_compatis enabled, and exported the runtime detection from@better-auth/core/env(#12425)
For detailed changes, see CHANGELOG
@better-auth/sso
Bug Fixes
- Fixed plugin packages importing from the
better-authroot, so bundlers no longer emit unused Kysely chunks when used withbetter-auth/minimal(#12404) - fix(sso): extend the refreshed session's own SAML logout record (#12424)
- fix(sso): keep SAML Single Logout working after session refresh (#12417)
- Fixed SAML replay protection to reject a signed response resubmitted with its assertion ID written as XML character references when
allowIdpInitiated: trueorenableInResponseToValidation: falseis set (#12421)
For detailed changes, see CHANGELOG
@better-auth/prisma-adapter
Bug Fixes
- fix(core): use ObjectId-shaped derived ids for Prisma ObjectId columns (#12126)
- Fixed Prisma adapter updates comparing a unique field with
nullfailing with a validation error, andupdatenow changes only one matching row (#12390) - Fixed the Prisma adapter with
provider: "mongodb"to matchcontains,starts_with,ends_with, and case-insensitive filters as literal text instead of regex patterns (#11807)
For detailed changes, see CHANGELOG
@better-auth/scim
Bug Fixes
- Fixed plugin packages importing from the
better-authroot, so bundlers no longer emit unused Kysely chunks when used withbetter-auth/minimal(#12404) - fix(scim): handle Groups with more than 100 members (#12070)
- Fixed apps using the SCIM plugin on adapters without native transactions, such as Cloudflare D1, failing at startup;
/scim/v2requests now return 501 Not Implemented on those adapters (#12413)
For detailed changes, see CHANGELOG
@better-auth/electron
Bug Fixes
- Fixed failed deep link authentication in Electron to be logged instead of causing an unhandled promise rejection in the main process (#12409)
- Fixed plugin packages importing from the
better-authroot, so bundlers no longer emit unused Kysely chunks when used withbetter-auth/minimal(#12404)
For detailed changes, see CHANGELOG
@better-auth/api-key
Bug Fixes
- Fixed plugin packages importing from the
better-authroot, so bundlers no longer emit unused Kysely chunks when used withbetter-auth/minimal(#12404)
For detailed changes, see CHANGELOG
@better-auth/expo
Bug Fixes
- Fixed plugin packages importing from the
better-authroot, so bundlers no longer emit unused Kysely chunks when used withbetter-auth/minimal(#12404)
For detailed changes, see CHANGELOG
@better-auth/kysely-adapter
Bug Fixes
- Fixed intermittent
schema does not existandrelation does not existerrors on PostgreSQL during the startup schema check andnpx auth@latest migratewhen other schemas are dropped concurrently (#11912)
For detailed changes, see CHANGELOG
@better-auth/mongo-adapter
Bug Fixes
- Added indexes in the MongoDB adapter for schema fields marked
uniqueorindex, preventing duplicate users from concurrent sign-ups with the same email (#12299)
For detailed changes, see CHANGELOG
@better-auth/passkey
Bug Fixes
- fix(passkey): accept exact trusted origins under a wildcard allowed host (#12388)
For detailed changes, see CHANGELOG
@better-auth/stripe
Bug Fixes
- Fixed plugin packages importing from the
better-authroot, so bundlers no longer emit unused Kysely chunks when used withbetter-auth/minimal(#12404)
For detailed changes, see CHANGELOG
@better-auth/telemetry
Bug Fixes
- Fixed telemetry to report Cloudflare Workers as
workerdinstead ofnodewhennodejs_compatis enabled, and exported the runtime detection from@better-auth/core/env(#12425)
For detailed changes, see CHANGELOG
@better-auth/test-utils
Bug Fixes
- Fixed the adapter test for
findManywith multiple operators to create users from generated data like other adapter tests (#12409)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
@ArjunCodess, @bytaesu, @ghazy2001, @gustavovalverde, @hardikguptaofficialgit, @ItzSudhan, @lakshya-dhariwal, @mallachari, @umeraamir69
Full changelog: v1.7.20...v1.7.21