Repository navigation
Conversation
Because: - The v2 scan_qr page never read the browser's sign-in status, so after a sync sign-out a reload or the timeout page's retry still minted a channel and showed a QR. - A phone that scanned it was approved by a desktop with no account, so its flow fell back to login. This commit: - Passes the already-fetched fxa_status result into the ScanQR container. - Waits for the status and only opens a channel for a verified signed-in user, otherwise hard-navigates to /pair, which owns the signed-out desktop. - Adds container tests for pending, signed-out, unverified, disconnected and unanswered browsers. Fixes FXA-14657
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because
This pull request
AuthAndAccountSetupRoutesalready fetches into the ScanQR container./pair.fxa_statusevery 5s while the QR is on screen and leaves for/pair, closing the channel, once the browser stops reporting a signed-in user.Issue that this pull request solves
Closes: FXA-14657
Checklist
Put an
xin the boxes that applyHow to review (Optional)
Screenshots (Optional)
FXA-14657 — signed-out desktop on the v2 QR page
/pairRecording (this branch): a signed-out Firefox opens
/pair/authority/scan_qrand is sent to/pair, which starts sign-in; after signing in the QR renders; a Sync sign-out while it is on screen sends the page back to/pair. Locally that lands on the connect page because the sign-out moves Firefox's channel to production; in production/pairgets a signed-out status and starts sign-in, as in the first half.video.mp4
Other information (Optional)
The ticket asks for a redirect to fxa-root. The redirect goes to
/pairrather than a bare/because/pairalready owns the signed-out desktop: it begins the sync OAuth flow, lands on fxa-root with the sync params, and returns to the QR page once the browser has an account again.Firefox sends no browser-to-page message on a sync sign-out, so the QR page polls
fxa_statusinstead. Silence counts as signed out:signOutresetsidentity.fxaccounts.remote.root, so on a non-production FxA the page loses its web channel entirely.🤖 Generated with Claude Code