Skip to content

ConfirmForgotPassword pauses hubSubscription indefinitely if an exception occurs #5655

@IsaacSnapDsk

Description

@IsaacSnapDsk

Description

When the _confirmResetPassword() method inside of auth_bloc.dart experiences an exception (like when entering an invalid confirmation code), the hub subscription does not resume. This results in subsequent events not being handled by the auth bloc, which in turn causes the ConfirmForgotPassword form to get stuck in an infinite loading state if the "Submit" button is pressed again.

I replicated the package locally and it looks like adding a yield* const Stream.empty() at the end of the method resolves this issue, a pattern that looks like it's being used in the other event handler methods.

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Notifications (Push)
  • Storage

Steps to Reproduce

  1. Navigate to the ConfirmForgotPassword step in the Authenticator
  2. Fill out the form but enter an incorrect confirmation code and submit the form
  3. A banner should pop informing you that it's invalid
  4. Put the correct confirmation code in the form and submit the form
  5. Notice that the submit button gets put into a loading state indefinitely

Screenshots

CleanShot.2024-11-06.at.11.14.11.mp4

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.24.0

Amplify Flutter Version

2.4.0

Deployment Method

Custom Pipeline

Schema

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    AuthenticatorIssues related to the Authenticator UI ComponentbugSomething is not working; the issue has reproducible steps and has been reproduced

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions