|
|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
class Auth::PasswordsController < Devise::PasswordsController |
|
|
|
|
include Helpers::Email |
|
|
|
|
before_action :set_minimum_password_length, only: %i[edit create] |
|
|
|
|
|
|
|
|
|
def reset_confirmation |
|
|
|
|
self.resource = resource_class.new |
|
|
|
|
@ -24,13 +25,11 @@ class Auth::PasswordsController < Devise::PasswordsController
|
|
|
|
|
|
|
|
|
|
def edit |
|
|
|
|
super |
|
|
|
|
minimum_password_length |
|
|
|
|
@confirmation = params["confirmation"] |
|
|
|
|
render "devise/passwords/reset_password" |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def update |
|
|
|
|
minimum_password_length |
|
|
|
|
self.resource = resource_class.reset_password_by_token(resource_params) |
|
|
|
|
yield resource if block_given? |
|
|
|
|
|
|
|
|
|
@ -53,8 +52,8 @@ class Auth::PasswordsController < Devise::PasswordsController
|
|
|
|
|
|
|
|
|
|
protected |
|
|
|
|
|
|
|
|
|
def minimum_password_length |
|
|
|
|
@minimum_password_length ||= Devise.password_length.min |
|
|
|
|
def set_minimum_password_length |
|
|
|
|
@minimum_password_length = Devise.password_length.min |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def set_2fa_required |
|
|
|
|
|