Skip to content

fix: quick oauth flow could not transition to token_request due to missing server metadata #407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kamal
Copy link

@kamal kamal commented May 14, 2025

Motivation and Context

I was testing the new auth debugger and noticed the Quick OAuth Flow would fail to transition due to it missing the server metadata.

Fixed by:

  1. Adding explicit metadata discovery before the auth call
  2. Saving the metadata to the provider
  3. Adding tests for the quick OAuth flow to prevent future regressions

How Has This Been Tested?

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@kamal
Copy link
Author

kamal commented May 14, 2025

@pcarleton great work on the Auth Debugger. I was taking it for a spin today when I noticed this issue. Once this is fixed, I noticed that the quick flow still waits for me to press continue on the "Token Request" step (now it passes - previously it would error with unable to transition). Is this a deliberate choice or should it complete all steps to completion?

Copy link
Contributor

@pcarleton pcarleton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @kamal

re: quick flow stopping before token fetching, it's known but not necessarily intentional. It's a side effect of the callback handling being shared between the two flows.

My ideal is that the quick flow goes through the same state machine as the step-by-step flow, but doesn't ask confirmation between steps, but I haven't found time to get that working.

Your change adds more special handling for the quick flow which we'd delete in that case, but that seems fine to add until we get it on the state machine.

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