Skip to content

Handle new hydra login API issue#62

Open
basile-henry wants to merge 1 commit into
nlewo:masterfrom
basile-henry:login-no-redirect
Open

Handle new hydra login API issue#62
basile-henry wants to merge 1 commit into
nlewo:masterfrom
basile-henry:login-no-redirect

Conversation

@basile-henry

Copy link
Copy Markdown
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.

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
Copy Markdown
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
Copy Markdown
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