mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-26 06:18:46 +00:00
feat: enable otp email and sms (#6260)
* feat: enable otp email and sms * feat: enable otp factors in login settings * remove tests without value * translate second factors * don't add new factors yet * add comment * add factors to docs * backward compatible settings api * compile tests * add available 2fa types * test: add mapping tests --------- Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
co-authored by
Livio Spring
parent
d3e403f645
commit
31ec1d83b9
@@ -129,7 +129,7 @@ func Test_LoginPolicyPrepares(t *testing.T) {
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
database.EnumArray[domain.SecondFactorType]{domain.SecondFactorTypeOTP},
|
||||
database.EnumArray[domain.SecondFactorType]{domain.SecondFactorTypeTOTP},
|
||||
database.EnumArray[domain.MultiFactorType]{domain.MultiFactorTypeU2FWithPIN},
|
||||
domain.PasswordlessTypeAllowed,
|
||||
true,
|
||||
@@ -157,7 +157,7 @@ func Test_LoginPolicyPrepares(t *testing.T) {
|
||||
AllowExternalIDPs: true,
|
||||
ForceMFA: true,
|
||||
ForceMFALocalOnly: true,
|
||||
SecondFactors: database.EnumArray[domain.SecondFactorType]{domain.SecondFactorTypeOTP},
|
||||
SecondFactors: database.EnumArray[domain.SecondFactorType]{domain.SecondFactorTypeTOTP},
|
||||
MultiFactors: database.EnumArray[domain.MultiFactorType]{domain.MultiFactorTypeU2FWithPIN},
|
||||
PasswordlessType: domain.PasswordlessTypeAllowed,
|
||||
IsDefault: true,
|
||||
@@ -217,7 +217,7 @@ func Test_LoginPolicyPrepares(t *testing.T) {
|
||||
regexp.QuoteMeta(prepareLoginPolicy2FAsStmt),
|
||||
prepareLoginPolicy2FAsCols,
|
||||
[]driver.Value{
|
||||
database.EnumArray[domain.SecondFactorType]{domain.SecondFactorTypeOTP},
|
||||
database.EnumArray[domain.SecondFactorType]{domain.SecondFactorTypeTOTP},
|
||||
},
|
||||
),
|
||||
},
|
||||
@@ -225,7 +225,7 @@ func Test_LoginPolicyPrepares(t *testing.T) {
|
||||
SearchResponse: SearchResponse{
|
||||
Count: 1,
|
||||
},
|
||||
Factors: database.EnumArray[domain.SecondFactorType]{domain.SecondFactorTypeOTP},
|
||||
Factors: database.EnumArray[domain.SecondFactorType]{domain.SecondFactorTypeTOTP},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user