fix: remove duplicate pw and otp verification (#2226)

* fix: save data (userAgentID) of otp verified event

* fix: change event to human.seftregistered on org setup

* fix: change event to human.seftregistered on org setup only from login

* fix: set password
This commit is contained in:
Livio Amstutz
2021-08-18 17:04:56 +02:00
committed by GitHub
parent f4fa3ecef3
commit 9ba8184829
7 changed files with 46 additions and 18 deletions

View File

@@ -14,6 +14,7 @@ func setUpOrgHumanToDomain(human *admin_grpc.SetUpOrgRequest_Human) *domain.Huma
Profile: setUpOrgHumanProfileToDomain(human.Profile),
Email: setUpOrgHumanEmailToDomain(human.Email),
Phone: setUpOrgHumanPhoneToDomain(human.Phone),
Password: setUpOrgHumanPasswordToDomain(human.Password),
}
}
@@ -48,3 +49,10 @@ func setUpOrgHumanPhoneToDomain(phone *admin_grpc.SetUpOrgRequest_Human_Phone) *
IsPhoneVerified: phone.IsPhoneVerified,
}
}
func setUpOrgHumanPasswordToDomain(password string) *domain.Password {
if password == "" {
return nil
}
return domain.NewPassword(password)
}