Skip to content

Fix disconnecting an account after starting to reauth it.#7310

Merged
mhammond merged 1 commit intomozilla:mainfrom
mhammond:push-pmpzykpusluk
Apr 9, 2026
Merged

Fix disconnecting an account after starting to reauth it.#7310
mhammond merged 1 commit intomozilla:mainfrom
mhammond:push-pmpzykpusluk

Conversation

@mhammond
Copy link
Copy Markdown
Member

@mhammond mhammond commented Apr 8, 2026

(as I noted in slack, I'm struggling to test local a-s with Fenix, but I think this looks correct. I might hold off landing it until I can actually test it though?)

STR:

  • Have an account in a bad state needing reauth
  • Start to sign in to fix the problem, but close the window instead of completing.
  • Select "Remove Account"

Observe fxa-state-machine-error: Invalid state transition: Authenticating -> Disconnect in logcat, the account state remains the same.

There is a FxaEvent::CancelOAuthFlow but doesn't seem to be used in practice. Regardless, this change still seems correct.

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

STR:
* Have an account in a bad state needing reauth
* Start to sign in to fix the problem, but close the window instead of completing.
* Select "Remove Account"

Observe `fxa-state-machine-error: Invalid state transition: Authenticating -> Disconnect` in logcat,
the account state remains the same.

There is a `FxaEvent::CancelOAuthFlow` but doesn't seem to be used in practice.
Regardless, this change still seems correct.
@mhammond mhammond requested a review from bendk April 8, 2026 07:49
Copy link
Copy Markdown
Contributor

@bendk bendk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me and it seems fairly safe. If you don't get an answer on the local substitution build, then I'd be for landing this.

@mhammond
Copy link
Copy Markdown
Member Author

mhammond commented Apr 9, 2026

I managed to get things working to test and this works.

@mhammond mhammond added this pull request to the merge queue Apr 9, 2026
Merged via the queue into mozilla:main with commit 998baac Apr 9, 2026
14 checks passed
@mhammond mhammond deleted the push-pmpzykpusluk branch April 9, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants