Skip to content

Conversation

@patvice
Copy link
Owner

@patvice patvice commented Nov 23, 2025

Add OAuth authentication challenge handling with automatic retry

  • Add handle_authentication_challenge hooks to OAuthProvider and BrowserOAuthProvider
  • Implement automatic token refresh and retry logic in StreamableHTTP and SSE transports
  • Parse WWW-Authenticate headers to extract scope and resource metadata URLs
  • Add infinite loop prevention guards to prevent repeated auth attempts
  • Add comprehensive test coverage for all new authentication flows

This brings Ruby OAuth handling closer to parity with spec (typescript client can be used as a reference in this case),
enabling automatic authentication retry on 401 responses without manual intervention.

- Add handle_authentication_challenge hooks to OAuth providers
- Implement automatic retry logic in StreamableHTTP and SSE transports
- Parse WWW-Authenticate headers for scope and resource metadata
- Add infinite loop prevention guards
- Add comprehensive test coverage

Brings Ruby OAuth handling closer to parity with TypeScript client.
@patvice patvice merged commit 92d4f4c into main Nov 24, 2025
4 checks passed
@patvice patvice deleted the oauth-challenge-handling branch November 24, 2025 20:30
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