<@U0529CPT4LF> use axios request .ory/kratos/publ...
# talk-kratos
h
@helpful-piano-29770 use axios request .ory/kratos/public/self-service/login/browser and send with credential true , first genereate csrf token then submit axios post requests .
h
we can use only html form with action and this form has a field csrf token
@helpful-eve-46197 seems like it goes to error page when csrf token error occurs, but other errors like invalid creds doesn't evoke it
h
can you share your requests code please
h
@helpful-eve-46197 const submitEndpoint = flow?.id ?
${KRATOS_BASE_URL}/self-service/login?flow=${flow?.id}
: `${KRATOS_BASE_URL}/self-service/login`; ... <form action={submitEndpoint} method="POST"> <input type="text" name="identifier" /> <input type="password" name="password" /> <input type="text" name="method" defaultValue="password" /> <input type="text" name="csrf_token" defaultValue={csrfToken} /> <input type="submit" /> </form> smth like this