Skip to content

Conversation

gpeal
Copy link
Contributor

@gpeal gpeal commented Oct 18, 2025

Motivation and Context

While trying to get Supabase to login as part of openai/codex#5254, I encountered three separate oauth issues. Comments are inline

How Has This Been Tested?

Logged in to the Supabase MCP with Codex for the first time.
Sanity checked Linear, Notion, and Todoist and verified that they all still work.

Breaking Changes

None

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

@github-actions github-actions bot added T-core Core library changes T-transport Transport layer changes labels Oct 18, 2025
pub client_id: String,
pub client_secret: Option<String>,
pub client_name: String,
pub client_name: Option<String>,
Copy link
Contributor Author

@gpeal gpeal Oct 18, 2025

Choose a reason for hiding this comment

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

It is recommended but not required to send client_name

https://datatracker.ietf.org/doc/html/rfc7591

CleanShot 2025-10-17 at 21 38 00

Ok(None)
}

async fn fetch_resource_metadata_url(&self) -> Result<Option<Url>, AuthError> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gpeal gpeal force-pushed the gpeal/www-authenticate-header branch from ce3df3a to 73d4574 Compare October 18, 2025 00:49
Ok(token) => token,
Err(RequestTokenError::Parse(_, body)) => {
match serde_json::from_slice::<OAuthTokenResponse>(&body) {
Ok(parsed) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Parse errors can happen during successful token exchanges

https://github.com/ramosbugs/oauth2-rs/blob/main/src/error.rs#L125

@gpeal gpeal force-pushed the gpeal/www-authenticate-header branch from 73d4574 to 8704262 Compare October 18, 2025 00:53
@github-actions github-actions bot added the T-examples Example code changes label Oct 18, 2025
@gpeal gpeal force-pushed the gpeal/www-authenticate-header branch from 8704262 to a415b2e Compare October 18, 2025 00:55
@gpeal gpeal changed the title fix(oauth): Three oauth discovery and registration issues fix(oauth): three oauth discovery and registration issues Oct 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-core Core library changes T-examples Example code changes T-transport Transport layer changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant