Skip to content

Commit 2ee74bb

Browse files
authored
fix(authenticator): recover from exceptions during reset password flow (#5672)
1 parent e4b6b68 commit 2ee74bb

File tree

1 file changed

+4
-0
lines changed
  • packages/authenticator/amplify_authenticator/lib/src/blocs/auth

1 file changed

+4
-0
lines changed

packages/authenticator/amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ class StateMachineBloc
301301
} on Exception catch (e) {
302302
_exceptionController.add(AuthenticatorException(e));
303303
}
304+
// Emit empty event to resolve bug with broken event handling on web (possible DDC issue)
305+
yield* const Stream.empty();
304306
}
305307

306308
Stream<AuthState> _resetPassword(AuthResetPasswordData data) async* {
@@ -311,6 +313,8 @@ class StateMachineBloc
311313
} on Exception catch (e) {
312314
_exceptionController.add(AuthenticatorException(e));
313315
}
316+
// Emit empty event to resolve bug with broken event handling on web (possible DDC issue)
317+
yield* const Stream.empty();
314318
}
315319

316320
void _notifyCodeSent(String? destination) {

0 commit comments

Comments
 (0)