better-auth
❗ Breaking Changes
- Changed the custom
DeviceAuthorizationGrantinterface for device-code approval (#11610)
Migration: Rename
assertSessionRedemptiontoassertStandaloneUse, handle its newuseargument, and remove uses ofgetVerificationContext,verificationOpenAPIProperties, and the interface's second type parameter.
- Fixed sign-up emails and OAuth session caching to run after database work completes (#11751)
Migration: Use a
databaseHooks.user.create.beforehook to reject sign-ups instead of throwing fromsendVerificationEmailoronExistingUserSignUp, and account for logged cache-write failures no longer failing applicable sign-ins.
- Fixed concurrent device-code decisions so only the first approval or denial takes effect (#11772)
Migration: Replace checks for
device_code_already_processedin/device/approveerror types with checks forinvalid_request.
- Fixed device-token polling to report
expired_tokenimmediately after a code expires (#11772)
Migration: Handle
expired_tokenon the first poll after expiry rather than expecting an initialslow_downresponse.
For detailed changes, see CHANGELOG
@better-auth/oauth-provider
❗ Breaking Changes
- Moved OAuth device-code approval into the provider's sign-in and consent flow (#11610)
Migration: Update OAuth device verification pages to send users to
/oauth2/authorize?user_code=<code>instead of approving codes through/device/approveor/device/deny, and apply the newdeviceCodecolumns before deploying.
- Stopped recording consent for empty OAuth scopes (#11610)
Migration: Stop relying on consent records for the empty
scopevalue; omit empty entries from requested and accepted scopes.
- Added
interactionRequestsfor extensions that route additional approval flows through OAuth provider pages (#11610)
Migration: If your OAuth provider extension implements a custom approval flow, register it through
interactionRequestsand resume it through/oauth2/authorize.
- Fixed OAuth token revocation and introspection to handle unknown, mistyped, and invalid tokens consistently with RFC 7009 and RFC 7662 (#11796)
Migration: Update clients and tests for the changed revocation, introspection, userinfo, and refresh-token error responses; extension grants should use
provider.requireActiveAccessTokenif an unknown token must throw.
- Fixed OAuth endpoints to reject repeated form parameters and report malformed resources as
invalid_target(#11746)
Migration: Send token, introspection, and revocation form parameters only once except for
resourceandaudience, and update error handling for malformedresourcevalues frominvalid_requesttoinvalid_target.
- Isolated pairwise
subvalues for newly registered native and loopback OAuth clients (#11650)
Migration: Add the
sectorIdentifiercolumn tooauthClientwithnpx auth@latest migrate, or generate and apply the schema with your ORM, before upgrading.
Features
- Added support for removing registered OAuth logout URIs with
null(#9923) - Added browser-based OpenID Connect front-channel logout for registered clients (#9923)
- Added OAuth token exchange for services requesting a scoped access token for another registered API (#11763)
- Added configurable
acrandamrclaims to OAuth ID tokens (#11787) - Added authentication context claims to device-code ID tokens and their refreshes (#11788)
- Added extension-defined client registration fields with validation at registration and update (#11767)
Bug Fixes
- Fixed client metadata document registration when at least one declared grant is supported (#10731)
- Fixed device and CIBA polling so an invalid DPoP proof does not consume an approved request (#11826)
For detailed changes, see CHANGELOG
@better-auth/ciba ✨
Features
- Added CIBA support for user-approved backchannel authentication with polling or ping delivery (#11785)
- Added
auth.api.completeCibaRequestso apps can approve or deny CIBA requests from server code (#11812)
Bug Fixes
- Fixed device and CIBA polling so an invalid DPoP proof does not consume an approved request (#11826)
For detailed changes, see CHANGELOG
@better-auth/cimd
Features
- Added validation and storage for extension-defined fields in client metadata documents (#11767)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
@erikpr1994, @gustavovalverde, @shiminshen
Full changelog: v1.7.10...v1.8.0-beta.0