fix no error messages when sign in with wrong credentials

pull/133/head
Alex Turchyn 2 years ago
parent 9e87a0373f
commit b6d350ebbd

@ -31,10 +31,10 @@ class RegistrationsController < Devise::RegistrationsController
redirect_to after_sign_up_path_for(current_user), allow_other_host: true redirect_to after_sign_up_path_for(current_user), allow_other_host: true
end end
def require_no_authentication def set_flash_message(key, kind, options = {})
super return if key == :alert && kind == 'already_authenticated'
flash.clear super
end end
def build_resource(_hash = {}) def build_resource(_hash = {})

@ -32,9 +32,9 @@ class SessionsController < Devise::SessionsController
devise_parameter_sanitizer.permit(:sign_in, keys: [:otp_attempt]) devise_parameter_sanitizer.permit(:sign_in, keys: [:otp_attempt])
end end
def require_no_authentication def set_flash_message(key, kind, options = {})
super return if key == :alert && kind == 'already_authenticated'
flash.clear super
end end
end end

Loading…
Cancel
Save