mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 11:27:33 +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:
@@ -4,20 +4,14 @@ type SecondFactorType int32
|
||||
|
||||
const (
|
||||
SecondFactorTypeUnspecified SecondFactorType = iota
|
||||
SecondFactorTypeOTP
|
||||
SecondFactorTypeTOTP
|
||||
SecondFactorTypeU2F
|
||||
SecondFactorTypeOTPEmail
|
||||
SecondFactorTypeOTPSMS
|
||||
|
||||
secondFactorCount
|
||||
)
|
||||
|
||||
func SecondFactorTypes() []SecondFactorType {
|
||||
types := make([]SecondFactorType, 0, secondFactorCount-1)
|
||||
for i := SecondFactorTypeUnspecified + 1; i < secondFactorCount; i++ {
|
||||
types = append(types, i)
|
||||
}
|
||||
return types
|
||||
}
|
||||
|
||||
type MultiFactorType int32
|
||||
|
||||
const (
|
||||
@@ -27,14 +21,6 @@ const (
|
||||
multiFactorCount
|
||||
)
|
||||
|
||||
func MultiFactorTypes() []MultiFactorType {
|
||||
types := make([]MultiFactorType, 0, multiFactorCount-1)
|
||||
for i := MultiFactorTypeUnspecified + 1; i < multiFactorCount; i++ {
|
||||
types = append(types, i)
|
||||
}
|
||||
return types
|
||||
}
|
||||
|
||||
type FactorState int32
|
||||
|
||||
const (
|
||||
|
Reference in New Issue
Block a user