I solved my problem by disabling the CSRF check on the public endpoint (according to this https://stackoverflow.com/questions/5669322/turn-off-csrf-token-in-rails-3).
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/04010c21-eb14-4e1a-8e11-7cbdf370e2c8%40googlegroups.com.