Subject: Issue with Account Recovery Feature in Re...
# general
b
Subject: Issue with Account Recovery Feature in React Native App using Ory Kratos - 422 Error on Verification Code Submission Hi everyone, I'm currently working on implementing an account recovery feature in my React Native application and using Ory Kratos for this purpose. I have been following the example provided in the Ory documentation. However, I'm encountering an issue where the app throws a 422 error when I submit the verification code. Here are some details about my setup: • Library:
@ory/kratos-client
• Error: 422 Unprocessable Entity Here is a snippet of the relevant code:
Copy code
async function initializeFlow(): Promise<void> {
    await kratosClient
      .createNativeRecoveryFlow()
      .then(({ data: flow }) => flow)
      .then(setFlow)
      .catch((err) => {
        console.log(err);
      });
  }  

useFocusEffect(
    useCallback(() => {
      initializeFlow();

      return () => {
        setFlow(undefined);
      };
    }, [kratosClient])
  );
I would like to know: 1. Is it possible to resolve this issue using
@ory/kratos-client
, ? 2. Has anyone encountered a similar issue and found a solution or workaround? 3. Any specific configurations or steps I might be missing? Any help or guidance would be greatly appreciated! Thanks in advance!
d
what version of Kratos are you running?
b
"@ory/kratos-client": "^1.1.0",
s
Please see https://ory-community.slack.com/archives/C02MR4DEEGH/p1716834432187819 for details on the continue_with transitions tl;dr this error is expected and you should use the payload to continue the flow with some action(s)
b
Actually I am using the self hosted ory kratos
s
The same applies
b
i had gone through the thread, i saw some configuration to be updated in ory console, since i am using the self hosted docker image, i am not sure how to access that. I have kratos.yaml configured
i followed this issue https://github.com/ory/kratos/discussions/2959 and upgraded to kratos 1.1 but now i get 400 bad request error after submitting my email on the recovery screen
g
Hey team, i have a similar error in the self-hosted nextjs and kratos. After recovering an account with 2fa enabled. I see in kratos this error
Copy code
time=2024-06-01T21:10:26Z level=error msg=An error occurred and is being forwarded to the error user interface. audience=application error=map[debug: message:The request was malformed or contained invalid parameters reason:AAL2 login via code requires the `via` query parameter stack_trace: