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

422 HTTP code on provider selection #41

Open
nsklikas opened this issue Jun 15, 2023 · 1 comment
Open

422 HTTP code on provider selection #41

nsklikas opened this issue Jun 15, 2023 · 1 comment

Comments

@nsklikas
Copy link
Contributor

When the user gets redirected to the login page, they are presented with a set of providers to choose from. When they click on a provider, an XHR request is done to the /self-service/login endpoint. The backend responds with a 422 code and a URL to redirect to (the authn endpoint).

This happens because the application type we send is application/json, if the application type is changed to application/x-www-form-urlencoded, the status code should change to 303. It is not enough to add that content type to the frontend headers, as the ory go client does not allow us to set the content type when making the request (at least I couldn't figure out how to do it).

We could handle this in the backend (ie convert the 422 to a 303 as long as the response body is valid).

@schrute08
Copy link

Absolutely, could you assign me this issue, I'm new to this ecosystem, would love to contribute!

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

No branches or pull requests

2 participants