fix no error messages when sign in with wrong credentials
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user