upnext / BeaconControl

Setup and manage large beacon deployments with BeaconControl open source platform
https://beaconcontrol.io
BSD 3-Clause "New" or "Revised" License
92 stars 63 forks source link

Error on submitting password reset #22

Closed davesag closed 8 years ago

davesag commented 8 years ago

I used forgot my password to request a reset of my password, the email popped up (again with broken links due to the wrong port) and I reset my password.

On submitting the password reset I got the following error screen

NoMethodError in Admin::PasswordsController#update
undefined method `confirmable' for #<ApplicationConfig:0x007ff094e48478>

Extracted source (around line #37):
35
36
37
38
39

  def confirmable?(resource)
    AppConfig.confirmable && !resource.active_for_authentication?
  end
end

Rails.root: /Users/davesag/src/BeaconCtrl

Application Trace | Framework Trace | Full Trace
app/controllers/admin/passwords_controller.rb:37:in `confirmable?'
app/controllers/admin/passwords_controller.rb:28:in `update_password!'
app/controllers/admin/passwords_controller.rb:19:in `update'
Request

Parameters:

{"utf8"=>"✓",
 "_method"=>"put",
 "authenticity_token"=>"[FILTERED]",
 "admin"=>{"reset_password_token"=>"[FILTERED]",
 "password"=>"[FILTERED]",
 "password_confirmation"=>"[FILTERED]"},
 "commit"=>"Change password"}
davesag commented 8 years ago

Screen snap attached. Interestingly when I tried this again, it rejected my re-use of the previous password, so clearly it got as far as saving it. But I could not log in with that password.

beacon_ctrl password-reset screen snap

davesag commented 8 years ago

I've found this http://stackoverflow.com/questions/4783392/how-do-i-enable-confirmable-in-devise and http://stackoverflow.com/questions/3034784/adding-confirmable-module-to-an-existing-site-using-devise but I've not dug deep into your devise setup etc to see what the correct way forward is.

jkurdel commented 8 years ago

Fixed https://github.com/upnext/BeaconCtrl/commit/b30871f7e69e3075800b3ff819aa3aad76f32344