- Newest
- Most votes
- Most comments
Based on the information available, there are some important constraints to consider when implementing both passkey authentication and MFA in Amazon Cognito.
First, it's important to understand that if you require multi-factor authentication (MFA) in your user pool, you cannot use passwordless authentication. This is a fundamental limitation of Cognito's current implementation. When both MFA and choice-based sign-in methods are active, MFA takes priority, requiring users to input their password followed by an MFA verification code.
According to feedback from AWS Business Support, this behavior is working as expected - MFA will override other choice-based sign-in methods (including Passkeys), making them unavailable when MFA is required at the user pool level.
For your specific scenario, you would need to:
- Set MFA to "Optional" at the user pool level (not "Required")
- Enable the Essentials or Plus feature plan, as passwordless authentication is only available in these tiers
- Use the ALLOW_USER_AUTH authentication flow for passwordless authentication
However, even with this setup, there's a challenge: when a user has MFA enabled individually, the passkey authentication won't work for that user. This is because MFA takes precedence over the passwordless authentication methods.
Regarding your question about using multiple authentication flows on a single client - while you can implement different authentication methods, the fundamental limitation remains that passkeys and MFA cannot be used together for the same user. You would need to choose one approach or the other for each user.
If you want to offer both options as you described, you might need to:
- Use ALLOW_USER_AUTH for users without MFA enabled (passkey users)
- Use USER_SRP_AUTH or another standard flow for users with MFA enabled (password + MFA users)
A custom authentication flow might give you more flexibility, but it wouldn't overcome the core limitation that passkeys and MFA cannot be used together for the same user according to current Cognito constraints.
Sources
Implement passwordless authentication for Cognito users | AWS re:Post
Cognito Passkey login without email/username and with MFA enabled | AWS re:Post
Improve your app authentication workflow with new Amazon Cognito features | AWS News Blog
Relevant content
- AWS OFFICIALUpdated a year ago
