From 2ee74bb47305de529c043727655e15082a30b049 Mon Sep 17 00:00:00 2001 From: Elijah Quartey Date: Wed, 13 Nov 2024 14:15:51 -0600 Subject: [PATCH] fix(authenticator): recover from exceptions during reset password flow (#5672) --- .../amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/authenticator/amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart b/packages/authenticator/amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart index 00c6eb222d..5604f7bd21 100644 --- a/packages/authenticator/amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart +++ b/packages/authenticator/amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart @@ -301,6 +301,8 @@ class StateMachineBloc } on Exception catch (e) { _exceptionController.add(AuthenticatorException(e)); } + // Emit empty event to resolve bug with broken event handling on web (possible DDC issue) + yield* const Stream.empty(); } Stream _resetPassword(AuthResetPasswordData data) async* { @@ -311,6 +313,8 @@ class StateMachineBloc } on Exception catch (e) { _exceptionController.add(AuthenticatorException(e)); } + // Emit empty event to resolve bug with broken event handling on web (possible DDC issue) + yield* const Stream.empty(); } void _notifyCodeSent(String? destination) {