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
end
def require_no_authentication
super
def set_flash_message(key, kind, options = {})
return if key == :alert && kind == 'already_authenticated'
flash.clear
super
end
def build_resource(_hash = {})

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

Loading…
Cancel
Save