cool-engine-68327
06/16/2022, 5:38 PMsubmitSelfServiceLoginFlow
but I'm receiving a 400 status code always and I don't know why 😕
This is my 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?high-optician-2097