Skip to content

fix(webchannel): Send 'can_link_account' on email-first for isSync/isFirefoxNonSync when fxa_status resolves#19987

Open
LZoog wants to merge 1 commit intomainfrom
FXA-13002
Open

fix(webchannel): Send 'can_link_account' on email-first for isSync/isFirefoxNonSync when fxa_status resolves#19987
LZoog wants to merge 1 commit intomainfrom
FXA-13002

Conversation

@LZoog
Copy link
Contributor

@LZoog LZoog commented Feb 3, 2026

Because:

  • On email-first, we are sending 'can_link_account' before the fxa_status result has resolved, which tells us whether that Firefox supports sending the UID in can_link_account. This is problematic because we should NOT be sending the merge warning at this point if Firefox does support the UID capability

This commit:

  • Sets the default of 'supportsCanLinkAccountUid' to 'undefined' until fxa_status is received, and does not auto-submit the email on email-first if 'supportsCanLinkAccountUid' is undefined

fixes FXA-13002


Please reproduce first in Nightly, then switch into my branch and test in Nightly and in Release. You shouldn't see the merge warning for either Firefox when signing into the same account.

…FirefoxNonSync when fxa_status resolves

Because:
* On email-first, we are sending 'can_link_account' before the fxa_status result has resolved, which tells us whether that Firefox supports sending the UID in can_link_account. This is problematic because we should NOT be sending the merge warning at this point if Firefox does support the UID capability

This commit:
* Sets the default of 'supportsCanLinkAccountUid' to 'undefined' until fxa_status is received, and does not auto-submit the email on email-first if 'supportsCanLinkAccountUid' is undefined

fixes FXA-13002
@LZoog LZoog requested a review from a team as a code owner February 3, 2026 19:43
@LZoog LZoog changed the title fix(webchannel): Send 'can_link_account' on email-first for isSync/is… fix(webchannel): Send 'can_link_account' on email-first for isSync/isFirefoxNonSync when fxa_status resolves Feb 3, 2026
Copy link
Contributor

@vpomerleau vpomerleau left a comment

Choose a reason for hiding this comment

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

I had a bit of a tough time reproducing the issue with the STR in the main branch - the only way I was able to trigger the merge warning when it shouldn't be called was by manually changing the URL to return to the index page after signing in to sync. Signing out from sync that starting a new sign in from the browser toolbar did not trigger a merge warning.

However - the STR that I used did not trigger a merge warning in your branch, so this + code LGTM.

Side note, interesting to see that deleting the account then recreating with the same email does trigger a merge warning now that the uid is used (instead of email) to verify if merge is possible. 👍 👍

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