mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 18:17:35 +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 <livio.a@gmail.com>
This commit is contained in:
@@ -156,7 +156,7 @@ func (u *UserView) MFATypesSetupPossible(level domain.MFALevel, policy *domain.L
|
||||
if policy.HasSecondFactors() {
|
||||
for _, mfaType := range policy.SecondFactors {
|
||||
switch mfaType {
|
||||
case domain.SecondFactorTypeOTP:
|
||||
case domain.SecondFactorTypeTOTP:
|
||||
if u.OTPState != MFAStateReady {
|
||||
types = append(types, domain.MFATypeOTP)
|
||||
}
|
||||
@@ -181,7 +181,7 @@ func (u *UserView) MFATypesAllowed(level domain.MFALevel, policy *domain.LoginPo
|
||||
if policy.HasSecondFactors() {
|
||||
for _, mfaType := range policy.SecondFactors {
|
||||
switch mfaType {
|
||||
case domain.SecondFactorTypeOTP:
|
||||
case domain.SecondFactorTypeTOTP:
|
||||
if u.OTPState == MFAStateReady {
|
||||
types = append(types, domain.MFATypeOTP)
|
||||
}
|
||||
|
Reference in New Issue
Block a user