<@U04UQ68083H> To complete a login flow with krato...
# ory-copilot
b
@chilly-king-10285 To complete a login flow with kratos I understand that you need to
POST /self-service/login
. Is it possible to perform this as a
GET
with query parameters instead of
POST
with body such that it can be used in a
303
redirect?
b
A message from kapa.ai
No, it is not possible to complete a login flow with Ory Kratos using a
GET
request with query parameters. The login flow must be completed using a
POST
request to the
/self-service/login
endpoint. This is clearly specified in the documentation and API references: - The endpoint to complete a login flow is
POST /self-service/login
. The API expects the login data (such as credentials and CSRF token) to be sent in the request body, either as
application/json
or
application/x-www-form-urlencoded
for browser flows. The response behavior (redirect or JSON) depends on the request headers and content type, but the method must be
POST
 [Kratos API Reference](https://raw.githubusercontent.com/ory/kratos/master/spec/api.json), [Submit flows](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#submit-flows). - The use of
GET
with query parameters is not supported for submitting user credentials or completing the login flow.
GET
is only used to initialize or fetch the state of a flow, not to submit sensitive data. - The 303 redirect behavior is used by Kratos to redirect the browser to the login UI or to the post-login URL after a successful
POST
submission, but not to submit the login credentials themselves. The actual submission of credentials must always be a
POST
 [Kratos API Reference](https://raw.githubusercontent.com/ory/kratos/master/spec/api.json). In summary, you cannot use a
GET
request with query parameters to complete a login flow; you must use a
POST
request with the required data in the body.