Skip to content

Commit 95a66bd

Browse files
committed
chore: add mfaType enum values,
1 parent c049f18 commit 95a66bd

File tree

2 files changed

+9
-2
lines changed
  • packages/amplify_core/lib/src/config

2 files changed

+9
-2
lines changed

packages/amplify_core/lib/src/config/amplify_outputs/auth/mfa.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ enum MfaMethod {
1111
sms,
1212

1313
@JsonValue('TOTP')
14-
totp;
14+
totp,
15+
16+
@JsonValue('EMAIL')
17+
email;
1518

1619
/// The value to pass to `Amplify.Auth.confirmSignIn` when
1720
/// selecting an MFA type.

packages/amplify_core/lib/src/config/auth/cognito/mfa.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ enum MfaType {
99
sms,
1010

1111
@JsonValue('TOTP')
12-
totp;
12+
totp,
13+
14+
@JsonValue('EMAIL')
15+
email;
1316

1417
/// The value to pass to `Amplify.Auth.confirmSignIn` when
1518
/// selecting an MFA type.
@@ -21,6 +24,7 @@ extension ToMfaMethod on MfaType {
2124
return switch (this) {
2225
MfaType.sms => MfaMethod.sms,
2326
MfaType.totp => MfaMethod.totp,
27+
MfaType.email => MfaMethod.email,
2428
};
2529
}
2630
}

0 commit comments

Comments
 (0)