From 29fcce6ba206c3e7432672eedb3d55ebc56566c7 Mon Sep 17 00:00:00 2001 From: Dmitry Proskurin Date: Sat, 30 Sep 2023 20:09:49 +0700 Subject: [PATCH] Code review fix Remove value check at ChallengeNameType. --- .../CognitoUserAuthentication.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Amazon.Extensions.CognitoAuthentication/CognitoUserAuthentication.cs b/src/Amazon.Extensions.CognitoAuthentication/CognitoUserAuthentication.cs index 565ea16..e08da73 100644 --- a/src/Amazon.Extensions.CognitoAuthentication/CognitoUserAuthentication.cs +++ b/src/Amazon.Extensions.CognitoAuthentication/CognitoUserAuthentication.cs @@ -432,10 +432,6 @@ public async Task RespondToMfaAuthAsync(RespondToMfaRequest mf { throw new ArgumentNullException(nameof(mfaRequest)); } - if (mfaRequest.ChallengeNameType != ChallengeNameType.SMS_MFA && mfaRequest.ChallengeNameType != ChallengeNameType.SOFTWARE_TOKEN_MFA) - { - throw new ArgumentException($"{ChallengeNameType.SMS_MFA} or {ChallengeNameType.SOFTWARE_TOKEN_MFA} at {nameof(mfaRequest.ChallengeNameType)} required.", nameof(mfaRequest)); - } RespondToAuthChallengeRequest challengeRequest = new RespondToAuthChallengeRequest {