-
Hi, I'm busy implementing registration in my app (SPA browser app) and I'm having some trouble when submitting the form. I keep on getting a 403 response. I found the following in the logs:
After some investigation I found that the value of the CSRF token in the cookie doesn't match the value in the hidden field. So I manually requested the registration flow from Kratos in the terminal and saw this:
The value in the cookie doesn't match the value in the input node. I've tried to eliminate any mistakes on my side, but I'm not sure what else can be wrong. I'm using the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The value in the cookie is an encrypted base truth, the csrf token itself is derived from it - so they never match! Make sure that the CSRF token is not overwritten - we had a bug where there was a race condition between calling the browser init endpoint and the session whoami, which caused the cookie to be overwritten. |
Beta Was this translation helpful? Give feedback.
-
Thanks, I've found the issue. I was POST'ing to the wrong endpoint |
Beta Was this translation helpful? Give feedback.
Thanks, I've found the issue. I was POST'ing to the wrong endpoint
/self-service/registration/browser
instead ofself-service/registration
🤦