Skip to content

build(deps): Bump the better-auth group with 7 updates - #259

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/better-auth-51965bb16c
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/better-auth-51965bb16c

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 17, 2026

Copy link
Copy Markdown
Contributor

Bumps the better-auth group with 7 updates:

Package From To
@better-auth/api-key 1.7.18 1.7.23
@better-auth/cimd 1.7.18 1.7.23
@better-auth/core 1.7.18 1.7.23
@better-auth/mcp 1.7.18 1.7.23
@better-auth/oauth-provider 1.7.18 1.7.23
better-auth 1.7.18 1.7.23
@better-auth/kysely-adapter 1.7.18 1.7.23

Updates @better-auth/api-key from 1.7.18 to 1.7.23

Release notes

Sourced from @​better-auth/api-key's releases.

v1.7.23

[!IMPORTANT] Action required

  • If you want requireMcpAuth to keep fetching signing keys over HTTP, set jwksUrl. (#12501)
  • If your CORS layer sets its own Access-Control-Expose-Headers, include WWW-Authenticate in it. (#12521)
  • If you run createMcpProtectedRequestHandler in a multi-instance or serverless deployment, set dpop.replayStore to a shared store such as createDpopReplayStore(internalAdapter). (#12504)

better-auth

Bug Fixes

  • Fixed getTestInstance sharing one MongoDB database across test files, so parallel tests no longer delete each other's data (#12543)

For detailed changes, see CHANGELOG

@better-auth/mcp

Bug Fixes

  • Improved the dpop.replayStore documentation on createMcpProtectedRequestHandler to explain the in-memory default and when to use a shared store (#12504)
  • Fixed requireMcpAuth to accept tokens when the JWT plugin publishes its keys at jwks.remoteUrl (#12501)
  • Fixed requireMcpAuth returning a 500 on runtimes that block requests to their own hostname, such as a single Cloudflare Worker (#12501)
  • Fixed cross-origin browser clients being unable to read WWW-Authenticate challenges from OAuth resource servers and MCP helpers (#12521)
  • Fixed OAuth resource servers to answer DPoP requests lacking a required scope with a DPoP insufficient_scope challenge instead of Bearer (#12525)

For detailed changes, see CHANGELOG

@better-auth/oauth-provider

Bug Fixes

  • Fixed cross-origin browser clients being unable to read WWW-Authenticate challenges from OAuth resource servers and MCP helpers (#12521)
  • Fixed protected resource requests using an unsupported authorization scheme or no scheme to receive a Bearer challenge with resource_metadata (#12515)
  • Fixed OAuth resource servers to answer DPoP requests lacking a required scope with a DPoP insufficient_scope challenge instead of Bearer (#12525)
  • Fixed OAuth token requests that fail PKCE, redirect_uri, resource, or DPoP validation consuming the authorization or device code (#12499)
  • Added a warning in the OAuth provider when two extensions contribute the same discovery metadata key (#12500)

For detailed changes, see CHANGELOG

@better-auth/core

Bug Fixes

  • Improved the advanced.database.validateSchema documentation to explain when validation runs and which adapters skip it (#12480)
  • Fixed requireMcpAuth returning a 500 on runtimes that block requests to their own hostname, such as a single Cloudflare Worker (#12501)

For detailed changes, see CHANGELOG

@better-auth/electron

... (truncated)

Changelog

Sourced from @​better-auth/api-key's changelog.

1.7.23

1.7.22

1.7.21

Patch Changes

  • #12404 9b40ac6 Thanks @​bytaesu! - Plugin packages no longer import from the better-auth root, so bundlers that split code stop emitting unused Kysely chunks when used with better-auth/minimal.

1.7.20

1.7.19

Commits

Updates @better-auth/cimd from 1.7.18 to 1.7.23

Release notes

Sourced from @​better-auth/cimd's releases.

v1.7.23

[!IMPORTANT] Action required

  • If you want requireMcpAuth to keep fetching signing keys over HTTP, set jwksUrl. (#12501)
  • If your CORS layer sets its own Access-Control-Expose-Headers, include WWW-Authenticate in it. (#12521)
  • If you run createMcpProtectedRequestHandler in a multi-instance or serverless deployment, set dpop.replayStore to a shared store such as createDpopReplayStore(internalAdapter). (#12504)

better-auth

Bug Fixes

  • Fixed getTestInstance sharing one MongoDB database across test files, so parallel tests no longer delete each other's data (#12543)

For detailed changes, see CHANGELOG

@better-auth/mcp

Bug Fixes

  • Improved the dpop.replayStore documentation on createMcpProtectedRequestHandler to explain the in-memory default and when to use a shared store (#12504)
  • Fixed requireMcpAuth to accept tokens when the JWT plugin publishes its keys at jwks.remoteUrl (#12501)
  • Fixed requireMcpAuth returning a 500 on runtimes that block requests to their own hostname, such as a single Cloudflare Worker (#12501)
  • Fixed cross-origin browser clients being unable to read WWW-Authenticate challenges from OAuth resource servers and MCP helpers (#12521)
  • Fixed OAuth resource servers to answer DPoP requests lacking a required scope with a DPoP insufficient_scope challenge instead of Bearer (#12525)

For detailed changes, see CHANGELOG

@better-auth/oauth-provider

Bug Fixes

  • Fixed cross-origin browser clients being unable to read WWW-Authenticate challenges from OAuth resource servers and MCP helpers (#12521)
  • Fixed protected resource requests using an unsupported authorization scheme or no scheme to receive a Bearer challenge with resource_metadata (#12515)
  • Fixed OAuth resource servers to answer DPoP requests lacking a required scope with a DPoP insufficient_scope challenge instead of Bearer (#12525)
  • Fixed OAuth token requests that fail PKCE, redirect_uri, resource, or DPoP validation consuming the authorization or device code (#12499)
  • Added a warning in the OAuth provider when two extensions contribute the same discovery metadata key (#12500)

For detailed changes, see CHANGELOG

@better-auth/core

Bug Fixes

  • Improved the advanced.database.validateSchema documentation to explain when validation runs and which adapters skip it (#12480)
  • Fixed requireMcpAuth returning a 500 on runtimes that block requests to their own hostname, such as a single Cloudflare Worker (#12501)

For detailed changes, see CHANGELOG

@better-auth/electron

... (truncated)

Changelog

Sourced from @​better-auth/cimd's changelog.

1.7.23

1.7.22

1.7.21

1.7.20

1.7.19

Commits

Updates @better-auth/core from 1.7.18 to 1.7.23

Release notes

Sourced from @​better-auth/core's releases.

v1.7.23

[!IMPORTANT] Action required

  • If you want requireMcpAuth to keep fetching signing keys over HTTP, set jwksUrl. (#12501)
  • If your CORS layer sets its own Access-Control-Expose-Headers, include WWW-Authenticate in it. (#12521)
  • If you run createMcpProtectedRequestHandler in a multi-instance or serverless deployment, set dpop.replayStore to a shared store such as createDpopReplayStore(internalAdapter). (#12504)

better-auth

Bug Fixes

  • Fixed getTestInstance sharing one MongoDB database across test files, so parallel tests no longer delete each other's data (#12543)

For detailed changes, see CHANGELOG

@better-auth/mcp

Bug Fixes

  • Improved the dpop.replayStore documentation on createMcpProtectedRequestHandler to explain the in-memory default and when to use a shared store (#12504)
  • Fixed requireMcpAuth to accept tokens when the JWT plugin publishes its keys at jwks.remoteUrl (#12501)
  • Fixed requireMcpAuth returning a 500 on runtimes that block requests to their own hostname, such as a single Cloudflare Worker (#12501)
  • Fixed cross-origin browser clients being unable to read WWW-Authenticate challenges from OAuth resource servers and MCP helpers (#12521)
  • Fixed OAuth resource servers to answer DPoP requests lacking a required scope with a DPoP insufficient_scope challenge instead of Bearer (#12525)

For detailed changes, see CHANGELOG

@better-auth/oauth-provider

Bug Fixes

  • Fixed cross-origin browser clients being unable to read WWW-Authenticate challenges from OAuth resource servers and MCP helpers (#12521)
  • Fixed protected resource requests using an unsupported authorization scheme or no scheme to receive a Bearer challenge with resource_metadata (#12515)
  • Fixed OAuth resource servers to answer DPoP requests lacking a required scope with a DPoP insufficient_scope challenge instead of Bearer (#12525)
  • Fixed OAuth token requests that fail PKCE, redirect_uri, resource, or DPoP validation consuming the authorization or device code (#12499)
  • Added a warning in the OAuth provider when two extensions contribute the same discovery metadata key (#12500)

For detailed changes, see CHANGELOG

@better-auth/core

Bug Fixes

  • Improved the advanced.database.validateSchema documentation to explain when validation runs and which adapters skip it (#12480)
  • Fixed requireMcpAuth returning a 500 on runtimes that block requests to their own hostname, such as a single Cloudflare Worker (#12501)

For detailed changes, see CHANGELOG

@better-auth/electron

... (truncated)

Changelog

Sourced from @​better-auth/core's changelog.

1.7.23

Patch Changes

  • #12501 cfa73e9 Thanks @​gustavovalverde! - requireMcpAuth now reads the signing keys from the auth instance instead of requesting its own /jwks endpoint, so MCP routes served from the same app as the auth server no longer fail with a 500 on runtimes that block requests to their own hostname, such as a single Cloudflare Worker.

    Set jwksUrl to keep fetching the keys over HTTP.

  • #12480 c10b35d Thanks @​gustavovalverde! - The advanced.database.validateSchema JSDoc now says validation runs when the auth instance is first used, and that adapters other than Kysely, Drizzle, and Prisma skip it with a log message.

1.7.22

Patch Changes

  • #12333 6536174 Thanks @​bytaesu! - Fix getSession failing with "Failed to get session" when a user.additionalFields entry references a table outside the Better Auth schema, including with database joins enabled on Drizzle and Prisma. Join resolution now matches references.model against schema keys only.

  • #12432 262adc0 Thanks @​gustavovalverde! - Reject introspected access tokens that fail claim validation with a 401 UNAUTHORIZED error. When remoteVerify introspection reported an active token whose aud, iss, exp, or nbf claim did not pass the configured checks, verifyBearerToken and verifyAccessTokenRequest threw a plain Error, so resource servers answered with a 500 instead of a WWW-Authenticate challenge. Expired tokens now report token expired and other claim failures report invalid access token, matching local JWKS verification.

  • #12445 e9d8e59 Thanks @​gustavovalverde! - Resource-server challenges no longer turn a rejected request into a 500, and they now tell clients when the token they sent is invalid.

    createResourceServerChallenge used to throw when an error_description contained a character that RFC 6750 does not allow in that parameter. Better Auth's own DPoP message DPoP proof typ must be "dpop+jwt" was one of them. The description is now fitted into the allowed characters: " becomes ', other disallowed characters become spaces, and an empty result is left out. Invalid scope tokens in challengeScopes still throw.

    When the request presented a token that failed verification, the 401 Bearer challenge now carries error="invalid_token" and an error_description, following RFC 6750 §3 and §3.1. A request without a token still gets no error code. verifyBearerToken and verifyAccessTokenRequest now set error: "invalid_token" and error_description on their expired, invalid, inactive, and unreadable token errors, and the challenge's response body includes both fields alongside message.

1.7.21

Patch Changes

  • #12126 4739122 Thanks @​hardikguptaofficialgit! - On Prisma with MongoDB, when your id columns use @db.ObjectId, magic link and email OTP sign-in for users with an unverified email no longer fail with a 500 (Malformed ObjectID). SAML sign-in, DPoP-bound OAuth requests, and private_key_jwt client authentication are fixed the same way, and Sign-In with Ethereum now keeps the email the user supplied instead of a placeholder. Setups with plain String id columns and other databases are unaffected.

  • #12401 c3a94c5 Thanks @​gustavovalverde! - Generic OAuth providers configured with authorizationHeaders now send those headers when refreshing an access token, not only when exchanging the authorization code. Before, a provider whose token endpoint requires one of those headers accepted the sign-in but rejected every refresh. Providers without authorizationHeaders are unaffected.

    refreshAccessToken and refreshAccessTokenRequest from @better-auth/core/oauth2 accept an optional headers input for providers that need extra headers on refresh. Client authentication headers still take precedence over it.

    Extra headers whose names differ only in case from a client authentication header, such as Authorization with authentication: "basic", no longer produce a combined, invalid header on the code exchange or refresh. Client authentication replaces them, including headers a custom tokenEndpointAuth hook sets in any casing.

  • #11716 1a79da5 Thanks @​bytaesu! - Authentication requests no longer hang on Cloudflare Workers when the request that started schema validation ends before validation finishes. On Workers, each request now runs its own schema lookup until one completes.

  • #12402 2d10ae7 Thanks @​gustavovalverde! - With advanced.database.generateId: "serial", filtering an id or reference field with null now compares it with null. Before, the null became 0, so eq null matched no row and, on the memory adapter, ne null also matched rows where the field was unset.

  • #12425 ef4d4f7 Thanks @​bytaesu! - Telemetry now reports Cloudflare Workers as workerd instead of node when nodejs_compat is enabled. @better-auth/core/env exports the runtime detection it uses.

1.7.20

Patch Changes

  • #11904 a3f50d0 Thanks @​gustavovalverde! - OAuth provider deployments served over plain HTTP on a private network, such as a LAN address, a VPN, or a private DNS name, can now accept http redirect URIs through the new allowInsecureRedirectUri option. Return true from it for origins you control. The same option lets web clients use localhost callbacks during development. Without the option, redirect URI validation is unchanged.

    If your issuer (baseURL, or jwt.issuer when set) uses http on a non-loopback host, discovery and the iss authorization response parameter now report it as configured instead of rewriting it to https. They now match the issuer in issued tokens, so OpenID Connect sign-ins no longer fail on the mismatch. If a proxy terminates TLS in front of Better Auth, set baseURL to the public https URL.

... (truncated)

Commits
  • f39e6c6 chore: release v1.7.23 (#12493)
  • cfa73e9 fix(mcp): resolve requireMcpAuth signing keys without a self-request (#12501)
  • c10b35d docs: correct schema validation, telemetry, and DPoP challenge notes (#12480)
  • 3a03cbe refactor: remove non-null assertions the type checker already proves (#12474)
  • 116c868 chore: release v1.7.22 (#12435)
  • 6536174 fix(db): ignore references to app tables when resolving joins (#12333)
  • bbddc3c refactor(oauth2): share parseStringBoolean across providers (#12450)
  • e9d8e59 fix(oauth-provider): keep resource challenges valid and report invalid_token ...
  • 262adc0 fix(core): reject introspected tokens that fail claim checks with 401 (#12432)
  • b237924 chore: release v1.7.21 (#12384)
  • Additional commits viewable in compare view

Updates @better-auth/mcp from 1.7.18 to 1.7.23

Release notes

Sourced from @​better-auth/mcp's releases.

v1.7.23

[!IMPORTANT] Action required

  • If you want requireMcpAuth to keep fetching signing keys over HTTP, set jwksUrl. (#12501)
  • If your CORS layer sets its own Access-Control-Expose-Headers, include WWW-Authenticate in it. (#12521)
  • If you run createMcpProtectedRequestHandler in a multi-instance or serverless deployment, set dpop.replayStore to a shared store such as createDpopReplayStore(internalAdapter). (#12504)

better-auth

Bug Fixes

  • Fixed getTestInstance sharing one MongoDB database across test files, so parallel tests no longer delete each other's data (#12543)

For detailed changes, see CHANGELOG

@better-auth/mcp

Bug Fixes

  • Improved the dpop.replayStore documentation on createMcpProtectedRequestHandler to explain the in-memory default and when to use a shared store (#12504)
  • Fixed requireMcpAuth to accept tokens when the JWT plugin publishes its keys at jwks.remoteUrl (#12501)
  • Fixed requireMcpAuth returning a 500 on runtimes that block requests to their own hostname, such as a single Cloudflare Worker (#12501)
  • Fixed cross-origin browser clients being unable to read WWW-Authenticate challenges from OAuth resource servers and MCP helpers (#12521)
  • Fixed OAuth resource servers to answer DPoP requests lacking a required scope with a DPoP insufficient_scope challenge instead of Bearer (#12525)

For detailed changes, see CHANGELOG

@better-auth/oauth-provider

Bug Fixes

  • Fixed cross-origin browser clients being unable to read WWW-Authenticate challenges from OAuth resource servers and MCP helpers (#12521)
  • Fixed protected resource requests using an unsupported authorization scheme or no scheme to receive a Bearer challenge with resource_metadata (#12515)
  • Fixed OAuth resource servers to answer DPoP requests lacking a required scope with a DPoP insufficient_scope challenge instead of Bearer (#12525)
  • Fixed OAuth token requests that fail PKCE, redirect_uri, resource, or DPoP validation consuming the authorization or device code (#12499)
  • Added a warning in the OAuth provider when two extensions contribute the same discovery metadata key (#12500)

For detailed changes, see CHANGELOG

@better-auth/core

Bug Fixes

  • Improved the advanced.database.validateSchema documentation to explain when validation runs and which adapters skip it (#12480)
  • Fixed requireMcpAuth returning a 500 on runtimes that block requests to their own hostname, such as a single Cloudflare Worker (#12501)

For detailed changes, see CHANGELOG

@better-auth/electron

... (truncated)

Changelog

Sourced from @​better-auth/mcp's changelog.

1.7.23

Patch Changes

  • #12525 06925b3 Thanks @​gustavovalverde! - Answer a DPoP request whose token lacks a required scope with a DPoP challenge. Before, the insufficient_scope 403 always carried a Bearer challenge, even when the client sent a valid DPoP-bound token and proof. The DPoP challenge keeps error="insufficient_scope" and the missing scopes in scope, so the client can still authorize again for them. Like other DPoP challenges, it lists the accepted proof algorithms in algs and has no resource_metadata. A Bearer request still gets the Bearer challenge with resource_metadata. This applies when createResourceServerChallenge receives the failed request, which the resource client's verifyAccessTokenRequest, requireMcpAuth, and createMcpProtectedRequestHandler pass automatically, including for an insufficient_scope error thrown by an MCP tool handler.

  • #12521 7c61c40 Thanks @​gustavovalverde! - Browser clients on another origin can now read resource-server and MCP WWW-Authenticate challenges. createResourceServerChallenge, and the resource client and MCP helpers built on it, now send Access-Control-Expose-Headers: WWW-Authenticate with every Bearer, insufficient_scope, and DPoP challenge. If your CORS layer sets its own Access-Control-Expose-Headers, include WWW-Authenticate in it.

  • #12504 35135c6 Thanks @​gustavovalverde! - The dpop.replayStore JSDoc on createMcpProtectedRequestHandler now says the default store is in memory and safe only for a single long-lived instance, and that multi-instance or serverless deployments should pass a shared store such as createDpopReplayStore(internalAdapter).

  • #12501 cfa73e9 Thanks @​gustavovalverde! - requireMcpAuth now accepts tokens when the JWT plugin publishes its keys at jwks.remoteUrl. It fetches the keys from that URL instead of the auth server's own /jwks endpoint, which the JWT plugin disables in that setup.

  • #12501 cfa73e9 Thanks @​gustavovalverde! - requireMcpAuth now reads the signing keys from the auth instance instead of requesting its own /jwks endpoint, so MCP routes served from the same app as the auth server no longer fail with a 500 on runtimes that block requests to their own hostname, such as a single Cloudflare Worker.

    Set jwksUrl to keep fetching the keys over HTTP.

  • Updated dependencies [b9c259b, 06925b3, 7c61c40, be0d01c, 2959544]:

    • @​better-auth/oauth-provider@​1.7.23

1.7.22

Patch Changes

  • #12447 5976842 Thanks @​gustavovalverde! - Answer a failed request that used the DPoP authorization scheme with a DPoP challenge. Before, an expired, revoked, or otherwise invalid DPoP-bound token got a Bearer challenge, which a client that supports only DPoP might not act on. createResourceServerChallenge accepts a new request option, either the failed Request or { authorizationHeader }, and reads the scheme from it. The resource client's verifyAccessTokenRequest, requireMcpAuth, and createMcpProtectedRequestHandler pass it automatically.

  • Updated dependencies [5976842, e9d8e59, 1393028]:

    • @​better-auth/oauth-provider@​1.7.22

1.7.21

Patch Changes

1.7.20

Patch Changes

1.7.19

Patch Changes

Commits
  • f39e6c6 chore: release v1.7.23 (#12493)
  • cfa73e9 fix(mcp): resolve requireMcpAuth signing keys without a self-request (#12501)
  • 06925b3 fix(oauth-provider): send DPoP insufficient_scope challenges (#12525)
  • 7c61c40 fix(oauth-provider): expose WWW-Authenticate on every resource challenge (#12...
  • 35135c6 docs(mcp): explain the handler's in-memory DPoP replay store (#12504)
  • 116c868 chore: release v1.7.22 (#12435)
  • 5976842 fix(oauth-provider): answer failed DPoP requests with a DPoP challenge (#12447)
  • e9d8e59 fix(oauth-provider): keep resource challenges valid and report invalid_token ...
  • b237924 chore: release v1.7.21 (#12384)
  • 8f4f86b chore: release v1.7.20 (#12379)
  • Additional commits viewable in compare view

Updates @better-auth/oauth-provider from 1.7.18 to 1.7.23

Release notes

Sourced from @​better-auth/oauth-provider's releases.

v1.7.23

[!IMPORTANT] Action required

  • If you want requireMcpAuth to keep fetching signing keys over HTTP, set jwksUrl. (#12501)
  • If your CORS layer sets its own Access-Control-Expose-Headers, include WWW-Authenticate in it. (#12521)
  • If you run createMcpProtectedRequestHandler in a multi-instance or serverless deployment, set dpop.replayStore to a shared store such as createDpopReplayStore(internalAdapter). (#12504)

better-auth

Bug Fixes

  • Fixed getTestInstance sharing one MongoDB database across test files, so parallel tests no longer delete each other's data (#12543)

For detailed changes, see CHANGELOG

@better-auth/mcp

Bug Fixes

  • Improved the dpop.replayStore documentation on createMcpProtectedRequestHandler to explain the in-memory default and when to use a shared store (#12504)
  • Fixed requireMcpAuth to accept tokens when the JWT plugin publishes its keys at jwks.remoteUrl (#12501)
  • Fixed requireMcpAuth returning a 500 on runtimes that block requests to their own hostname, such as a single Cloudflare Worker (#12501)
  • Fixed cross-origin browser clients being unable to read WWW-Authenticate challenges from OAuth resource servers and MCP helpers (#12521)
  • Fixed OAuth resource servers to answer DPoP requests lacking a required scope with a DPoP insufficient_scope challenge instead of Bearer (#12525)

For detailed changes, see CHANGELOG

@better-auth/oauth-provider

Bug Fixes

  • Fixed cross-origin browser clients being unable to read WWW-Authenticate challenges from OAuth resource servers and MCP helpers (#12521)
  • Fixed protected resource requests using an unsupported authorization scheme or no scheme to receive a Bearer challenge with resource_metadata (#12515)
  • Fixed OAuth resource servers to answer DPoP requests lacking a required scope with a DPoP insufficient_scope challenge instead of Bearer (#12525)
  • Fixed OAuth token requests that fail PKCE, redirect_uri, resource, or DPoP validation consuming the authorization or device code (#12499)
  • Added a warning in the OAuth provider when two extensions contribute the same discovery metadata key (#12500)

For detailed changes, see CHANGELOG

@better-auth/core

Bug Fixes

  • Improved the advanced.database.validateSchema documentation to explain when validation runs and which adapters skip it (#12480)
  • Fixed requireMcpAuth returning a 500 on runtimes that block requests to their own hostname, such as a single Cloudflare Worker (#12501)

For detailed changes, see CHANGELOG

@better-auth/electron

... (truncated)

Changelog

Sourced from @​better-auth/oauth-provider's changelog.

1.7.23

Patch Changes

  • #12499 b9c259b Thanks @​gustavovalverde! - A token request that fails validation no longer uses up its authorization code or approved device code. Before, the code was consumed before the code_verifier, redirect_uri, resource, and DPoP proof were checked, so a client that retried with a corrected request got invalid_grant and the user had to sign in or approve the device again. Codes are now consumed only after the request passes validation. A DPoP proof whose jti was already used is still detected after the code is consumed, so that request uses up the code and returns invalid_dpop_proof, as before. Codes stay single-use, and an authorization code presented after redemption still revokes the tokens issued from it.

  • #12525 06925b3 Thanks @​gustavovalverde! - Answer a DPoP request whose token lacks a required scope with a DPoP challenge. Before, the insufficient_scope 403 always carried a Bearer challenge, even when the client sent a valid DPoP-bound token and proof. The DPoP challenge keeps error="insufficient_scope" and the missing scopes in scope, so the client can still authorize again for them. Like other DPoP challenges, it lists the accepted proof algorithms in algs and has no resource_metadata. A Bearer request still gets the Bearer challenge with resource_metadata. This applies when createResourceServerChallenge receives the failed request, which the resource client's verifyAccessTokenRequest, requireMcpAuth, and createMcpProtectedRequestHandler pass automatically, including for an insufficient_scope error thrown by an MCP tool handler.

  • #12521 7c61c40 Thanks @​gustavovalverde! - Browser clients on another origin can now read resource-server and MCP WWW-Authenticate challenges. createResourceServerChallenge, and the resource client and MCP helpers built on it, now send Access-Control-Expose-Headers: WWW-Authenticate with every Bearer, insufficient_scope, and DPoP challenge. If your CORS layer sets its own Access-Control-Expose-Headers, include WWW-Authenticate in it.

  • #12500 be0d01c Thanks @​gustavovalverde! - The OAuth provider now logs a warning when two extensions contribute the same discovery metadata key. The first-registered extension's value is still the one served, so discovery output is unchanged, but the dropped contribution is no longer silent.

  • #12515 2959544 Thanks @​gustavovalverde! - A protected resource request that uses an unsupported authorization scheme, such as Basic, or sends a token with no scheme, now gets a Bearer challenge with its resource_metadata pointer instead of a DPoP challenge. MCP clients can find the authorization server again from that response.

1.7.22

Patch Changes

  • #12447 5976842 Thanks @​gustavovalverde! - Answer a failed request that used the DPoP authorization scheme with a DPoP challenge. Before, an expired, revoked, or otherwise invalid DPoP-bound token got a Bearer challenge, which a client that supports only DPoP might not act on. createResourceServerChallenge accepts a new request option, either the failed Request or { authorizationHeader }, and reads the scheme from it. The resource client's verifyAccessTokenRequest, requireMcpAuth, and createMcpProtectedRequestHandler pass it automatically.

  • #12445 e9d8e59 Thanks @​gustavovalverde! - Resource-server challenges no longer turn a rejected request into a 500, and they now tell clients when the token they sent is invalid.

    createResourceServerChallenge used to throw when an error_description contained a character that RFC 6750 does not allow in that parameter. Better Auth's own DPoP message DPoP proof typ must be "dpop+jwt" was one of them. The description is now fitted into the allowed characters: " becomes ', other disallowed characters become spaces, and an empty result is left out. Invalid scope tokens in challengeScopes still throw.

    When the request presented a token that failed verification, the 401 Bearer challenge now carries error="invalid_token" and an error_description, following RFC 6750 §3 and §3.1. A request without a token still gets no error code. verifyBearerToken and verifyAccessTokenRequest now set error: "invalid_token" and error_description on their expired, invalid, inactive, and unreadable token errors, and the challenge's response body includes both fields alongside message.

  • #12446 1393028 Thanks @​gustavovalverdeDescription has been truncated

Bumps the better-auth group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [@better-auth/api-key](https://github.com/better-auth/better-auth/tree/HEAD/packages/api-key) | `1.7.18` | `1.7.23` |
| [@better-auth/cimd](https://github.com/better-auth/better-auth/tree/HEAD/packages/cimd) | `1.7.18` | `1.7.23` |
| [@better-auth/core](https://github.com/better-auth/better-auth/tree/HEAD/packages/core) | `1.7.18` | `1.7.23` |
| [@better-auth/mcp](https://github.com/better-auth/better-auth/tree/HEAD/packages/mcp) | `1.7.18` | `1.7.23` |
| [@better-auth/oauth-provider](https://github.com/better-auth/better-auth/tree/HEAD/packages/oauth-provider) | `1.7.18` | `1.7.23` |
| [better-auth](https://github.com/better-auth/better-auth/tree/HEAD/packages/better-auth) | `1.7.18` | `1.7.23` |
| [@better-auth/kysely-adapter](https://github.com/better-auth/better-auth/tree/HEAD/packages/kysely-adapter) | `1.7.18` | `1.7.23` |


Updates `@better-auth/api-key` from 1.7.18 to 1.7.23
- [Release notes](https://github.com/better-auth/better-auth/releases)
- [Changelog](https://github.com/better-auth/better-auth/blob/main/packages/api-key/CHANGELOG.md)
- [Commits](https://github.com/better-auth/better-auth/commits/v1.7.23/packages/api-key)

Updates `@better-auth/cimd` from 1.7.18 to 1.7.23
- [Release notes](https://github.com/better-auth/better-auth/releases)
- [Changelog](https://github.com/better-auth/better-auth/blob/main/packages/cimd/CHANGELOG.md)
- [Commits](https://github.com/better-auth/better-auth/commits/v1.7.23/packages/cimd)

Updates `@better-auth/core` from 1.7.18 to 1.7.23
- [Release notes](https://github.com/better-auth/better-auth/releases)
- [Changelog](https://github.com/better-auth/better-auth/blob/main/packages/core/CHANGELOG.md)
- [Commits](https://github.com/better-auth/better-auth/commits/v1.7.23/packages/core)

Updates `@better-auth/mcp` from 1.7.18 to 1.7.23
- [Release notes](https://github.com/better-auth/better-auth/releases)
- [Changelog](https://github.com/better-auth/better-auth/blob/main/packages/mcp/CHANGELOG.md)
- [Commits](https://github.com/better-auth/better-auth/commits/v1.7.23/packages/mcp)

Updates `@better-auth/oauth-provider` from 1.7.18 to 1.7.23
- [Release notes](https://github.com/better-auth/better-auth/releases)
- [Changelog](https://github.com/better-auth/better-auth/blob/main/packages/oauth-provider/CHANGELOG.md)
- [Commits](https://github.com/better-auth/better-auth/commits/v1.7.23/packages/oauth-provider)

Updates `better-auth` from 1.7.18 to 1.7.23
- [Release notes](https://github.com/better-auth/better-auth/releases)
- [Changelog](https://github.com/better-auth/better-auth/blob/main/packages/better-auth/CHANGELOG.md)
- [Commits](https://github.com/better-auth/better-auth/commits/v1.7.23/packages/better-auth)

Updates `@better-auth/kysely-adapter` from 1.7.18 to 1.7.23
- [Release notes](https://github.com/better-auth/better-auth/releases)
- [Changelog](https://github.com/better-auth/better-auth/blob/main/packages/kysely-adapter/CHANGELOG.md)
- [Commits](https://github.com/better-auth/better-auth/commits/v1.7.23/packages/kysely-adapter)

---
updated-dependencies:
- dependency-name: "@better-auth/api-key"
  dependency-version: 1.7.23
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: better-auth
- dependency-name: "@better-auth/cimd"
  dependency-version: 1.7.23
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: better-auth
- dependency-name: "@better-auth/core"
  dependency-version: 1.7.23
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: better-auth
- dependency-name: "@better-auth/mcp"
  dependency-version: 1.7.23
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: better-auth
- dependency-name: "@better-auth/oauth-provider"
  dependency-version: 1.7.23
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: better-auth
- dependency-name: better-auth
  dependency-version: 1.7.23
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: better-auth
- dependency-name: "@better-auth/kysely-adapter"
  dependency-version: 1.7.23
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: better-auth
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Nov 17, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants