From 4539dd68c72be1875d1bed002ab5195890348d72 Mon Sep 17 00:00:00 2001 From: Vijay Budhram Date: Tue, 11 Jun 2024 23:37:53 -0400 Subject: [PATCH] fix(login): fix sync login issue with react --- .../signInConnectAnotherDevice.spec.ts | 6 ------ .../react-conversion/signInRelyingParties.spec.ts | 6 ------ .../tests/react-conversion/signinTotp.spec.ts | 6 ------ .../tests/react-conversion/syncV3SignIn.spec.ts | 12 ------------ packages/fxa-settings/src/lib/channels/firefox.ts | 5 +++-- 5 files changed, 3 insertions(+), 32 deletions(-) diff --git a/packages/functional-tests/tests/react-conversion/signInConnectAnotherDevice.spec.ts b/packages/functional-tests/tests/react-conversion/signInConnectAnotherDevice.spec.ts index 7f26e90d15..83704406e6 100644 --- a/packages/functional-tests/tests/react-conversion/signInConnectAnotherDevice.spec.ts +++ b/packages/functional-tests/tests/react-conversion/signInConnectAnotherDevice.spec.ts @@ -27,12 +27,6 @@ test.describe('severity-2 #smoke', () => { await signinReact.fillOutEmailFirstForm(credentials.email); await signinReact.fillOutPasswordForm(credentials.password); - await signinReact.sendWebChannelMessage( - createCustomEventDetail(FirefoxCommand.LinkAccount, { - ok: true, - }) - ); - await expect(page).toHaveURL(/connect_another_device/); await expect(connectAnotherDevice.fxaConnected).toBeVisible(); await expect( diff --git a/packages/functional-tests/tests/react-conversion/signInRelyingParties.spec.ts b/packages/functional-tests/tests/react-conversion/signInRelyingParties.spec.ts index 559b671cbc..4a7605a608 100644 --- a/packages/functional-tests/tests/react-conversion/signInRelyingParties.spec.ts +++ b/packages/functional-tests/tests/react-conversion/signInRelyingParties.spec.ts @@ -34,12 +34,6 @@ test.describe('severity-1 #smoke', () => { await signinReact.fillOutEmailFirstForm(credentials.email); await signinReact.fillOutPasswordForm(credentials.password); - await signinReact.sendWebChannelMessage( - createCustomEventDetail(FirefoxCommand.LinkAccount, { - ok: true, - }) - ); - await expect(connectAnotherDevice.fxaConnected).toBeEnabled(); await connectAnotherDevice.startBrowsingButton.click(); await expect(page).toHaveURL(/settings/, { timeout: 1000 }); diff --git a/packages/functional-tests/tests/react-conversion/signinTotp.spec.ts b/packages/functional-tests/tests/react-conversion/signinTotp.spec.ts index 650a4295ee..ad75c6a684 100644 --- a/packages/functional-tests/tests/react-conversion/signinTotp.spec.ts +++ b/packages/functional-tests/tests/react-conversion/signinTotp.spec.ts @@ -94,12 +94,6 @@ test.describe('severity-1 #smoke', () => { const code = await getCode(secret); await signinReact.fillOutAuthenticationForm(code); - await signinReact.sendWebChannelMessage( - createCustomEventDetail(FirefoxCommand.LinkAccount, { - ok: true, - }) - ); - await expect(page).toHaveURL(/connect_another_device/); await expect(connectAnotherDevice.fxaConnected).toBeVisible(); diff --git a/packages/functional-tests/tests/react-conversion/syncV3SignIn.spec.ts b/packages/functional-tests/tests/react-conversion/syncV3SignIn.spec.ts index 6b3d58fffc..8e9b6fa385 100644 --- a/packages/functional-tests/tests/react-conversion/syncV3SignIn.spec.ts +++ b/packages/functional-tests/tests/react-conversion/syncV3SignIn.spec.ts @@ -28,12 +28,6 @@ test.describe('severity-2 #smoke', () => { await signinReact.fillOutEmailFirstForm(credentials.email); await signinReact.fillOutPasswordForm(credentials.password); - await signinReact.sendWebChannelMessage( - createCustomEventDetail(FirefoxCommand.LinkAccount, { - ok: true, - }) - ); - await expect(connectAnotherDevice.fxaConnected).toBeEnabled(); }); }); @@ -55,12 +49,6 @@ test.describe('severity-2 #smoke', () => { await signinReact.fillOutEmailFirstForm(credentials.email); await signinReact.fillOutPasswordForm(credentials.password); - await signinReact.sendWebChannelMessage( - createCustomEventDetail(FirefoxCommand.LinkAccount, { - ok: true, - }) - ); - await page.waitForURL(/signin_token_code/); const code = await target.emailClient.waitForEmail( diff --git a/packages/fxa-settings/src/lib/channels/firefox.ts b/packages/fxa-settings/src/lib/channels/firefox.ts index 7b9f29120a..845144d990 100644 --- a/packages/fxa-settings/src/lib/channels/firefox.ts +++ b/packages/fxa-settings/src/lib/channels/firefox.ts @@ -79,11 +79,12 @@ export type SignedInUser = { export type FxALoginRequest = { email: string; - keyFetchToken: hexstring; sessionToken: hexstring; uid: hexstring; - unwrapBKey: string; verified: boolean; + keyFetchToken?: hexstring; + unwrapBKey?: string; + verifiedCanLinkAccount?: boolean; services?: { sync: { offeredEngines?: string[];