Skip to content
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

Handle new hydra login API issue #62

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

Conversation

basile-henry
Copy link
Contributor

Login started failing with the latest version of hydra. For some reason hydra now returns a 302 that redirects to a 500 when login in. I guess that's not an issue for the web frontend that probably dismisses the redirect, unfortunately reqwest follows it.

@@ -151,6 151,10 @@ impl HydraClient for Client {
Ok(r) => {
if r.status().is_success() {
Ok(())
} else if r.status() == 500 {
// New hydra gives a 302 redirect to a page that ends up with a 500
// Ideally we would not follow the redirect
Copy link
Owner

Choose a reason for hiding this comment

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

It seems to be possible to not follow redirect (https://docs.rs/reqwest/0.10.3/reqwest/redirect/struct.Policy.html#method.none). I think it would be a bit better than returning Ok on 500.
Also, we could ask Hydra people about this behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh nice, I didn't see that part of the reqwest API 👍

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