amazon-archives / amazon-cognito-identity-js

Amazon Cognito Identity SDK for JavaScript
Other
986 stars 452 forks source link

sendMFACode with TOTP returns SoftwareTokenMFANotFoundException #630

Closed jamie-digital closed 6 years ago

jamie-digital commented 6 years ago

I'm trying to sign in as a user with TOTP-based MFA enabled, in a UserPool with MFA optional and TOTP only.

I'm happy to provide any more info that would be helpful. Thanks for your help.

itrestian commented 6 years ago

In case the MFA is optional, you need to also use setUserMfaPreference to set TOTP as enabled after verifying (it can be done with or without user input). This is use case 29 in the README.

itrestian commented 6 years ago

Closing this, feel free to reopen if necessary.

jamie-digital commented 6 years ago

Sorry, I meant to mention in my original message that I was calling setUserMfaPreference to enable and "prefer" TOTP after calling verifySoftwareToken. Without this, the totpRequired callback isn't called during signin. I don't think I can reopen the issue; sorry.

jamie-digital commented 6 years ago

@itrestian is it possible to reopen this? Thanks.

itrestian commented 6 years ago

Yes, sorry about that, I was pretty sure the missing step you had in your original description caused this. One question, are you using aliases?

jamie-digital commented 6 years ago

No, the User Pool uses the email address as the user ID, so you sign in with email and the account gets an auto-generated UUID.

screen shot 2018-01-08 at 10 38 19
jamie-digital commented 6 years ago

@itrestian I don't suppose there's any progress on this? I want to be able to turn on MFA but can't yet. Thanks

itrestian commented 6 years ago

We root caused the issue and are in the process of fixing it. Will update once the fix is deployed.

jamie-digital commented 6 years ago

Fantastic, thanks for all your work :)

itrestian commented 6 years ago

This is fixed.

This repo is archived but feel free to open an issue on the aws-amplify repo if it still an issue.