Hello, everyone. I need a little help implementing...
# ory-network
c
Hello, everyone. I need a little help implementing the Self Service Recovery Flow with my own UI. I am able to send the link with the code and send the recovery code, it is returning a cookie, but with a 422 "browser_location_change_required". Could someone help me with the correct steps to manage this flow? Thanks!
p
Hi @chilly-memory-85439 On server side rendered application you need to follow the URL inside the payload on status 422 and it will redirect you back with a new flowid, get the form data with that flow id and then you should continue normally. on browser (spa) rendered you can extract the url get the flow id from the url and refetch the flow data from the server. The flow data contains the new form data which you use to re-render the form with.
c
Thanks, so I am using an SPA. I did what you recommended, and after the 422 I get the flow again and redirect accordingly on flow.state === 'passed_challenge'. Is the 422 an expected response?