mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:47:33 +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:
@@ -194,8 +194,8 @@ func Test_authMethodTypeToPb(t *testing.T) {
|
||||
user.AuthenticationMethodType_AUTHENTICATION_METHOD_TYPE_UNSPECIFIED,
|
||||
},
|
||||
{
|
||||
"(t)otp",
|
||||
domain.UserAuthMethodTypeOTP,
|
||||
"totp",
|
||||
domain.UserAuthMethodTypeTOTP,
|
||||
user.AuthenticationMethodType_AUTHENTICATION_METHOD_TYPE_TOTP,
|
||||
},
|
||||
{
|
||||
@@ -218,6 +218,16 @@ func Test_authMethodTypeToPb(t *testing.T) {
|
||||
domain.UserAuthMethodTypeIDP,
|
||||
user.AuthenticationMethodType_AUTHENTICATION_METHOD_TYPE_IDP,
|
||||
},
|
||||
{
|
||||
"otp sms",
|
||||
domain.UserAuthMethodTypeOTPSMS,
|
||||
user.AuthenticationMethodType_AUTHENTICATION_METHOD_TYPE_OTP_SMS,
|
||||
},
|
||||
{
|
||||
"otp email",
|
||||
domain.UserAuthMethodTypeOTPEmail,
|
||||
user.AuthenticationMethodType_AUTHENTICATION_METHOD_TYPE_OTP_EMAIL,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user