fix(pair): route in-app camera v2 scans to the v2 supplicant screens - #21156
Draft
dschom wants to merge 1 commit into
Draft
fix(pair): route in-app camera v2 scans to the v2 supplicant screens#21156dschom wants to merge 1 commit into
dschom wants to merge 1 commit into
Conversation
Because: - A v2 QR scanned with a mobile Firefox's own camera opens /pair/supp, the v1 supplicant entry, so pairing completed on the legacy screens. - app-services holds the PKCE verifier for the code it expects back, so the page must not begin a second OAuth flow. This commit: - Hands /pair/supp off to /pair/supplicant/connect_this_device only when the authority's fragment, the browser's fxa_status and pairing.version all say v2 - Waits on fxa_status before choosing a flow, and only for a v=2 fragment - Sends the v2 post-OAuth reload to /pair/supplicant/sync_success instead of /oauth/success/:clientId - Reads the OAuth request from the URL in v2 when it carries one, asking the browser only when it does not - Adds unit coverage for the version gate and the param source Closes #FXA-14427
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
/pair/suppoff to/pair/supplicant/connect_this_deviceonly when the authority's fragment, the browser'sfxa_statusandpairing.versionall report v2fxa_statusbefore choosing a flow, and only for av=2fragment — v1 URLs are unaffected/pair/supplicant/sync_successrather than the v1/oauth/success/:clientIdpair_oauth_startonly when the URL carries noneIssue that this pull request solves
Closes: FXA-14427
Checklist
Put an
xin the boxes that applyHow to review (Optional)
pages/Pair/Supp/index.tsx, andgetOAuthParamsinpairing-supplicant-integration.tsPair/Suppgate first, then the param-source change it depends on/pair/suppand copies the authority's fragment over verbatim — hence av=2marker on a v1 route. Reusing that URL's OAuth request is load-bearing: app-services holds the PKCE verifier for the code it expects back, so a secondpair_oauth_startflow would strand it.Screenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
AndroidSupplicant.beginPairing()drives this exact path if a real-device regression guard is wanted.pairing.versionis not 2, or where the supplicant does not report v2 pairing support.