-
Notifications
You must be signed in to change notification settings - Fork 382
fix(oauth): three oauth discovery and registration issues #489
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
base: main
Are you sure you want to change the base?
fix(oauth): three oauth discovery and registration issues #489
Conversation
pub client_id: String, | ||
pub client_secret: Option<String>, | ||
pub client_name: String, | ||
pub client_name: Option<String>, |
There was a problem hiding this comment.
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

Ok(None) | ||
} | ||
|
||
async fn fetch_resource_metadata_url(&self) -> Result<Option<Url>, AuthError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ce3df3a
to
73d4574
Compare
Ok(token) => token, | ||
Err(RequestTokenError::Parse(_, body)) => { | ||
match serde_json::from_slice::<OAuthTokenResponse>(&body) { | ||
Ok(parsed) => { |
There was a problem hiding this comment.
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
73d4574
to
8704262
Compare
8704262
to
a415b2e
Compare
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
Checklist