few-balloon-32118
01/09/2023, 9:44 PMproud-plumber-24205
01/10/2023, 9:46 AMfew-balloon-32118
01/10/2023, 1:35 PMupdateVerificationFlow
you need both:
a. The correct flow (flow ID is retrieved by the email that is automatically sent during signup, or retrieved through createBrowserVerificationFlow
)
b. The correct code
2. There is no way to retrieve the verification flow ID directly when calling updateRegistrationFlow
?
3. Therefore, automatic sending of emails on updateRegistrationFlow
means you have to open the link in the email in order to retrieve the verification flow ID?
If you are triggering the flow yourself by using createBrowserVerificationFlow
you can retrieve the verification flow from the response of this request, and then you only need the confirmation code sent by email.bland-eye-99092
01/10/2023, 1:39 PMfew-balloon-32118
01/10/2023, 1:57 PM403
stating the csrf_token
is invalid when I’m calling getVerificationFlow
with the flow ID, but this only happens when the original signup-tab is open at the same time. However, if I close the original signup-tab and call getVerificationFlow
it works just fine. Can’t quite wrap my head around what’s causing this to be honest. But I’m suspecting that some cookies are bleeding over from the orignal signup-tab?
Would this problem then be solved if i move mydomain.com/email-verification to verification.mydomain.com/email-verification to avoid the potential cookie-problem?few-balloon-32118
01/10/2023, 3:27 PM{
"error": {
"id": "security_csrf_violation",
"code": 403,
"status": "Forbidden",
"request": "7334a04b-e89b-938e-8f74-3d333cc789b9",
"reason": "Please retry the flow and optionally clear your cookies. The request was rejected to protect you from Cross-Site-Request-Forgery (CSRF) which could cause account takeover, leaking personal information, and other serious security issues.",
"details": {
"docs": "<https://www.ory.sh/kratos/docs/debug/csrf>",
"hint": "The anti-CSRF cookie was found but the CSRF token was not included in the HTTP request body (csrf_token) nor in the HTTP Header (X-CSRF-Token).",
"reject_reason": "The HTTP Cookie Header was set and a CSRF token was sent but they do not match. We recommend deleting all cookies for this domain and retrying the flow."
},
"message": "the request was rejected to protect you from Cross-Site-Request-Forgery"
}
}
few-balloon-32118
01/10/2023, 3:41 PMbland-eye-99092
01/10/2023, 3:45 PMAre you sure automatic sending of emails cannot be disabled? That would solve this case completelyI don’t know of a way, but I might be mistaken. Feel free to file an issue in ory/kratos, though.
few-balloon-32118
01/10/2023, 5:28 PM/ui/verification
in the Account Experience when clicking the link in the verification email
2. redirect the user to a generic /confirmation
page in my webapp informing them that their email has been confirmed, and they can now continue their flow from where they started.