acceptable-rain-21944
01/10/2025, 10:31 AMUnprocessable Entity
status code 422 when submitting a password recovery code during the recovery flowbrief-egg-61061
01/10/2025, 10:31 AMbrief-egg-61061
01/10/2025, 10:31 AMjson { error: { id: "browser_location_change_required", code: 422, status: "Unprocessable Entity", reason: "In order to complete this flow please redirect the browser to: /ui/login?flow=ad574ad7-1a3c-4b52-9f54-ef9e866f3cec", message: "browser location change required", }, redirect_browser_to: "/ui/login?flow=ad574ad7-1a3c-4b52-9f54-ef9e866f3cec", }
For SPAs, instead of performing a redirect, you can extract the new flow ID from the payload and retrieve the response in the background. This allows you to handle the flow continuation without a full page reload. To resolve this issue in your recovery flow: 1. When you receive a 422 status code, check for the redirect_browser_to
field in the response. 2. Extract the new flow ID from this URL. 3. Use this new flow ID to make a new request to continue the recovery process. Remember, this error is part of Ory's flow management and is designed to ensure that the recovery process remains secure and up-to-date. It's not necessarily an indication of an error in your input, but rather a signal that the flow needs to be refreshed. If you need more specific guidance on implementing this in your code, please provide more details about your implementation environment (e.g., the programming language or framework you're using).acceptable-rain-21944
01/10/2025, 10:33 AMbrief-egg-61061
01/10/2025, 10:33 AMbrief-egg-61061
01/10/2025, 10:33 AM