Skip to content

feat: backport discoverOAuthServerInfo() and discovery caching to v1.x#1533

Merged
felixweinberger merged 1 commit intov1.xfrom
fweinberger/v1x-expose-auth-discovery
Feb 13, 2026
Merged

feat: backport discoverOAuthServerInfo() and discovery caching to v1.x#1533
felixweinberger merged 1 commit intov1.xfrom
fweinberger/v1x-expose-auth-discovery

Conversation

@felixweinberger
Copy link
Contributor

Backport of #1527 to v1.x.

Changes

  • Added discoverOAuthServerInfo() function that combines RFC 9728 protected resource metadata discovery with authorization server metadata discovery into a single call
  • Added OAuthServerInfo and OAuthDiscoveryState interfaces for structured discovery results
  • Added saveDiscoveryState() and discoveryState() optional methods to OAuthClientProvider for caching discovery results across sessions
  • Added 'discovery' scope to invalidateCredentials() for clearing cached discovery state
  • The auth() orchestrator now uses cached discovery state when available, reducing redundant HTTP requests on subsequent calls
  • Added TODOs for authorizationServerMetadataUrl and resourceMetadataUrl capture gaps

Testing

All 130 existing + new auth tests pass.

@felixweinberger felixweinberger requested review from a team as code owners February 13, 2026 18:10
@changeset-bot
Copy link

changeset-bot bot commented Feb 13, 2026

⚠️ No Changeset found

Latest commit: d314137

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@felixweinberger felixweinberger marked this pull request as draft February 13, 2026 18:11
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 13, 2026

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/sdk@1533

commit: d314137

@felixweinberger felixweinberger force-pushed the fweinberger/v1x-expose-auth-discovery branch from 040c7fb to 5141034 Compare February 13, 2026 18:14
Backport of PR #1527 from main to v1.x:
- Add discoverOAuthServerInfo() combining RFC 9728 + AS metadata discovery
- Add OAuthServerInfo and OAuthDiscoveryState interfaces
- Add saveDiscoveryState()/discoveryState() to OAuthClientProvider
- Add 'discovery' scope to invalidateCredentials()
- Update auth() orchestrator to use cached discovery state
- Add comprehensive tests for new functionality
@felixweinberger felixweinberger force-pushed the fweinberger/v1x-expose-auth-discovery branch from 5141034 to d314137 Compare February 13, 2026 18:15
@felixweinberger felixweinberger marked this pull request as ready for review February 13, 2026 18:16
@felixweinberger felixweinberger merged commit 825e9ab into v1.x Feb 13, 2026
9 checks passed
@felixweinberger felixweinberger deleted the fweinberger/v1x-expose-auth-discovery branch February 13, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants