views:

939

answers:

1

I don't know why it happens but my form for some reason does not post properly. I am very sure 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 the authenticity_token is there. What happened?

And YOU KNOW WHAT? Quitting Safari and restart again solved the issue... but I can't think of what kind of intermittent behaviour could cause such problem.

A: 

This is the output of your ruby code, yes? If you added the code that generated this form it would perhaps be easier to figure what goes wrong.

InvalidAuthenticityToken could (or should?) mean that the token is present but not correct, if restarting Safari helps it could be some timeout issues. Perhaps the session cookie expires too soon?

Stein G. Strindhaug