mirror of
https://github.com/docusealco/docuseal
synced 2026-11-14 15:52:32 -05:00
refactor otp
This commit is contained in:
1 parent
a847e7aa9c
commit
e187644716
9 files changed
+121
-37
No files matched your search
@@ -181,7 +181,8 @@ class SubmitterMailer < ApplicationMailer
|
||||
def otp_verification_email(submitter, locale: nil)
|
||||
@current_account = submitter.account
|
||||
@submitter = submitter
|
||||
@otp_code = EmailVerificationCodes.generate([submitter.email.downcase.strip, submitter.slug].join(':'))
|
||||
@otp_code = OtpChallenges.generate([submitter.email.downcase.squish, submitter.slug].join(':'),
|
||||
purpose: 'form_email_2fa')
|
||||
|
||||
assign_message_metadata('otp_verification_email', submitter)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ class TemplateMailer < ApplicationMailer
|
||||
@current_account = template.account
|
||||
@template = template
|
||||
|
||||
@otp_code = EmailVerificationCodes.generate([email.downcase.strip, template.slug].join(':'))
|
||||
@otp_code = OtpChallenges.generate([email.downcase.squish, template.slug].join(':'), purpose: 'form_email_2fa')
|
||||
|
||||
assign_message_metadata('otp_verification_email', template)
|
||||
|
||||
|
||||
Reference in new issue
Block a user