Repository navigation
Immutable
release. Only release title and notes can be modified.
Important
Action required
- If you have no key for
jwks.keyPairConfig.algand your newest key uses anotherjwks.keyPairConfigsalgorithm, your ID tokens,/tokenJWTs, and cookie-cache JWTs changealgandkidon the next unpinned signature, so update verifiers that hard-code the old algorithm or never refetch the JWKS for an unknownkid. (#12655) - If you want to keep rejecting a
client_urion a different origin than theclient_id, add"client_uri"tooriginBoundFields, which now defaults to["post_logout_redirect_uris"]. (#12822)
better-auth
Bug Fixes
- Fixed the phone number plugin returning a 500 instead of a 400 from
/update-userwhen the request has no body (#12810) - Fixed the username plugin returning a 500 on
/sign-up/emailand/update-userwhen the request has no body; it now returns the same 400 as without the plugin (#12810) - Fixed
/sign-in/anonymousto validate the request origin, returning a 403 for browser requests from origins outsidetrustedOrigins(#12809) - Fixed unpinned tokens such as ID tokens and session JWTs to prefer a key for the primary
jwks.keyPairConfig.algalgorithm (#12655) - Fixed
getTestInstancefrombetter-auth/testto run every instance cleanup even when one fails, so databases and connections are not left open (#12553) - Fixed
POSTrequests without a body, such as/sign-outor/revoke-sessions, failing with a 415 on Deno, Next.js, Nuxt and other servers that pass an empty body stream (#12805)
For detailed changes, see CHANGELOG
@better-auth/oauth-provider
Features
- Added the
isCrossOriginJwksUriAllowedoption tocimd()so you can accept Client ID Metadata Document clients whosejwks_uriis on a different origin than theirclient_id(#12823) - Fixed administrator updates to discovered clients that publish keys at a
jwks_uri, such as settingclient_credentials_scopesthroughadminUpdateOAuthClient(#12823) - Added the
jwksStaleIfErroroption to keep verifying client assertions with cachedjwks_urikeys while refetching fails transiently (#12824) - Added the
requireOpenIdoption tooauthProviderto reject/oauth2/authorizerequests that lack theopenidscope withinvalid_scope(#12729) - Added the
resourceSeedScopeoption tooauthProviderso apps that build Better Auth on every request can stop re-readingoauthResourceeach time (#12733) - Added
advertisedMetadata.token_endpoint_auth_methods_supportedso providers can advertise accepted token endpoint client authentication methods, including public clients (#12732)
Bug Fixes
- Fixed Client ID Metadata Document and
jwks_uriresponses refused before their body is read, such as error statuses or non-JSON content types, holding connections open (#12819) - Fixed the signed OAuth query failing with
invalid_signaturewhen a proxy, router, or login page URL-decodes it once (#12728) - Fixed the end-session endpoint to accept issued ID token hints when the issuer ends with a trailing slash (#12713)
- Fixed signing keys and post-logout redirect URIs removed from a client's metadata document continuing to work after a refresh (#12821)
- Fixed concurrent first requests from the same Client ID Metadata Document client failing with a server error when the database wraps the unique-constraint error (#12820)
- Fixed refresh tokens without
offline_accessto stop working once their session expires or is deleted (#12812) - Fixed a client losing its
offline_accessgrants on other devices after using a session-bound refresh token following sign-out (#12812) - Fixed
oauthProviderClientto send form-encoded bodies as form fields and leave non-object JSON bodies such as arrays unchanged (#12726) - Fixed
oauthProviderClientto stop rewriting request bodies on pages whose query string is not a signed OAuth query (#12726) - Fixed back-channel logout,
jwks_uriclient authentication, and Client ID Metadata Document fetches failing on Cloudflare Workers (#12817) - Fixed OIDC SSO sign-in with
signIn.ssoto resume the OAuth authorization instead of leaving the user on the sign-incallbackURL(#12727) - Fixed
private_key_jwtclients losing their cachedjwks_urikey set while still authenticating when more than 500 key sets are cached (#12721) - Improved
private_key_jwtauthentication so concurrent assertions for the samejwks_urishare a single fetch of the client's key set (#12721) - Fixed
/oauth2/introspectto return the client ID assubfor JWTclient_credentialstokens issued to pairwise clients (#12671)
For detailed changes, see CHANGELOG
@better-auth/cimd
Features
- Added the
isCrossOriginJwksUriAllowedoption tocimd()so you can accept Client ID Metadata Document clients whosejwks_uriis on a different origin than theirclient_id(#12823) - Added the opt-in
metadataStaleIfErroroption to keep known clients working through brief metadata host outages (#12824)
Bug Fixes
- Fixed Client ID Metadata Document and
jwks_uriresponses refused before their body is read, such as error statuses or non-JSON content types, holding connections open (#12819) - Fixed
@better-auth/cimd/nodekeeping connections open after bodyless responses such as304 Not Modifiedto a metadata revalidation (#12819) - Fixed client metadata and JWKS fetches through
@better-auth/cimd/nodehanging forever when the server answers with101 Switching Protocols(#12819) - Fixed requests hanging forever when they join a Client ID Metadata Document fetch that never settles (#12731)
- Fixed concurrent requests for the same Client ID Metadata Document sharing one request's database save instead of each saving the client in their own context (#12731)
- Fixed Client ID Metadata Document fetches that never settle permanently using up fetch slots and making other clients fail with
temporarily_unavailable(#12731) - Fixed Client ID Metadata Documents with a
client_urion a different origin than theclient_idbeing rejected under the default options (#12822) - Fixed client metadata and JWKS fetches in
@better-auth/cimd/nodestaying stuck on DNS lookups after the request is aborted (#12818) - Fixed back-channel logout,
jwks_uriclient authentication, and Client ID Metadata Document fetches failing on Cloudflare Workers (#12817)
For detailed changes, see CHANGELOG
@better-auth/core
Bug Fixes
- Fixed valid access tokens being rejected when the JWKS refetch fails by falling back to a cached key set fetched less than 10 minutes ago (#12722)
- Fixed overlapping requests reading each other's request state in the edge and browser build by using the runtime's
AsyncLocalStoragewhen available (#12807)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
@bytaesu, @deepanshupal, @devsouhardo, @EhsanulHaqueSiam, @ghazy2001, @gustavovalverde, @hardikguptaofficialgit, @kaiizer777, @Neekoras, @NoiceHax, @officialasishkumar, @rendermani
Full changelog: v1.7.26...v1.7.27