Skip to content

Commit

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

const (
PreviewDummyPhoneNumber = "+85298765432"
PreviewDummyEmail = "[email protected]"
PreviewDummyPhoneNumberMasked = "PHONE NUMBER"
PreviewDummyEmail = "[email protected]"
)
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 @@ -6,7 +6,6 @@ import (
"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/phone"
"github.com/authgear/authgear-server/pkg/util/slice"
)

Expand Down Expand Up @@ -220,7 +219,7 @@ func (m *InlinePreviewAuthflowBranchViewModeler) generateSignupFlowStepAuthentic
{
Authentication: config.AuthenticationFlowAuthenticationPrimaryOOBOTPSMS,
Channel: channel,
MaskedClaimValue: phone.Mask(PreviewDummyPhoneNumber),
MaskedClaimValue: PreviewDummyPhoneNumberMasked,
OTPForm: otp.FormCode,
VerificationSkippable: true,
},
Expand Down Expand Up @@ -373,7 +372,7 @@ func (m *InlinePreviewAuthflowBranchViewModeler) generateLoginFlowStepAuthentica
{
Authentication: config.AuthenticationFlowAuthenticationPrimaryOOBOTPSMS,
Channel: channel,
MaskedClaimValue: phone.Mask(PreviewDummyPhoneNumber),
MaskedClaimValue: PreviewDummyPhoneNumberMasked,
OTPForm: otp.FormCode,
},
}
Expand Down Expand Up @@ -464,7 +463,7 @@ func (m *InlinePreviewAuthflowBranchViewModeler) generateLoginFlowStepAuthentica
{
Authentication: config.AuthenticationFlowAuthenticationPrimaryOOBOTPSMS,
Channel: channel,
MaskedClaimValue: phone.Mask(PreviewDummyPhoneNumber),
MaskedClaimValue: PreviewDummyPhoneNumberMasked,
OTPForm: otp.FormCode,
},
}
Expand Down

0 comments on commit 944b405

Please sign in to comment.