File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
packages/auth/amplify_auth_cognito_dart/lib/src/state/machines Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -661,16 +661,14 @@ final class SignInStateMachine
661
661
// Exclude MfaType.sms from consideration
662
662
final mfaTypesForSetup = allowedMfaTypes? .difference ({MfaType .sms});
663
663
if (allowedMfaTypes == null ||
664
- allowedMfaTypes.isEmpty ||
665
- mfaTypesForSetup == null ||
666
- mfaTypesForSetup.isEmpty) {
664
+ allowedMfaTypes.isEmpty) {
667
665
throw const InvalidUserPoolConfigurationException (
668
666
'No eligible MFA types are allowed for setup.' ,
669
667
recoverySuggestion: 'Check your user pool MFA configuration.' ,
670
668
);
671
669
}
672
670
673
- if (mfaTypesForSetup.length == 1 ) {
671
+ if (mfaTypesForSetup! .length == 1 ) {
674
672
final mfaType = mfaTypesForSetup.first;
675
673
if (mfaType == MfaType .totp) {
676
674
_enableMfaType = MfaType .totp;
You can’t perform that action at this time.
0 commit comments