Skip to content

Commit 565c46d

Browse files
ekjotmultaniNika Hassani
authored andcommitted
Update auth.dart
1 parent 06cad0a commit 565c46d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/amplify_core/doc/lib/auth.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Future<void> _handleSignInResult(SignInResult result) async {
110110
// #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, handle-confirm-signin-email-code, handle-confirm-signin-mfa-setup-selection, handle-confirm-signin-email-setup
111111
// #docregion handle-confirm-signin-mfa-selection
112112
case AuthSignInStep.continueSignInWithMfaSelection:
113-
final allowedMfaTypes = result.nextStep.allowedMfaTypes;
113+
final allowedMfaTypes = result.nextStep.allowedMfaTypes!;
114114
final selection = await _promptUserPreference(allowedMfaTypes);
115115
return _handleMfaSelection(selection);
116116
// #enddocregion handle-confirm-signin-mfa-selection
@@ -126,7 +126,7 @@ Future<void> _handleSignInResult(SignInResult result) async {
126126
// #enddocregion handle-confirm-signin-mfa-setup-selection
127127
// #docregion handle-confirm-signin-totp-setup
128128
case AuthSignInStep.continueSignInWithTotpSetup:
129-
final totpSetupDetails = result.nextStep.totpSetupDetails;
129+
final totpSetupDetails = result.nextStep.totpSetupDetails!;
130130
final setupUri = totpSetupDetails.getSetupUri(appName: 'MyApp');
131131
safePrint('Open URI to complete setup: $setupUri');
132132
// #enddocregion handle-confirm-signin-totp-setup
@@ -276,7 +276,7 @@ Future<void> signOutGlobally() async {
276276
if (result is CognitoCompleteSignOut) {
277277
safePrint('Sign out completed successfully');
278278
} else if (result is CognitoPartialSignOut) {
279-
final globalSignOutException = result.globalSignOutException;
279+
final globalSignOutException = result.globalSignOutException!;
280280
final accessToken = globalSignOutException.accessToken;
281281
// Retry the global sign out using the access token, if desired
282282
// ...

0 commit comments

Comments
 (0)