Reputation: 172
I have a Rails 4.0.11.1 app that uses Devise for user auth. It runs fine in development and production on all major browsers except Safari 8. It works fine on mobile Safari and it works in really old versions of Safari. I am getting a 422 Unprocessable Entity error. Here is part of the error:
Started POST "/auth/signin" for 127.0.0.1 at 2015-04-21 11:19:17 -0700
Processing by Devise::SessionsController#create as HTML
Parameters: {"utf8"=>"✓",
"authenticity_token"=>"HGlp4uhzhmgtoVZoWvwpk5EtL5UqiqiwjIRfJlUyjEU=",
"user"=>{"email"=>"[email protected]", "password"=>"[FILTERED]",
"remember_me"=>"0"}, "commit"=>"Sign in"}
Can't verify CSRF token authenticity
Completed 422 Unprocessable Entity in 1ms
I have found this post and tried their solution: Adding the following code to session_store.rb
domain: :all
This did not do the trick for me. Has anyone solved an issue similar to this with Safari 8?
Solved: Bit of a bonehead move. My Safari setting were set to block all cookies. I changed that and it fixed the issue.
Upvotes: 2
Views: 536
Reputation: 9980
Make sure your web browser is accepting cookies. If it is not, then you will be unable to complete authentication (not just here, but on most web sites).
Upvotes: 2