Add Deep Linking into FxA Views and Prefill Forms

RESOLVED FIXED

Status

()

Firefox for iOS
Firefox Accounts
P3
normal
RESOLVED FIXED
a year ago
8 months ago

People

(Reporter: Vijay Budhram, Assigned: Vijay Budhram, NeedInfo)

Tracking

(Depends on: 1 bug)

unspecified
Other
iOS

Firefox Tracking Flags

(fxios8.0+)

Details

(Whiteboard: [MobileCore][fxa-waffle][b3])

Attachments

(3 attachments, 2 obsolete attachments)

(Assignee)

Description

a year ago
This is a feature request to add additional deep linking capabilities into FxiOS, in support of Firefox accounts.

Specifically, we should add the capability to directly launch into the FxA Sign-in view controller and prefill the login form with the passed email/code. We should also be able to reuse the existing deep linking scheme `firefox://`.

The extended scheme could look like below.

firefox://fxa=signin

The user is taken directly to the FxA Sign-in page. If param email/code is passed, then the email field on the page will be prefilled. Ex. firefox://fxa=signin&email=old@email.com&code=coder. After the page has been loaded, we could inject the javascript needed to fill out these input fields.

firefox://fxa=signup

The user is taken directly to the FxA Sign-up page and email field is prefilled. Ex. firefox://fxa=signup&email=new@email.com

In the event of an error while navigating or filling out the page, the current default action will be taken, which is to open the app.

Adding these capabilities will allow FxA to reduce the friction for signing up and signing in users.

Thoughts?
Flags: needinfo?(sleroux)
I think having the deep linking/auto filling of the FxA sign in form will be _way_ better than what we have now. As far as the schemes goes, I think it would work alright as you've listed. James has worked more on the schemes we currently support so I've CC'ed him for input.
Flags: needinfo?(sleroux)
re lingering PR
Flags: needinfo?(fpatel)
Let's chat about this in triage today. I think we should put this into an upcoming release.
Assignee: nobody → vbudhram
tracking-fxios: --- → ?
tracking-fxios: ? → 6.0+
Priority: -- → P2
Whiteboard: [MobileCore]
Flags: needinfo?(vbudhram)
I've left comments on the PR.
Flags: needinfo?(fpatel)
(Assignee)

Comment 7

a year ago
PR updated and merged. Thanks guys!
Flags: needinfo?(vbudhram)
master 54c89aa48812c35a5b6ffb32243bce544764f2cf
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Whiteboard: [MobileCore] → [MobileCore][needsuplift]
v6.x 767975f60dd5bed0db4873b1775d882d0b184d52
Whiteboard: [MobileCore][needsuplift] → [MobileCore]
Depends on: 1328579
Created attachment 8825160 [details] [diff] [review]
PR: https://github.com/mozilla-mobile/firefox-ios/pull/2311

Adds a feature flag to disable this code path for the upcoming 6.0 release.
Attachment #8825160 - Flags: review?(sarentz)
Attachment #8825160 - Flags: review?(fpatel)
Comment on attachment 8825160 [details] [diff] [review]
PR: https://github.com/mozilla-mobile/firefox-ios/pull/2311

https://github.com/mozilla-mobile/firefox-ios/pull/2311
Attachment #8825160 - Attachment description: Link to Github pull-request: https://github.com/mozilla-mobile/firefox-ios/pull/2249/files#diff-7c8dce404b977a471215d06058caec4aR127 → PR: https://github.com/mozilla-mobile/firefox-ios/pull/2311
Attachment #8825160 - Attachment is patch: true
Attachment #8825160 - Flags: review?(sarentz) → review+
Feature flag patch

master 9fb8dfcf4377271da5ec8f5ab8bb2a24c87024df
v6.x 593fe136d05807f502394732fd61659409db0fcd
Attachment #8825160 - Flags: review?(fpatel) → review+
Re-opening this issue - the original patch was backed out and we have a new scheme!

The new deep-link will be:

firefox://fxa-signin?signin=<token>

When opening FxA, the signin query parameter should be propagated as a query parameter to FxA.

:rfeeley - You mentioned to me that you have presented your designs to the Fx for iOS UX folks, 
can you present them to :sleroux about where in the onboarding flow FxA should be opened with 
this deeplink?
Flags: needinfo?(rfeeley)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Updated

10 months ago
tracking-fxios: 6.0+ → +
Priority: P2 → P3

Comment 15

10 months ago
Since I don't see it noted explicitly here, I want to note that we intend to use this "deferred deeplinking" via adjust, as documented here:

  https://docs.adjust.com/en/deeplinking/#deferred-deeplinking

End-to-end, the idea would be that:

  * On their desktop machine, the user e.g. sends themselves an SMS to install Firefox on their mobile
  * The SMS contains a link like https://app.adjust.com/2uo1qc?deep_link=firefox://fxa-signin?signin=<token> where the token is specific to their account
  * Via the magic of adjust, they install Firefox on their mobile and it triggers opening of the provided deeplink
  * Firefox opens into whatever onboarding flow that :rfeeley is working on here, and they see their account details pre-filled in the signin screen

Comment 16

10 months ago
(Using the whiteboard tag to link this into the FxA engineering waffleboard for tracking on our side as well; please let me know if this messes up any of your own uses of that field)
Whiteboard: [MobileCore] → [MobileCore][fxa-waffle]

Comment 17

10 months ago
Absolutely. Here is the link for Sleroux that shows the regular onboarding flow, on top of the proposed deep linked flow. https://mozilla.invisionapp.com/share/JABACOA4S#/228780472_Default

Robin tells me that there are changes being made to the onboarding flow. Let’s coordinate!
Flags: needinfo?(sleroux)
Flags: needinfo?(rfeeley)
Flags: needinfo?(randersen)

Updated

10 months ago
Flags: needinfo?(sleroux)
Whiteboard: [MobileCore][fxa-waffle] → [MobileCore][fxa-waffle][needstrellocard]
(Assignee)

Comment 18

10 months ago
Created attachment 8864271 [details] [review]
Link to Github pull-request: https://github.com/mozilla-mobile/firefox-ios/pull/2691

This PR updates FxA deep linking to use the new schema defined in https://bugzilla.mozilla.org/show_bug.cgi?id=1356386. It also removes the code that was prefilling email and access code from the app. Form filling will be performed from FxA via the passed signin query param.
Attachment #8813375 - Attachment is obsolete: true
Attachment #8825160 - Attachment is obsolete: true
Attachment #8864271 - Flags: review?(fpatel)

Updated

10 months ago
Attachment #8864271 - Flags: review?(fpatel) → review-

Updated

9 months ago
Attachment #8864271 - Flags: review- → review+
(Assignee)

Comment 20

9 months ago
Created attachment 8870948 [details] [review]
Pull Request

Forgot to add test file to project. Also added a couple minor tweaks from your last review.
Attachment #8870948 - Flags: review?(fpatel)

Updated

9 months ago
Attachment #8870948 - Flags: review?(fpatel) → review+

Updated

9 months ago
Whiteboard: [MobileCore][fxa-waffle][needstrellocard] → [MobileCore][fxa-waffle][needstrellocard][needsuplift]

Updated

9 months ago
tracking-fxios: + → 8.0+
(Assignee)

Comment 22

9 months ago
Created attachment 8871520 [details] [review]
Set flag to enabled FxA Deep linking in release channel
Attachment #8871520 - Flags: review?(sarentz)
Attachment #8871520 - Flags: review?(fpatel)

Updated

9 months ago
Attachment #8871520 - Flags: review?(fpatel) → review+

Updated

9 months ago
Attachment #8871520 - Flags: review?(sarentz) → review+

Updated

9 months ago
Whiteboard: [MobileCore][fxa-waffle][needstrellocard][needsuplift] → [MobileCore][fxa-waffle][needstrellocard]

Updated

9 months ago
Status: REOPENED → RESOLVED
Last Resolved: a year ago9 months ago
Resolution: --- → FIXED
Whiteboard: [MobileCore][fxa-waffle][needstrellocard] → [MobileCore][fxa-waffle]

Updated

9 months ago
Whiteboard: [MobileCore][fxa-waffle] → [MobileCore][fxa-waffle][needsuplift][b3]

Updated

8 months ago
Whiteboard: [MobileCore][fxa-waffle][needsuplift][b3] → [MobileCore][fxa-waffle][b3]
You need to log in before you can comment on or make changes to this bug.