question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting device as remembered does not suppress MFA challenge

See original GitHub issue

Do you want to request a feature or report a bug? Bug

Note: This issue has already been reported to Cognito Development team via support centre and it was suggested to create an issue on Github repo for SDK as well for monitoring.

What is the current behavior?

This issue occurs with the device that user uses to change the password at the first sign-in only. Marking that device as remembered (while MFA is enabled for that user) does not suppress the MFA challenge on next logins. User has to complete MFA challenge one more time while device is marked as remembered in order for it suppress MFA challenges on future logins. User pool settings are below:

a. MFA settings 
   Optional
b. Device Settings
  Remember Devices - User Opt-in
  Avoid MFA with Remembered devices - Yes.

This issue does not occur on any subsequent devices tracked by Congito. As mentioned above this is only for device used for password reset required scenario. Below is the screencast of this issue reproduction

2018-05-28 20 23 35

Steps performed in screencast:

  1. New user logs in (new user is required to change password)
  2. User fills his info for password change (User is prompted for name only. Rest of the info is preconfigured programmatically)
  3. User logs out -> logs in again and enables MFA for his verified phone number
  4. User logs out and on next login is prompted for MFA code to login as expected
  5. User logs out and on next login ticks the checkbox to set the device as remembered
  6. User is prompted for MFA challenge upon which user’s device is marked as remembered (From AWS console it can be verified that there is only one device being tracked on which user initial sign-in password change was done and that is marked as remembered as well)
  7. Log out and login again
  8. User is prompted for MFA challenge Again!! Even though his device is marked as remembered and as per user pool configuration, user should not be asked for MFA challenge on remembered device

What is the expected behavior? Once device is marked as remembered, then it should not ask for MFA challenge on that device again.

Which versions of Amplify, and which browser / OS are affected by this issue? Did this work in previous versions?

  • amazon-cognito-identity-js 2.0.3
  • Issue is reproducible on chrome/firefox/safari (Did not test on any other browser)
  • It does not work on previous versions either

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
stale[bot]commented, Jun 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

2reactions
ruiyangcommented, Jun 17, 2019

For people reaching here, the workaround is to call remembering the current device before calling the setting up mfa api.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting device as remembered does not suppress MFA ...
Hi, I'm facing same issue. Marking the device as remembered (while MFA is enabled for that user) does not suppress the MFA challenge...
Read more >
MFA - Forget a remembered device - Okta Support
For MFA, we've set it up so devices can be remembered. "Do not challenge me on this device again". Is there anyway to...
Read more >
Remember devices in an Amazon Cognito user pool
Note: When opt-in is required, the user must opt-in before the device can be remembered and the MFA challenge can be suppressed.
Read more >
amazon web services - Cognito and MFA - Stack Overflow
(Once remembered, the MFA is suppressed from the same device until the user opts out to remember the device.)
Read more >
Azure AD Multi-Factor Authentication prompts and session ...
Some combinations of these settings, such as Remember MFA and Remain signed-in, can result in prompts for your users to authenticate too often....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found