I am integrating ios app with rails server. Here, I have implemented devise authentication. when a new person is signing up from my app, I get the following error in my logs
Processing by Devise::RegistrationsController#create as JSON
Parameters: {"password_confirmation"=>"[FILTERED]", "email"=>"[email protected]", "password"=>"[FILTERED]", "registration"=>{"password_confirmation"=>"[FILTERED]", "email"=>"[email protected]", "password"=>"[FILTERED]"}}
WARNING: Can't verify CSRF token authenticity
(0.1ms) begin transaction
(0.0ms) rollback transaction
Completed 406 Not Acceptable in 28ms (ActiveRecord: 0.7ms)
Devise responding to json by default has been removed from version 2.2, So add
respond_to :json
in your application controller or the specific controller where you would like to respond with json.
To not allow json
acceptance for all controllers, but only for devise add
config.to_prepare do
DeviseController.respond_to :html, :json
end
only to config/application.rb
as recommended here https://github.com/plataformatec/devise/issues/2209
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With