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

TOTP support #55

Closed jeff-heienickle closed 3 years ago

jeff-heienickle commented 3 years ago

I am attempting to set up a user pool with Multi-Factor Authentication and allow users to select a Time-based One-time Password using Google Authenticator. How do you respond to a challenge of type SOFTWARE_TOKEN_MFA using AWS .Net SDK?

ASP.Net Core 3 with Identity Amazon.Extensions.CognitoAuthentication Version=1.0.4

NGL321 commented 3 years ago

Hi @jeff-heienickle,

After looking through this support library, it appears that unfortunately at the moment there is no wrapper for responding to a SOFTWARE_TOKEN_MFA challenge, as you can see here.

If you would like to see how to respond to the challenge without the cognito extensions, please look at the Cognito Identity Provider library in the main .NET SDK.

However, implementing said wrapper seems fairly simple, so I can push a fix, then get back to you. Alternatively, if you feel like contributing, feel free to put in a PR with the changes, and I can review it. After added this, implementing would be as simple as following the MFA instructions from the README.

Please let me know if this helps answer your question, and if you would like to implement this yourself, or see it implemented, and I will close the issue.

😸 😷