• Resolved hassenkam

    (@hassenkam)


    Hi I have a site made with divi.

    I inserted shortcodes to password protect some material.

    Now some users say they have problems login in showing the message: “Cookie check failed”.

    Do you have an idea about what could be wrong? I can’t reproduce the error myself.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @hassenkam,

    Thanks for reaching out to us.

    At first glance, it looks like a caching or conflict issue.

    To assist you better, may we know:

    • The password of your sample protected page
    • The caching plugin/server cache and
    • The hosting provider you’re using
    • Some screenshots regarding the error message, if any

    You might want to send these details to our support email – hello(at)preventdirectaccess.com so that our team can support you faster & better.

    Looking forward to hearing from you.

    Thread Starter hassenkam

    (@hassenkam)

    Thank you. I have just send an email to you.

    The issue is resolved with @hassenkam via email.

    Just an update, the error message is returned by WordPress itself when your nonce tokens are cached and expired when the form is submitted.

    {code: "rest_cookie_invalid_nonce", message: "Cookie check failed", data: {status: 403}}
    code: "rest_cookie_invalid_nonce"
    data: {status: 403}
    status: 403
    message: "Cookie check failed"

    To be more specific, we’re using wp_create_nonce to create a token as per WordPress recommendation.

    Nonces should be unique as they are user-specific and time-sensitive values.
    If a nonce value is cached and expires later on, certain validation-required actions, e.g. form submission, will fail.

    Here are our suggestions to overcome the issue:

    1. Exclude all protected pages from caching
    2. Clear cache and set the “Cache Timeout” to less than 12 hours.

    Hope it helps those with the same issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cookie check failed’ is closed to new replies.