Handle new hydra login API issue#62
Open
basile-henry wants to merge 1 commit into
Open
Conversation
nlewo
reviewed
Oct 3, 2021
| 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 |
Owner
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
Oh nice, I didn't see that part of the reqwest API 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Login started failing with the latest version of
hydra. For some reasonhydranow returns a302that redirects to a500when login in. I guess that's not an issue for the web frontend that probably dismisses the redirect, unfortunatelyreqwestfollows it.