mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:37:32 +00:00
feat(api): add and remove OTP (SMS and email) (#6295)
* refactor: rename otp to totp * feat: add otp sms and email * implement tests
This commit is contained in:
@@ -368,7 +368,7 @@ func (repo *AuthRequestRepo) VerifyMFAOTP(ctx context.Context, authRequestID, us
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return repo.Command.HumanCheckMFAOTP(ctx, userID, code, resourceOwner, request.WithCurrentInfo(info))
|
||||
return repo.Command.HumanCheckMFATOTP(ctx, userID, code, resourceOwner, request.WithCurrentInfo(info))
|
||||
}
|
||||
|
||||
func (repo *AuthRequestRepo) BeginMFAU2FLogin(ctx context.Context, userID, resourceOwner, authRequestID, userAgentID string) (login *domain.WebAuthNLogin, err error) {
|
||||
|
@@ -1016,7 +1016,7 @@ func TestAuthRequestRepo_nextSteps(t *testing.T) {
|
||||
},
|
||||
}, false},
|
||||
[]domain.NextStep{&domain.MFAVerificationStep{
|
||||
MFAProviders: []domain.MFAType{domain.MFATypeOTP},
|
||||
MFAProviders: []domain.MFAType{domain.MFATypeTOTP},
|
||||
}},
|
||||
nil,
|
||||
},
|
||||
@@ -1050,7 +1050,7 @@ func TestAuthRequestRepo_nextSteps(t *testing.T) {
|
||||
},
|
||||
}, false},
|
||||
[]domain.NextStep{&domain.MFAVerificationStep{
|
||||
MFAProviders: []domain.MFAType{domain.MFATypeOTP},
|
||||
MFAProviders: []domain.MFAType{domain.MFATypeTOTP},
|
||||
}},
|
||||
nil,
|
||||
},
|
||||
@@ -1087,7 +1087,7 @@ func TestAuthRequestRepo_nextSteps(t *testing.T) {
|
||||
},
|
||||
}, false},
|
||||
[]domain.NextStep{&domain.MFAVerificationStep{
|
||||
MFAProviders: []domain.MFAType{domain.MFATypeOTP},
|
||||
MFAProviders: []domain.MFAType{domain.MFATypeTOTP},
|
||||
}},
|
||||
nil,
|
||||
},
|
||||
@@ -1637,7 +1637,7 @@ func TestAuthRequestRepo_mfaChecked(t *testing.T) {
|
||||
},
|
||||
&domain.MFAPromptStep{
|
||||
MFAProviders: []domain.MFAType{
|
||||
domain.MFATypeOTP,
|
||||
domain.MFATypeTOTP,
|
||||
},
|
||||
},
|
||||
false,
|
||||
@@ -1663,7 +1663,7 @@ func TestAuthRequestRepo_mfaChecked(t *testing.T) {
|
||||
&domain.MFAPromptStep{
|
||||
Required: true,
|
||||
MFAProviders: []domain.MFAType{
|
||||
domain.MFATypeOTP,
|
||||
domain.MFATypeTOTP,
|
||||
},
|
||||
},
|
||||
false,
|
||||
@@ -1731,7 +1731,7 @@ func TestAuthRequestRepo_mfaChecked(t *testing.T) {
|
||||
},
|
||||
|
||||
&domain.MFAVerificationStep{
|
||||
MFAProviders: []domain.MFAType{domain.MFATypeOTP},
|
||||
MFAProviders: []domain.MFAType{domain.MFATypeTOTP},
|
||||
},
|
||||
false,
|
||||
nil,
|
||||
@@ -1755,7 +1755,7 @@ func TestAuthRequestRepo_mfaChecked(t *testing.T) {
|
||||
isInternal: false,
|
||||
},
|
||||
&domain.MFAVerificationStep{
|
||||
MFAProviders: []domain.MFAType{domain.MFATypeOTP},
|
||||
MFAProviders: []domain.MFAType{domain.MFATypeTOTP},
|
||||
},
|
||||
false,
|
||||
nil,
|
||||
@@ -1803,7 +1803,7 @@ func TestAuthRequestRepo_mfaChecked(t *testing.T) {
|
||||
&domain.MFAPromptStep{
|
||||
Required: true,
|
||||
MFAProviders: []domain.MFAType{
|
||||
domain.MFATypeOTP,
|
||||
domain.MFATypeTOTP,
|
||||
},
|
||||
},
|
||||
false,
|
||||
|
Reference in New Issue
Block a user