incalculable-petabyte-84501
07/12/2024, 8:34 AMchilly-king-10285
07/12/2024, 8:34 AMchilly-king-10285
07/12/2024, 8:35 AM127.0.0.1:4455/verification
. More details about verification recovery can be found in the [Email and Phone Verification and Account Activation Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation). In the case of custom UI integration, you can use the "Resend code" option. Here is a snippet of the JSON structure: json { "type": "input", "group": "default", "attributes": { "name": "csrf_token", "type": "hidden", "value": "", "required": true, "disabled": false, "node_type": "input" }, "messages": [], "meta": { "label": { "id": 1070007, "text": "Resend code", "type": "info" } } }
The system will then send an email containing a verification code to the email address provided. The state of this action will be "sent_email". Please note that it's important to ensure that the email address is verified before using it in your identity. Allowing unverified email addresses can enable account enumeration attacks, especially if the value is used for verification or as a password login identifier. For more detailed information, you can refer to the following documentation: - [Submit Verification Flow](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#submit-verification-flow) - [Email Verification](https://www.ory.sh/docs/kratos/quickstart#email-verification) - [Data Mapping](https://www.ory.sh/docs/kratos/social-signin/data-mapping#emails-and-phone-numbers)incalculable-petabyte-84501
07/12/2024, 8:38 AMchilly-king-10285
07/12/2024, 8:38 AMchilly-king-10285
07/12/2024, 8:38 AM127.0.0.1:4455/verification
. For more details, you can refer to the [Email Verification](https://www.ory.sh/docs/kratos/quickstart#email-verification) section in the Ory documentation.incalculable-petabyte-84501
07/12/2024, 8:40 AMchilly-king-10285
07/12/2024, 8:40 AMchilly-king-10285
07/12/2024, 8:40 AM/self-service/verification
endpoint. Here is an example of how you can do this using cURL: bash curl -X POST \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -b cookies.txt \ -d '{"method":"code","email":"[email protected]","csrf_token":"your-csrf-token"}' \ "https://$<http://PROJECT_SLUG.projects.oryapis.com/self-service/verification?flow=<your-flow-id|PROJECT_SLUG.projects.oryapis.com/self-service/verification?flow=<your-flow-id>>"
In this request, replace [email protected]
with the user's email, your-csrf-token
with the CSRF token, and <your-flow-id>
with the ID of your flow. For more details, you can refer to the [Submit Verification Flow](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#submit-verification-flow) section in the Ory documentation.incalculable-petabyte-84501
07/12/2024, 8:48 AMupdateVerificationFlow
does both if I provide code
as payload it will verify the registration code, if I provide email
it will resent a new code. Is that correct?chilly-king-10285
07/12/2024, 8:48 AMchilly-king-10285
07/12/2024, 8:48 AMupdateRegistrationFlow
endpoint is used to update the registration flow, not to verify the registration code or resend a new code. To verify the registration code, you would typically use the updateVerificationFlow
endpoint. This endpoint accepts a payload with the method
field set to code
and the code
field set to the verification code you want to verify. To resend a new code, you would initiate the verification flow again by sending a POST request to the /self-service/verification
endpoint with the email
field set to the user's email. For more details, you can refer to the [Submit Verification Flow](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#submit-verification-flow) section in the Ory documentation.chilly-king-10285
07/12/2024, 8:49 AMchilly-king-10285
07/12/2024, 8:49 AM