Uh oh!
There was an error while loading. Please reload this page.
Fixes for oauth expiry and scopes - #9
Conversation
…textprotocol#731) * fix: include granted scopes in OAuth refresh token request * docs: document scope forwarding in token refresh flow
This reverts commit 2cd946e.
| // Test URL with single path segment: follow spec priority order | ||
| let base_url = Url::parse("https://auth.example.com/tenant1").unwrap(); | ||
| let urls = AuthorizationManager::generate_discovery_urls(&base_url); | ||
| assert_eq!(urls.len(), 3); | ||
| assert_eq!( | ||
| urls[0].as_str(), | ||
| "https://auth.example.com/.well-known/oauth-authorization-server/tenant1" | ||
| ); | ||
| assert_eq!( | ||
| urls[1].as_str(), | ||
| "https://auth.example.com/.well-known/openid-configuration/tenant1" | ||
| ); | ||
| assert_eq!( | ||
| urls[2].as_str(), | ||
| "https://auth.example.com/tenant1/.well-known/openid-configuration" | ||
| ); |
There was a problem hiding this comment.
i'm a bit worried that this actually breaks some non-spec-compliant MCP servers. i believe that there are some which have /mcp in the server path, but don't include that in any form in the oauth authorization server URL.
which/how many MCP servers did you test with? i think either linear or sentry might break (based on my memory of when i was trying to update us to upstream).
There was a problem hiding this comment.
I tested this with both Sentry and Linear, and it works fine.
I don't think any of the changes in this file change how we handle auth URLs. The majority of the changes are adding tests that cover existing behavior.
I may be misunderstanding though
Pulls in:
Hoping these are sufficient to fix the frequent refresh issues we've been seeing with MCP.
I tested this branch locally against warp-internal to ensure core mcp functionality still works