# InvalidAuthenticityToken on login (sometimes)

**URL:** <https://www.ruby-forum.com/t/invalidauthenticitytoken-on-login-sometimes/167664>\
**Category:** Rails\
**Created:** [May 11, 2009, 9:48am UTC](https://www.ruby-forum.com/t/invalidauthenticitytoken-on-login-sometimes/167664 "2009-05-11T09:48:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefankroes](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/77aa72/32.png) [@stefankroes](https://www.ruby-forum.com/u/stefankroes)\
**Post date:** [May 11, 2009, 9:48am UTC](https://www.ruby-forum.com/t/invalidauthenticitytoken-on-login-sometimes/167664/1 "2009-05-11T09:48:11Z")

</div>

Hi!

I have a Rails site in production and every once in a while a user can’t  
login because of an invalid authenticity token, most of the time it  
works fine though.

Could this be something to do with character encoding? Maybe it fails  
because some character is included in the token that isn’t encoded  
correctly?

I started a new thread because all other problems with the tokens seem  
to be reproducable reliably.

Regards,

Stefan
