Bug 2095146 - Advance onboarding sync cards once the account is authenticated #459 (firefox-autoland@autoland)

Warnings
  • Checking...
Blockers
  • Checking...
Branches bug2095146 -> autoland
Repo firefox-autoland@autoland (git) (git://github.com/corentinbect/firefox.git)
Author corentinbect
State closed
Commit Title

Bug 2095146 - Advance onboarding sync cards once the account is authenticated

Commit Body

Selecting "Sign in via email" on the onboarding pairing sync card started the authentication and also called `scrollToNextPageOrDismiss()` immediately. Since this was the last page of the onboarding, the onboarding completed and the homepage was displayed for a short period before the sign in page opens. The email button no longer advances the onboarding. Instead, the signed in `LaunchedEffect` in `OnboardingScreen` advances only when the account is authenticated. That effect used to observe `SyncState.account`, which is only sets once the profile is returned from the server. Bug 2031498 changed when the authenticated state is dispatched: `AccountState.Authenticated` used to be dispatched with the account after the profile request. It is now dispatched before this network call. Observing `AccountState.Authenticated` instead navigates the user to the homepage as soon as authentication completes, removing a delay after every onboarding sync call coming from the profile fetch. Because the signed in state is also read when signing in through the old sign in card and the new pairing card, the `OnboardingSyncFlowResult` added in bug 2092151 and bug 2092623 is no longer needed and has been removed. As a result, scanning a QR code now advances the onboarding once the authentication completes, rather than as soon as the QR code is scanned.

Landings

Successfully landed

Landing requested on , by cbect@mozilla.com.

Landing Job: 125189

Last update:

Result: 225e2b6abc91b5966c1537d7d9309df31c598668 on firefox-autoland@autoland (git)

Links: Treeherder