Skip to content

Conversation

anatoly314
Copy link

Summary

  • Fixed OAuth scope selection bug where Inspector was requesting all scopes from the authorization server instead of using resource server scopes
  • This caused failures with dynamic OAuth clients that don't have access to all authorization server scopes (e.g., public_metadata, private_metadata)

Changes

  • Modified the authorization_redirect step in oauth-state-machine.ts to prefer resource server scopes over authorization server scopes
  • This matches the existing behavior in the client_registration step

Test plan

  • Tested with OAuth server that has additional scopes not available to dynamic clients
  • Verified that Inspector now requests only the scopes supported by the resource server
  • OAuth flow completes successfully without scope-related errors

🤖 Generated with Claude Code

anatoly314 and others added 2 commits August 12, 2025 23:34
Inspector was incorrectly requesting all scopes from the authorization server's metadata instead of using the resource server's supported scopes. This caused issues with dynamic OAuth clients that don't have access to all authorization server scopes (like public_metadata and private_metadata).

The fix ensures that during the authorization redirect step, we prefer the resource server's scopes_supported over the authorization server's scopes, matching the behavior already present in the client registration step.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@olaservo
Copy link
Member

Hi, thank you for the PR! It looks like a fix was included in this PR: #701

So I'm going to go ahead and close this one.

@olaservo olaservo closed this Aug 29, 2025
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