0
0
Fork 0

Add notification email on invalid second authenticator (#28822)

This commit is contained in:
Claire 2024-01-22 14:55:43 +01:00 committed by GitHub
parent 18004bf227
commit e2d9635074
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 102 additions and 3 deletions

View file

@ -191,6 +191,18 @@ class UserMailer < Devise::Mailer
end
end
def failed_2fa(user, remote_ip, user_agent, timestamp)
@resource = user
@remote_ip = remote_ip
@user_agent = user_agent
@detection = Browser.new(user_agent)
@timestamp = timestamp.to_time.utc
I18n.with_locale(locale) do
mail subject: default_i18n_subject
end
end
private
def default_devise_subject