I automate the things I shouldn't have to click, and one class of bug kept eating afternoons: a scripted form POST comes back 422 Invalid authenticity token . The cookie is fine. The session is fine.

Source: [Dev.to](https://dev.to/kaj_ilands/your-scripted-post-fails-with-422-invalid-authenticity-token-its-the-token-not-your-cookies-lo1)

Sponsored