Tagged: anti-forgery

Sitecore 9 Forms: The required anti-forgery cookie __requestVerificationToken is not present

Have you submitted a form and it returned with this error ‘The required anti-forgery cookie “__requestVerificationToken” is not present’? If so, here is the resolution.

  • This could be because of caching. Can you check if your rendering component or container/page level caching check box is checked? if so, unchecking the caching will fix the issue.
  • Also here is quick check you can do to see whether your form is cached – Inspect the form and check the _requestverificationtoken value like below and refresh the page – do you see same value now? if so, your form is in cache!
 <input name="__RequestVerificationToken" type="hidden" value="O0P3KYBqgEZXlksWnY3fhu0PptEB0a47rRGMgHNnF6lIL2S8tcts9z9NxdxIum7ANKMv95FZB275AeLTw6WxcOl4jCQ1">  

2