Skip to content

Bug 2068241 - When Firefox is already installed and onboarded, open a custom tab for the sign-in flow. - #415

Closed
t-p-white wants to merge 1 commit into
mozilla-firefox:autolandfrom
t-p-white:2068241
Closed

t-p-white wants to merge 1 commit into
mozilla-firefox:autolandfrom
t-p-white:2068241

Conversation

@t-p-white

@t-p-white t-p-white commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

A QR-scanned pairing link (accounts.firefox.com/pair#channel_id=...) reaches Firefox through the App Links filter on IntentReceiverActivity. Previously, it fell through to the regular tab processor, leaving the FxA page open as a normal tab after sign-in or when abandoned.

IntentReceiverActivity now records pairing_link_opened and opens the link with createAuthCustomTabIntent, the same route every sign-in entry point takes into AuthCustomTabActivity. That activity finishes on onAuthenticated and removes its custom tab whenever it is left, so neither success nor abandonment leaves a tab behind. Pairing links no longer count towards opened_link.

This mirrors PairFragment, which handles the same URL from the in-app QR scanner:

  • In-app scanner: PairFragment hands the URL to the native pairing flow and opens the resulting /pair/supp OAuth URL in the auth custom tab.
  • External scanner: the /pair page itself loads in the auth custom tab, and FxA starts OAuth over the pairing v2 web channel.

Both complete through the fxaccounts:oauth_login web channel message.

The receiver’s transparent theme and the application context both lack the Material colorSurface attribute that createCustomTabIntent reads, so the intent is built using a ContextThemeWrapper with NormalTheme.


Lando: link
Bugzilla: bug 2068241

🚫 This pull request has 1 blocker.

@t-p-white
t-p-white marked this pull request as ready for review October 26, 2026 14:58
@lando-web
lando-web Bot requested a review from a team October 26, 2026 14:58
@mozilla-code-review

Copy link
Copy Markdown

No new issues detected. This pull request is 🆗

@rocketsroger rocketsroger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. One question unrelated to this change but we might want to update.

@t-p-white

Copy link
Copy Markdown
Contributor Author

@lando-web
lando-web Bot requested a review from a team October 27, 2026 09:36
lando-worker Bot pushed a commit that referenced this pull request Oct 27, 2026
… custom tab for the sign-in flow. r=roger

A QR-scanned pairing link (`accounts.firefox.com/pair#channel_id=...`) reaches Firefox through the App Links filter on `IntentReceiverActivity`. Previously, it fell through to the regular tab processor, leaving the FxA page open as a normal tab after sign-in or when abandoned.

`IntentReceiverActivity` now records `pairing_link_opened` and opens the link with `createAuthCustomTabIntent`, the same route every sign-in entry point takes into `AuthCustomTabActivity`. That activity finishes on `onAuthenticated` and removes its custom tab whenever it is left, so neither success nor abandonment leaves a tab behind. Pairing links no longer count towards `opened_link`.

This mirrors `PairFragment`, which handles the same URL from the in-app QR scanner:

- **In-app scanner:** `PairFragment` hands the URL to the native pairing flow and opens the resulting `/pair/supp` OAuth URL in the auth custom tab.
- **External scanner:** the `/pair` page itself loads in the auth custom tab, and FxA starts OAuth over the pairing v2 web channel.

Both complete through the `fxaccounts:oauth_login` web channel message.

The receiver’s transparent theme and the application context both lack the Material `colorSurface` attribute that `createCustomTabIntent` reads, so the intent is built using a `ContextThemeWrapper` with `NormalTheme`.

Pull request: #415
@lando-worker

lando-worker Bot commented Oct 27, 2026

Copy link
Copy Markdown

Pull request closed by commit 7d5b730

@lando-worker lando-worker Bot closed this Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants