-
Notifications
You must be signed in to change notification settings - Fork 12
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
Allow response_mode to be null and if so do not add the query param #3700
base: main
Are you sure you want to change the base?
Conversation
fdd796d
to
8c59ebe
Compare
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.
Just a few style points, otherwise looks good!
@@ -235,13 +235,17 @@ pub async fn config_sync( | |||
} | |||
}; | |||
|
|||
let response_mode = match provider.response_mode { |
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.
Using provider.response_mode.map(…)
would help simplify this
mode => Ok(mode), | ||
} | ||
} else { | ||
Ok(M::Fragment) |
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's unclear to me why this has to change? This code is for the client -> MAS login part, and it is spec-compliant, nothing to do with the upstream provider stuff
method => { | ||
return Err(RouteError::InvalidReqMethod { method }); |
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.
This should never happen, the route is installed as POST and GET handler anyway
let html = templates.render_form_post(&context)?; | ||
return Ok(Html(html).into_response()); | ||
} | ||
match method { |
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.
I'm finding the old single match on the tuple easier to read. Could you go back to using that?
@@ -0,0 +1 @@ | |||
ALTER TABLE "upstream_oauth_providers" ALTER COLUMN "response_mode" DROP NOT NULL; |
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.
Can you add the copyright header + a short description of what this migration does?
No description provided.