# ActionController::InvalidAuthenticityToken

**URL:** <https://www.ruby-forum.com/t/actioncontroller-invalidauthenticitytoken/125514>\
**Category:** Rails\
**Created:** [January 9, 2008, 9:40pm UTC](https://www.ruby-forum.com/t/actioncontroller-invalidauthenticitytoken/125514 "2008-01-09T21:40:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/49beb7/32.png) [@jney](https://www.ruby-forum.com/u/jney)\
**Post date:** [January 9, 2008, 9:40pm UTC](https://www.ruby-forum.com/t/actioncontroller-invalidauthenticitytoken/125514/1 "2008-01-09T21:40:29Z")

</div>

hi, since i use protect\_from\_forgery in my code i got sometime some  
“ActionController::InvalidAuthenticityToken” exception.  
In rescue\_action\_in\_public in application.rb, i handle this exception  
with a redirect but it can be annoying for a user validating a form.

The point is i like to know what does raise this exception? and is  
there a better way to handle them?
