Is there a way to access the user that failed authentication via the before_failure
callback?
Warden::Manager.before_failure do |env, opts|
request = Rack::Request.new(env)
env['SCRIPT_INFO'] =~ /\/(.*)/
request.params[:action] = $1
end
I am placing this configuration in the devise initializer, I have heard other people mention placing it in the user model so maybe I can access it that way.