implement Email as username

This commit is contained in:
2024-09-24 16:56:14 -05:00
parent a7235941e7
commit 1b133edd78
11 changed files with 89 additions and 64 deletions

View File

@@ -17,11 +17,11 @@ type UserSignSession struct {
SetIdxInterface IdxInterface
ConfirmIdxInterface IdxInterface
SetKeySelection KeySelection
Username Username
UserEmail Email
Expire int
}
func NewSignupSession(username Username, kp KeypadDimension, customerId CustomerId, svgInterface SvgIdInterface) (*UserSignSession, error) {
func NewSignupSession(userEmail Email, kp KeypadDimension, customerId CustomerId, svgInterface SvgIdInterface) (*UserSignSession, error) {
loginInterface, err := NewUserInterface(&kp, svgInterface)
if err != nil {
return nil, err
@@ -37,7 +37,7 @@ func NewSignupSession(username Username, kp KeypadDimension, customerId Customer
SetIdxInterface: signupInterface.IdxInterface,
ConfirmIdxInterface: nil,
SetKeySelection: nil,
Username: username,
UserEmail: userEmail,
Kp: kp,
}
@@ -65,7 +65,7 @@ func (s *UserSignSession) DeducePasscode(confirmKeyEntry KeySelection) ([]int, e
return nil, errors.New("signup session set key entry is nil")
}
if s.Username == "" {
if s.UserEmail == "" {
return nil, errors.New("signup session username is nil")
}