You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/deep-links.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,6 +102,7 @@ addRoute(home);
102
102
- Handler function must be synchronous.
103
103
- Handler function must not change anything. Deep links are read-only, and all actions/changes must be confirmed by the user in the UI layer.
104
104
- For a deeper understanding of the route definitions and their properties, [check router implementation and its types](https://github.com/MetaMask/metamask-extension/blob/main/shared/lib/deep-links/routes/route.ts#L18).
105
+
- For a link to work as a deferred deep link, it needs to be added to the branch.io _LinkHub_. For more information check [deferred deep links section below](#deferred-deep-links).
105
106
106
107
## Architecture
107
108
@@ -201,6 +202,22 @@ classDiagram
201
202
202
203
Deep Link Router is instantiated in the background script ([background.js](https://github.com/MetaMask/metamask-extension/blob/main/app/scripts/background.js#L757)).
203
204
205
+
### Deferred deep links
206
+
207
+
Deferred deep links are used to navigate a user to a deep link route after the extension is installed.
208
+
For deferred deep link to work, it is required to add the specific link with its path to the branch.io _LinkHub_.
209
+
210
+
The extension receives deferred deep link data from the MetaMask website, which collects that data via the integrated Branch.io SDK.
211
+
212
+
Deferred deep link flow:
213
+
1. When a user lands on the MetaMask website download page, the website stores the deferred deep link inside cookie.
214
+
2. When the user installs MetaMask extension, the extension reads and stores the cookie from the MetaMask website.
215
+
3. Then extension navigates the user to the deferred deep link after successful onboarding.
216
+
217
+
Notes:
218
+
- Deferred deep link is stored in the extension's local storage immediately after installation.
219
+
- User is navigated to the deferred deep link only if they completed the onboarding process within the two hours after installation.
220
+
204
221
## Security
205
222
206
223
It is recommended that deep links provided by MetaMask are signed.
0 commit comments