InvalidAuthenticityToken
Dears,
i got the below when trying devise from master :
ActionController::InvalidAuthenticityToken in Devise/registrationsController#create
ActionController::InvalidAuthenticityToken
Just started getting the same error myself.
Me, too.
Running Rails3 and Devise on edge. There is something wrong with this commit: http://github.com/rails/rails/commit/21c99e93883c1cf32474ad65a507e69e373a380c
Hey guys, is this really a Devise issue? Have you tried in a blank application with scaffold?
Jose, yes i just setup a blank application. Very wired.
Started POST "/users" for 127.0.0.1 at 2010-06-25 17:02:01 +0200 Processing by Devise::RegistrationsController#create as HTML Parameters: {"authenticity_token"=>"QuJe1iCs/BJbSyRHlOh+v5tANLY2aa+RqImbKN9ch6A=", "user"=>{"first_name"=>"Test", "last_name"=>"Test", "email"=>"[email protected]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Sign up"} Completed in 1ms
ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):
Could you please vendor rails and revert that commit, to confirm it is really the culprit?
I am seeing the same behaviour and after tagging the previous ref (in Rails HEAD) everything worked again.
I also started getting weird behaviour with multiple scopes. For example, I have an Admin and a User scope, which can sometimes access the same action. To allow that, I created a custom filter called authenticate_anyone!:
def authenticate_anyone!
if admin_signed_in?
authenticate_admin!
else
authenticate_user!
end
end
This worked before that commit -- but now it skips straight to user authentication, and my poor admin can't access the actions and is redirected to the user sign in page.
Oddly, though, my tests using sign_in @admin still pass.
Jep, i can confirm the mentioned commit breaks it.
I cannot reproduce. Which browsers are you using?
Safari 5
Safari 5, Chrome 5 - both Mac OS X 10.6.4
I cannot duplicate in both browser. Can someone please post a sample application on Github with steps to reproduce?
Which session store are you using? Cookie? ActiveRecord?
Cookie.
Sorry, I don't have time to make a sample app right at the moment - later today I will if the issue is still unresolved.
http://github.com/frankjmattia/Devise_348
Oh, my apologies. The readme includes the devise user I "created" but I completely forgot that you'll have to recreate the database anyway... ignore that part.
Thanks Frank. Another question, are you using localhost:3000 as host?
Fixed. Please update your Rails forks! :D
Yessir. Should I declare it a different way or in a different place?
Using Rails master with last Valim's commit is working now.
Jose, thanks for responding that fast =)