Override Devise Sign-in with reCaptcha

Posted by Bashar Abdullah on Stack Overflow See other posts from Stack Overflow or by Bashar Abdullah
Published on 2011-03-08T08:06:15Z Indexed on 2011/03/08 8:10 UTC
Read the original article Hit count: 308

I'm trying to override the Rails devise login to include recaptcha. I followed the steps here

http://presentations.royvandewater.com/authentication-with-devise.html#8

however for some reason, authentication always fails. To isolate the problem, I removed all my code and called super directly

class SessionsController < Devise::SessionsController
  def create
    super
  end
end

file is at: Rails.root/app/controllers/sessions_controller.rb the slide suggest Rails.root/app/controllers/sessions.rb but I assume that was just a mistake. Trying it out didn't help either.

I even copied the full Sessions Controller code into my own, still gives the problem. Authentication fails here specifically:

resource = warden.authenticate!(:scope => resource_name, :recall => "#{controller_path}#new")

Any idea what I might be doing wrong?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby-on-rails-3