Skip to content

MFA Device Registration with Managed Login without required MFA

0

When OTP MFA is required for a user pool, any user who logs in is shown screens to enroll an authenticator device.

I don't want to require MFA for all logins but I want to enable:

  1. Users who want to to be able to enroll an Authenticator device and enable OTP MFA
  2. Force a subset of users in the pool to enroll an Authenticator device and enable OTP MFA during next login

Is there any way to trigger the OTP Authenticator device enrollment screen in Cognito Managed Login without forcing all users to use MFA?

I can't find any documentation of this page as an endpoint that could be launched in the managed login endpoints documentation and attempting to launch it outside of a login flow seems to just restart the login.

I have attempted to enable MFA using AdminSetUserMFAPreference in the hope that would then force the user to setup an authenticator next login but it appears you cannot enable OTP MFA for a user until an authenticator device is enrolled.

Is there any way to use the Cognito Managed Login screens to enroll an OTP authenticator device without requiring MFA for all users in the user pool?

This seems like a similar requirement to https://repost.aws/questions/QUCJm5K9TEQuufZcNbQUWQRA/cognito-set-user-mfa-required-when-using-totp-only and I'm hoping to avoid having to implement device enrollment screens myself.

asked 2 years ago369 views

1 Answer
0

Based on the information available, it appears that there isn't a straightforward way to use Cognito Managed Login screens to enroll an OTP authenticator device without requiring MFA for all users in the user pool. However, there are some approaches you can consider:

  1. Optional MFA: You can set MFA to be optional in your user pool. When MFA is optional, the managed login doesn't automatically prompt users to set up MFA. However, this means you would need to build your own interface in your app to prompt users who want to set up MFA and guide them through the process using the appropriate API calls.

  2. Custom UI: If you want more control over the MFA enrollment process, you might need to implement your own custom UI for device enrollment. This would allow you to selectively prompt users to enroll an authenticator device based on your specific criteria.

  3. Adaptive Authentication: While not directly solving your issue, you could consider using adaptive authentication. This feature allows you to configure your user pool to require an additional authentication factor in response to an increased risk level. This might be a compromise between not requiring MFA for everyone and enhancing security for certain scenarios.

  4. API-based approach: Although you mentioned that AdminSetUserMFAPreference didn't work as expected, you might need to combine multiple API calls to achieve your goal. For example, you could use a combination of API calls to set up the MFA preference and then trigger the enrollment process.

It's important to note that the Cognito Managed Login is designed to handle MFA enrollment automatically when MFA is required for the user pool. The lack of documentation for specific MFA enrollment endpoints outside the login flow suggests that this process is tightly coupled with the overall authentication flow.

Given these limitations, you may need to consider either implementing your own MFA enrollment UI or adjusting your authentication flow to accommodate the constraints of Cognito's managed login system. If this functionality is crucial for your use case, you might want to reach out to AWS support for more specific guidance or to request this feature.
Sources
Configure authentication methods for managed login - Amazon Cognito
Adding MFA to a user pool - Amazon Cognito

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.