ActionController :: InvalidAuthenticityToken: verified with authentication token on form

I don't know why this is happening, but my form is not posting properly for some reason. I am very confident that the form contains the required authentication token:

<form action="/account/complete_verify_email/4df78710-e27b-4527-bd2d-71cd2e9a1271" method="post"
    <div style="margin:0;padding:0">
        <input name="authenticity_token" type="hidden" value="341b07dfa682ed11a045e19956e2e3f5f499e8cb">
    </div>
    <input id="password" name="password" type="password">
    <input name="commit" type="submit" value="Continue">
</form>

      

Note that there is an authenticity_token. What happened?

Update: And you know what? Quitting Safari and restarting solved the problem again ... but I can't think of any intermittent behavior that could cause such a problem.

0


source to share


1 answer


This is the result of your ruby ​​code, right? If you added the code that generated this form, it would be easier to figure out what was wrong.



InvalidAuthenticityToken can (or should?) Mean the token is present, but not valid if restarting Safari helps with some timeout issues. Perhaps the cookie session is expiring too soon?

+1


source







All Articles