Skip to content

Commit 7fd2d32

Browse files
jjarvisptyllark
andauthored
Apply suggestions from code review
Co-authored-by: Tyler-Larkin <[email protected]>
1 parent 8a138f9 commit 7fd2d32

File tree

3 files changed

+6
-6
lines changed
  • src/pages/[platform]/build-a-backend/auth

3 files changed

+6
-6
lines changed

src/pages/[platform]/build-a-backend/auth/concepts/multi-factor-authentication/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ Future<void> _handleMfaSelection(MfaType selection) async {
195195
);
196196
return _handleSignInResult(result);
197197
} on AuthException catch (e) {
198-
safePrint('Error resending code: ${e.message}');
198+
safePrint('Error sending MFA selection: ${e.message}');
199199
}
200200
}
201201
```
@@ -1007,8 +1007,8 @@ Future<void> signUpWithEmailVerification(
10071007
password: password,
10081008
options: SignUpOptions(
10091009
userAttributes: <AuthUserAttributeKey, String>{
1010-
// ... if required
10111010
AuthUserAttributeKey.email: '[email protected]',
1011+
// ... if required
10121012
AuthUserAttributeKey.phoneNumber: '+18885551234',
10131013
},
10141014
),

src/pages/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ Following sign in, you will receive a `nextStep` in the sign-in result of one of
629629
| `confirmSignInWithSmsMfaCode` | The sign-in must be confirmed with a SMS code from the user. Complete the process with `confirmSignIn`. |
630630
| `confirmSignInWithOtpCode` | The sign-in must be confirmed with a code from the user (sent via SMS or Email). Complete the process with `confirmSignIn`. |
631631
| `continueSignInWithMfaSelection` | The user must select their mode of MFA verification before signing in. Complete the process with `confirmSignIn`. |
632-
| `continueSignInWithMfaSetupSelection` | The user must select their mode of MFA verification to setup. Complete the process by passing either `"EMAIL"` or `"TOTP"` to `confirmSignIn`. |
632+
| `continueSignInWithMfaSetupSelection` | The user must select their mode of MFA verification to setup. Complete the process by passing either `MfaType.email.confirmationValue` or `MfaType.totp.confirmationValue` to `confirmSignIn`. |
633633
| `continueSignInWithTotpSetup` | The TOTP setup process must be continued. Complete the process with `confirmSignIn`. |
634634
| `continueSignInWithEmailMfaSetup` | The EMAIL setup process must be continued. Complete the process by passing a valid email address to `confirmSignIn`. |
635635
</InlineFilter>

src/pages/[platform]/build-a-backend/auth/multi-step-sign-in/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ Future<void> _handleSignInResult(SignInResult result) async {
573573
// Handle select from MFA methods available to setup
574574
case AuthSignInStep.continueSignInWithEmailMfaSetup:
575575
// Handle email setup case
576-
case AuthSignInStep.confirmSignInWithEmailMfaCode:
576+
case AuthSignInStep.confirmSignInWithOtpCode:
577577
// Handle email MFA case
578578
case AuthSignInStep.continueSignInWithTotpSetup:
579579
// Handle TOTP setup case
@@ -669,7 +669,7 @@ Future<void> confirmTotpUser(String totpCode) async {
669669

670670
## Confirm signin with Email MFA
671671

672-
If the next step is `confirmSignInWithEmailMfaCode`, Amplify Auth has sent the user a random code to their email address and is waiting for the user to verify that code. To handle this step, your app's UI must prompt the user to enter the code. After the user enters the code, pass the value to the `confirmSignIn` API.
672+
If the next step is `confirmSignInWithOtpCode`, Amplify Auth has sent the user a random code to their email address and is waiting for the user to verify that code. To handle this step, your app's UI must prompt the user to enter the code. After the user enters the code, pass the value to the `confirmSignIn` API.
673673

674674
<Callout>
675675

@@ -681,7 +681,7 @@ the recipient, which can be used to prompt the user on where to look for the cod
681681
```dart
682682
Future<void> _handleSignInResult(SignInResult result) async {
683683
switch (result.nextStep.signInStep) {
684-
case AuthSignInStep.confirmSignInWithEmailMfaCode:
684+
case AuthSignInStep.confirmSignInWithOtpCode:
685685
final codeDeliveryDetails = result.nextStep.codeDeliveryDetails!;
686686
_handleCodeDelivery(codeDeliveryDetails);
687687
// ...

0 commit comments

Comments
 (0)