FirebaseUI-Flutter icon indicating copy to clipboard operation
FirebaseUI-Flutter copied to clipboard

fix(ui_auth): Fix EmailVerificationController lifecycle

Open karelklic opened this issue 10 months ago • 20 comments

Description

Fix EmailVerificationController lifecycle.

Before the change, each visit to EmailVerificationScreen creates a new controller that is kept indefinitely in the background and updated on the app resume. Since EmailVerificationController assumes that a user is logged in, these controller instances throw an exception when user logs out and app resume event is called.

After this change, a EmailVerificationController is disposed when no longer needed by a screen that created it. If controller's sendVerificationEmail async method is still running during dispose, it is terminated early.

Related Issues

Fixes #9

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • [ ] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • [x] All existing and new tests are passing.
  • [x] I updated/added relevant documentation (doc comments with ///).
  • [x] The analyzer (melos run analyze) does not report any problems on my PR.
  • [x] All unit tests pass (melos run test:unit:all doesn't fail).
  • [x] I read and followed the Flutter Style Guide.
  • [x] I signed the CLA.
  • [x] I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • [ ] Yes, this is a breaking change.
  • [ ] No, this is not a breaking change.

karelklic avatar Jan 17 '25 21:01 karelklic

Hello 👋, this PR has been opened for more than 2 months with no activity on it.

If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!

You have 15 days until this gets closed automatically

github-actions[bot] avatar Feb 14 '25 23:02 github-actions[bot]

The fix is still valid. We use it, and it works.

karelklic avatar Feb 15 '25 08:02 karelklic

Hello 👋, this PR has been opened for more than 2 months with no activity on it.

If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!

You have 15 days until this gets closed automatically

github-actions[bot] avatar Mar 15 '25 10:03 github-actions[bot]

Even after two months, the fix is still valid. Awaiting feedback from the maintainer.

karelklic avatar Mar 16 '25 10:03 karelklic

Hello 👋, this PR has been opened for more than 2 months with no activity on it.

If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!

You have 15 days until this gets closed automatically

github-actions[bot] avatar Apr 13 '25 11:04 github-actions[bot]

The fix is still valid.

karelklic avatar Apr 13 '25 12:04 karelklic

Hello 👋, this PR has been opened for more than 2 months with no activity on it.

If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!

You have 15 days until this gets closed automatically

github-actions[bot] avatar May 11 '25 12:05 github-actions[bot]

Still valid and ignored by maintainers.

karelklic avatar May 13 '25 13:05 karelklic

Hello 👋, this PR has been opened for more than 2 months with no activity on it.

If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!

You have 15 days until this gets closed automatically

github-actions[bot] avatar Jun 10 '25 13:06 github-actions[bot]

Get out bot

EArminjon avatar Jun 12 '25 07:06 EArminjon

Hello 👋, this PR has been opened for more than 2 months with no activity on it.

If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!

You have 15 days until this gets closed automatically

github-actions[bot] avatar Jul 10 '25 08:07 github-actions[bot]

Get out bot

EArminjon avatar Jul 10 '25 09:07 EArminjon

Cc @russellwheatley

EArminjon avatar Jul 10 '25 09:07 EArminjon

Hello 👋, this PR has been opened for more than 2 months with no activity on it.

If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!

You have 15 days until this gets closed automatically

github-actions[bot] avatar Aug 07 '25 10:08 github-actions[bot]

Hello 👋, this PR has been opened for more than 2 months with no activity on it.

If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!

You have 15 days until this gets closed automatically

github-actions[bot] avatar Sep 08 '25 09:09 github-actions[bot]

No

EArminjon avatar Sep 08 '25 10:09 EArminjon

Hello 👋, this PR has been opened for more than 2 months with no activity on it.

If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!

You have 15 days until this gets closed automatically

github-actions[bot] avatar Oct 06 '25 11:10 github-actions[bot]

Get out bot

EArminjon avatar Oct 06 '25 11:10 EArminjon

Hello 👋, this PR has been opened for more than 2 months with no activity on it.

If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!

You have 15 days until this gets closed automatically

github-actions[bot] avatar Nov 03 '25 12:11 github-actions[bot]

Get out bot

EArminjon avatar Nov 04 '25 07:11 EArminjon