Skip to content

Commit c4ee27d

Browse files
committed
chore: add back in mfaTypesForSetup instead of allowedMfaTypes
1 parent 87bb72b commit c4ee27d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/auth/amplify_auth_cognito_dart/lib/src/state/machines/sign_in_state_machine.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,14 +660,14 @@ final class SignInStateMachine
660660
final allowedMfaTypes = _allowedMfaTypes;
661661
// Exclude MfaType.sms from consideration
662662
final mfaTypesForSetup = allowedMfaTypes?.difference({MfaType.sms});
663-
if (allowedMfaTypes == null || allowedMfaTypes.isEmpty) {
663+
if (mfaTypesForSetup == null || mfaTypesForSetup.isEmpty) {
664664
throw const InvalidUserPoolConfigurationException(
665665
'No eligible MFA types are allowed for setup.',
666666
recoverySuggestion: 'Check your user pool MFA configuration.',
667667
);
668668
}
669669

670-
if (mfaTypesForSetup!.length == 1) {
670+
if (mfaTypesForSetup.length == 1) {
671671
final mfaType = mfaTypesForSetup.first;
672672
if (mfaType == MfaType.totp) {
673673
_enableMfaType = MfaType.totp;

0 commit comments

Comments
 (0)