limited-city-59768
02/06/2024, 3:00 PMchilly-king-10285
02/06/2024, 3:00 PMchilly-king-10285
02/06/2024, 3:01 PMlimited-city-59768
02/06/2024, 3:05 PMchilly-king-10285
02/06/2024, 3:05 PMchilly-king-10285
02/06/2024, 3:05 PM/self-service/recovery/api
endpoint. Here is an example of how to create a recovery flow: bash curl -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -c cookies.txt \ "https://{project.slug}.<http://projects.oryapis.com/self-service/recovery/api|projects.oryapis.com/self-service/recovery/api>"
[source](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#create-recovery-flow) After the recovery flow is successfully completed, you need to manually take the user to the settings page where they can reset their password and update their profile information.limited-city-59768
02/06/2024, 3:08 PMchilly-king-10285
02/06/2024, 3:08 PMchilly-king-10285
02/06/2024, 3:08 PMrecovery_link
with the flow ID and a recovery_code
. The user must access the link and enter the recovery code in the form available at the link. The response also includes an expires_at
field indicating the expiry time of the recovery link. Here is an example of the response: json { "recovery_link": "/ui/recovery?flow=79686c66-e427-4c1b-861e-083572f97964", "recovery_code": "76453943", "expires_at": "2022-10-25T03:09:37.60684766Z" }
After successfully recovering their account, users can connect to a social sign-in provider or create a new password. [source](https://www.ory.sh/docs/kratos/manage-identities/account-recovery#response)limited-city-59768
02/06/2024, 3:11 PMchilly-king-10285
02/06/2024, 3:11 PMchilly-king-10285
02/06/2024, 3:11 PMlimited-city-59768
02/06/2024, 3:12 PMchilly-king-10285
02/06/2024, 3:12 PMchilly-king-10285
02/06/2024, 3:13 PMlimited-city-59768
02/06/2024, 3:14 PMchilly-king-10285
02/06/2024, 3:14 PMchilly-king-10285
02/06/2024, 3:15 PMGET /self-service/recovery/api
Here is the relevant extract from the documentation: "Native applications must use /self-service/recovery/api
." [source](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#recovery)limited-city-59768
02/06/2024, 6:04 PMchilly-king-10285
02/06/2024, 6:04 PMchilly-king-10285
02/06/2024, 6:04 PM/self-service/recovery
endpoint. Here is the relevant extract from the documentation: "The last step is to submit the recovery flow with the user's email. To do that, send a POST request to the /self-service/recovery
endpoint." [source](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#submit-recovery-flow) Here is an example of how to submit the recovery flow: bash curl -X POST \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{"method":"link","email":"[email protected]","csrf_token":"your-csrf-token"}' \ "https://{project.slug}.<http://projects.oryapis.com/self-service/recovery?flow=<your-flow-id|projects.oryapis.com/self-service/recovery?flow=<your-flow-id>>"
[source](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#submit-recovery-flow) Please replace [email protected]
, your-csrf-token
, {project.slug}
, and <your-flow-id>
with your actual values.limited-city-59768
02/06/2024, 6:09 PMchilly-king-10285
02/06/2024, 6:09 PMchilly-king-10285
02/06/2024, 6:09 PMlimited-city-59768
02/06/2024, 6:15 PMchilly-king-10285
02/06/2024, 6:15 PMchilly-king-10285
02/06/2024, 6:15 PM/self-service/recovery
endpoint with the method set to code
and the received code. Here is an example of how to submit the recovery flow: bash curl -X POST \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{"method":"code","email":"[email protected]","csrf_token":"your-csrf-token", "code":"your-recovery-code"}' \ "https://{project.slug}.<http://projects.oryapis.com/self-service/recovery?flow=<your-flow-id|projects.oryapis.com/self-service/recovery?flow=<your-flow-id>>"
[source](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#submit-recovery-flow) Please replace [email protected]
, your-csrf-token
, your-recovery-code
, {project.slug}
, and <your-flow-id>
with your actual values. Note: The provided extracts do not explicitly mention the code
field in the request body for the recovery endpoint. This is an inferred step based on the information available. For more accurate information, please refer to the [Ory Kratos documentation](https://www.ory.sh/docs/kratos/).