# Rails - Devise - Warden and InvalidAuthenticityToken

**URL:** <https://www.ruby-forum.com/t/rails-devise-warden-and-invalidauthenticitytoken/193577>\
**Category:** Rails\
**Created:** [August 19, 2010, 10:42pm UTC](https://www.ruby-forum.com/t/rails-devise-warden-and-invalidauthenticitytoken/193577 "2010-08-19T22:42:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ruby\_on\_RailsS\_Talk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/dbc845/32.png) [@Ruby\_on\_RailsS\_Talk](https://www.ruby-forum.com/u/Ruby_on_RailsS_Talk)\
**Post date:** [August 19, 2010, 10:42pm UTC](https://www.ruby-forum.com/t/rails-devise-warden-and-invalidauthenticitytoken/193577/1 "2010-08-19T22:42:42Z")

</div>

Hi

I’ve just uploaded my new website to my server and, after a couple of  
teething problems, seem to be hitting problems when I am using devise  
and warden to authenticate users etc.

The following is the error message with sensitive information removed:

Processing RegistrationsController#create (for 81.111.90.194 at  
2010-08-19 21:35:43) [POST]  
Parameters: {“commit”=\>“Sign up”, “action”=\>“create”,  
“authenticity\_token”=\>“XXXXXXXREMOVEDXXXXXXX”,  
“controller”=\>“registrations”, “user”=\>{“dob”=\>“XXXXXXX”,  
“password\_confirmation”=\>"[FILTERED]", “firstname”=\>“XXX”,  
“password”=\>"[FILTERED]", “surname”=\>“XXX”, “email”=\>“XXXXXX”}}

ActionController::InvalidAuthenticityToken  
(ActionController::InvalidAuthenticityToken):  
warden (0.10.7) [v] lib/warden/manager.rb:35:in `call' warden (0.10.7) [v] lib/warden/manager.rb:34:in`catch’  
warden (0.10.7) [v] lib/warden/manager.rb:34:in `call’

Rendering /home/enigmaho/rails\_apps/newwt/public/422.html (422  
Unprocessable Entity)

I have no real idea what is going wrong. It works OK on my development  
server at home, and everything else seems to work barring this.

My environment.rb file has the following lines:

config.gem ‘warden’  
config.gem ‘devise’

And they have been installed in my plugins/gems directory using “rake  
gems:unpack”

I’m using Rails 2.3.8 if that’s any help.

Any help would be excellent!

Darren
