Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConfirmForgotPassword pauses hubSubscription indefinitely if an exception occurs #5655

Open
3 of 14 tasks
IsaacSnapDsk opened this issue Nov 6, 2024 · 2 comments
Open
3 of 14 tasks
Labels
Authenticator Issues related to the Authenticator UI Component bug Something is not working; the issue has reproducible steps and has been reproduced pending-release Issues that have been addressed in main but have not been released

Comments

@IsaacSnapDsk
Copy link

IsaacSnapDsk commented Nov 6, 2024

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

@github-actions github-actions bot added pending-triage This issue is in the backlog of issues to triage pending-maintainer-response Pending response from a maintainer of this repository labels Nov 6, 2024
@tyllark
Copy link
Member

tyllark commented Nov 7, 2024

Hi @IsaacSnapDsk thanks for taking the time to open up this issue. We will investigate and get back to you when we have an update.

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Nov 7, 2024
@tyllark tyllark added to-be-reproduced Issues that have not been reproduced yet, but have reproduction steps provided auth Issues related to the Auth Category Authenticator Issues related to the Authenticator UI Component labels Nov 7, 2024
@Equartey Equartey added bug Something is not working; the issue has reproducible steps and has been reproduced pending-release Issues that have been addressed in main but have not been released and removed to-be-reproduced Issues that have not been reproduced yet, but have reproduction steps provided pending-triage This issue is in the backlog of issues to triage auth Issues related to the Auth Category labels Nov 13, 2024
@Equartey
Copy link
Member

Hi @IsaacSnapDsk, thank you for the excellent write up. Your analysis was 100% correct and I have opened a PR with a fix. We will update you when its available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Authenticator Issues related to the Authenticator UI Component bug Something is not working; the issue has reproducible steps and has been reproduced pending-release Issues that have been addressed in main but have not been released
Projects
None yet
Development

No branches or pull requests

3 participants