in src/Amazon.AspNetCore.Identity.Cognito/CognitoUserStore/CognitoUserStore.cs [102:122]
public virtual async Task<AuthFlowResponse> RespondToTwoFactorChallengeAsync(TUser user, string code, ChallengeNameType challengeNameType, string authWorkflowSessionId, CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
try
{
AuthFlowResponse context =
await user.RespondToMfaAuthAsync(new RespondToMfaRequest()
{
SessionID = authWorkflowSessionId,
MfaCode = code,
ChallengeNameType = challengeNameType
}).ConfigureAwait(false);
return context;
}
catch (AmazonCognitoIdentityProviderException e)
{
throw new CognitoServiceException("Failed to respond to Cognito two factor challenge.", e);
}
}