Skip to content

Commit

Permalink
chore: add docs and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
khatruong2009 committed Sep 18, 2024
1 parent 661b63f commit 38f63d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/amplify_core/doc/lib/auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Future<void> resendSignUpCode(String username) async {
}
// #enddocregion resend-signup-code

// #docregion handle-signin, handle-confirm-signin-sms, handle-confirm-signin-new-password, handle-confirm-signin-custom-challenge, handle-confirm-signin-reset-password, handle-confirm-signin-confirm-signup, handle-confirm-signin-done, handle-confirm-signin-mfa-selection, handle-confirm-signin-totp-setup, handle-confirm-signin-totp-code
// #docregion handle-signin, handle-confirm-signin-sms, handle-confirm-signin-new-password, handle-confirm-signin-custom-challenge, handle-confirm-signin-reset-password, handle-confirm-signin-confirm-signup, handle-confirm-signin-done, handle-confirm-signin-mfa-selection, handle-confirm-signin-totp-setup, handle-confirm-signin-totp-code, handle-confirm-signin-email
Future<void> _handleSignInResult(SignInResult result) async {
switch (result.nextStep.signInStep) {
// #enddocregion handle-signin, handle-confirm-signin-sms, handle-confirm-signin-new-password, handle-confirm-signin-custom-challenge, handle-confirm-signin-reset-password, handle-confirm-signin-confirm-signup, handle-confirm-signin-done, handle-confirm-signin-mfa-selection, handle-confirm-signin-totp-setup, handle-confirm-signin-totp-code
Expand All @@ -129,6 +129,11 @@ Future<void> _handleSignInResult(SignInResult result) async {
final codeDeliveryDetails = result.nextStep.codeDeliveryDetails!;
_handleCodeDelivery(codeDeliveryDetails);
// #enddocregion handle-confirm-signin-sms
// #docregion handle-confirm-signin-email
case AuthSignInStep.confirmSignInWithEmailMfaCode:
final codeDeliveryDetails = result.nextStep.codeDeliveryDetails!;
_handleCodeDelivery(codeDeliveryDetails);
// #enddocregion handle-confirm-signin-email
// #docregion handle-confirm-signin-new-password
case AuthSignInStep.confirmSignInWithNewPassword:
safePrint('Enter a new password to continue signing in');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ enum AuthSignInStep {
/// an MFA method.
continueSignInWithMfaSelection,

/// The sign-in is not complete and the user must select an MFA method to setup.
/// The sign-in is not complete and the user must select an MFA method to setup.
continueSignInWithMfaSetupSelection,

/// The sign-in is not complete and a TOTP authenticator app must be
Expand Down

0 comments on commit 38f63d3

Please sign in to comment.