@@ -385,16 +385,19 @@ class AuthCategory extends AmplifyCategory<AuthPluginInterface> {
385
385
/// If both SMS MFA and TOTP MFA are enabled and configured for the user, they will be
386
386
/// given the choice of which mechanism they'd like to use to continue signing in.
387
387
///
388
- /// <?code-excerpt "doc/lib/auth.dart" region="handle-mfa-selection "?>
388
+ /// <?code-excerpt "doc/lib/auth.dart" region="prompt-user-preference "?>
389
389
/// ```dart
390
390
/// Future<MfaType> _promptUserPreference(Set<MfaType> allowedTypes) async {
391
- /// throw UnimplementedError();
391
+ /// // ···
392
392
/// }
393
+ /// ```
393
394
///
395
+ /// <?code-excerpt "doc/lib/auth.dart" region="handle-mfa-selection"?>
396
+ /// ```dart
394
397
/// Future<void> _handleMfaSelection(MfaType selection) async {
395
398
/// try {
396
399
/// final result = await Amplify.Auth.confirmSignIn(
397
- /// confirmationValue: selection.name ,
400
+ /// confirmationValue: selection.confirmationValue ,
398
401
/// );
399
402
/// return _handleSignInResult(result);
400
403
/// } on AuthException catch (e) {
@@ -1296,11 +1299,13 @@ class AuthCategory extends AmplifyCategory<AuthPluginInterface> {
1296
1299
/// Initiates setup of a time-based one-time passcode (TOTP) MFA method for the
1297
1300
/// current user.
1298
1301
///
1299
- /// Your backend must be set up with TOTP MFA enabled prior to calling this method.
1302
+ /// **NOTE**: Your backend must be set up with TOTP MFA enabled prior to calling this method.
1303
+ ///
1300
1304
/// The [TotpSetupDetails] returned contains a [TotpSetupDetails.getSetupUri]
1301
- /// method which can be used to display a QR code or render a button to open
1302
- /// the user's installed authenticator app. After setup is complete on the user's
1303
- /// end, call [verifyTotpSetup] with a one-time code to complete registration.
1305
+ /// method for retrieving the setup URI. This can be used to build a QR code or
1306
+ /// a button which opens the user's installed authenticator app. After setup is
1307
+ /// complete on the user's end, call [verifyTotpSetup] with a one-time code to
1308
+ /// complete registration.
1304
1309
/// {@endtemplate}
1305
1310
Future <TotpSetupDetails > setUpTotp ({
1306
1311
TotpSetupOptions ? options,
0 commit comments