aws / aws-sdk-net-extensions-cognito

An extension library to assist in the Amazon Cognito User Pools authentication process
Apache License 2.0
102 stars 49 forks source link

ChallengeName check and small improvements #127

Closed DmitryProskurin closed 9 months ago

DmitryProskurin commented 12 months ago

Hello. I add explicit check for DEVICE_SRP_AUTH challenge name in StartWithSrpAuthAsync method. It fix issue, when cognito return SOFTWARE_TOKEN_MFA challenge and reqeust parameter initialized with valid device properties.

I change order of parameters in some exceptions ctors(param name and message has wrong positions); use nameof() instead of parameter name as string; request parameter validation to RespondToMfaAuthAsync method.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

DmitryProskurin commented 9 months ago

Remove (revert) changes made in RespondToMfaAuthAsync method

Hello @CamileDahdah. I remove check for ChallengeNameType and keep null check for mfaRequest.

96malhar commented 9 months ago

Thank you for this PR! It has been released in version 2.5.2