Hey guys, morning! I'm trying to complete a LoginF...
# talk-kratos
c
Hey guys, morning! I'm trying to complete a LoginFlow using the method
submitSelfServiceLoginFlow
but I'm receiving a 400 status code always and I don't know why 😕 This is my code:
Copy code
const onSubmit = (payload: any) => {
    oryClientWeb
      .submitSelfServiceLoginFlow(
        String(flowData.id),
        {
          csrf_token: flowData.ui.nodes[0]?.attributes?.value,
          identifier: payload.username,
          password: payload.password,
          method: 'password',
        },
        undefined,
        undefined,
        {
          headers: {
            'Content-Type': 'application/json',
          },
        }
      )
      .then(({ data }) => console.log(data))
      .catch((err) => console.log('err', err));
  };
and then, Ory cloud is responding to me with a 400 HTTP code 😕 I'm not sure what's happening, some help?
h
Hey, you need to make the request against your custom hostname, or if you run on local the ory tunnel. You can find an example of that here. More info: https://www.ory.sh/docs/security-model https://www.ory.sh/docs/guides/protect-page-login/vue