Skip to content

Commit

Permalink
Show a faked masked email
Browse files Browse the repository at this point in the history
  • Loading branch information
cychiuae committed Jun 21, 2024
1 parent 944b405 commit 5b8e399
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/auth/handler/webapp/viewmodels/preview.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package viewmodels

const (
PreviewDummyPhoneNumberMasked = "PHONE NUMBER"
PreviewDummyEmail = "[email protected]"
PreviewDummyEmailMasked = "johndoe*******@example.com"
)
7 changes: 3 additions & 4 deletions pkg/auth/handler/webapp/viewmodels/preview_authflow_branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
authflow "github.com/authgear/authgear-server/pkg/lib/authenticationflow"
"github.com/authgear/authgear-server/pkg/lib/authn/otp"
"github.com/authgear/authgear-server/pkg/lib/config"
"github.com/authgear/authgear-server/pkg/lib/infra/mail"
"github.com/authgear/authgear-server/pkg/util/slice"
)

Expand Down Expand Up @@ -196,7 +195,7 @@ func (m *InlinePreviewAuthflowBranchViewModeler) generateSignupFlowStepAuthentic
{
Authentication: config.AuthenticationFlowAuthenticationPrimaryOOBOTPEmail,
Channel: model.AuthenticatorOOBChannelEmail,
MaskedClaimValue: mail.MaskAddress(PreviewDummyEmail),
MaskedClaimValue: PreviewDummyEmailMasked,
OTPForm: func() otp.Form {
if m.AppConfig.Authenticator.OOB.Email.EmailOTPMode.IsCodeEnabled() {
return otp.FormCode
Expand Down Expand Up @@ -350,7 +349,7 @@ func (m *InlinePreviewAuthflowBranchViewModeler) generateLoginFlowStepAuthentica
{
Authentication: config.AuthenticationFlowAuthenticationPrimaryOOBOTPEmail,
Channel: model.AuthenticatorOOBChannelEmail,
MaskedClaimValue: mail.MaskAddress(PreviewDummyEmail),
MaskedClaimValue: PreviewDummyEmailMasked,
OTPForm: func() otp.Form {
if m.AppConfig.Authenticator.OOB.Email.EmailOTPMode.IsCodeEnabled() {
return otp.FormCode
Expand Down Expand Up @@ -441,7 +440,7 @@ func (m *InlinePreviewAuthflowBranchViewModeler) generateLoginFlowStepAuthentica
{
Authentication: config.AuthenticationFlowAuthenticationSecondaryOOBOTPEmail,
Channel: model.AuthenticatorOOBChannelEmail,
MaskedClaimValue: mail.MaskAddress(PreviewDummyEmail),
MaskedClaimValue: PreviewDummyEmailMasked,
OTPForm: func() otp.Form {
if m.AppConfig.Authenticator.OOB.Email.EmailOTPMode.IsCodeEnabled() {
return otp.FormCode
Expand Down

0 comments on commit 5b8e399

Please sign in to comment.