<@U04UQ68083H> how to stop recovery flow from redi...
# ory-copilot
l
@chilly-king-10285 how to stop recovery flow from redirection to the settings page automatically
c
A message from kapa.ai
The recovery flow in Ory is designed to automatically redirect the user to the settings page upon successful submission. This is part of the built-in flow and is not configurable to be turned off as per the information provided in the extracts. The recovery flow works in conjunction with the settings flow, allowing users to reset their password and update their profile information on the settings page. After the user completes the recovery flow, they are redirected through the settings flow, and upon submission of the settings flow with an updated password, the user is redirected to the
return_to
URL. However, if you want to handle the redirections manually, you might want to consider using the Ory Kratos' Public API or Admin API. When these APIs are used to call the endpoints, the response contains the flow without a redirect. For more details, you can refer to the [Ory API Reference](https://www.ory.sh/docs/reference/api) and the [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
l
@chilly-king-10285 Can I get the session token if I have the settings flow ID?
c
A message from kapa.ai
Yes, you can get the session token if you have the settings flow ID. According to the [Ory API Reference](https://www.ory.sh/docs/reference/api), the
getSettingsFlow
and
updateSettingsFlow
methods accept a settings flow ID as a query parameter. However, please note that the session token is not directly returned by these methods. The session token is usually set after a successful login or session creation and is sent as a header (
X-Session-Token
) in subsequent requests to authenticate the user. Here's an example of how these parameters are used:
Copy code
http GET /self-service/settings/flows?id=<settings-flow-id> X-Session-Token: <session-token>
In this example,
<settings-flow-id>
is the ID of the settings flow and
<session-token>
is the session token of the user. Remember to replace
<settings-flow-id>
and
<session-token>
with your actual settings flow ID and session token. For more information, you can refer to the [Ory Kratos API Reference](https://www.ory.sh/docs/kratos/reference/api).