Closed Bug 1371499 Opened 7 years ago Closed 7 years ago

Refactor url handling (deep-link, open-url, fxa-signin) code

Categories

(Firefox for iOS :: General, enhancement, P1)

Other
iOS
enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1355636
Tracking Status
fxios 8.0+ ---

People

(Reporter: st3fan, Assigned: bmunar)

References

Details

(Whiteboard: [MobileCore][mma][b3])

Attachments

(1 file)

55 bytes, text/x-github-pull-request
Details | Review
I'm not happy with how we now have three different things under the firefox:// scheme:

- firefox://fxa-signin?signin=<token>&someQuery=<data>...
- firefox://open-url?deep-link=https%253A...
- firefox://anything-here-does-not-matter?deeplink=https%253A...

This reflects in the code, which is handling the last two cases combined and seems all over the place. And the URL style for the last two is not enforced .. you can actually replace open-url with anything. This is not strict enough.

I would like to ask for three things:

- Introduce a firefox://deep-link?url= style url
- Enforce a firefox://open-url?url= style for the public API
- Refactor this code to have three clear separate blocks or functions to handle firefox://fxa-signin, firefox://open-url and firefox://deep-link.
Whiteboard: [MobileCore][mma][b3]
Blocks: 1351446
Depends on: 1369554
(In reply to Stefan Arentz [:st3fan] from comment #0)
> I'm not happy with how we now have three different things under the
> firefox:// scheme:
> 
> - firefox://fxa-signin?signin=<token>&someQuery=<data>...
> - firefox://open-url?deep-link=https%253A...
> - firefox://anything-here-does-not-matter?deeplink=https%253A...
> 
> This reflects in the code, which is handling the last two cases combined and
> seems all over the place. And the URL style for the last two is not enforced
> .. you can actually replace open-url with anything. This is not strict
> enough.
> 
> I would like to ask for three things:
> 
> - Introduce a firefox://deep-link?url= style url
> - Enforce a firefox://open-url?url= style for the public API
> - Refactor this code to have three clear separate blocks or functions to
> handle firefox://fxa-signin, firefox://open-url and firefox://deep-link.

Stefan to be clear, the following deep links would be available from external apps:
firefox://fxa-signin, firefox://open-url

The following deep links would not be available from external apps:
firefox://deep-link

??
Flags: needinfo?(sarentz)
(In reply to Stefan Arentz [:st3fan] from comment #0)
> I'm not happy with how we now have three different things under the
> firefox:// scheme:
> 
> - firefox://fxa-signin?signin=<token>&someQuery=<data>...
> - firefox://open-url?deep-link=https%253A...
> - firefox://anything-here-does-not-matter?deeplink=https%253A...
> 
> This reflects in the code, which is handling the last two cases combined and
> seems all over the place. And the URL style for the last two is not enforced
> .. you can actually replace open-url with anything. This is not strict
> enough.
> 
> I would like to ask for three things:
> 
> - Introduce a firefox://deep-link?url= style url
> - Enforce a firefox://open-url?url= style for the public API
> - Refactor this code to have three clear separate blocks or functions to
> handle firefox://fxa-signin, firefox://open-url and firefox://deep-link.

Your proposal makes sense to me. Should this also handle existing deep linking capabilities? Currently, FxiOS in App Store can launch any url with firefox://?url=<url>.
Attached file PR
Attachment #8877324 - Flags: review?(sarentz)
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Flags: needinfo?(sarentz)
Attachment #8877324 - Flags: review?(sarentz)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: