Skip to content

feat(deeplink): look up links on the workspace's link hosts, and name the app on every request - #9

Merged
onamfc merged 1 commit into
mainfrom
feat/link-domains
Oct 21, 2026
Merged

onamfc merged 1 commit into
mainfrom
feat/link-domains

Conversation

@onamfc

@onamfc onamfc commented Oct 21, 2026

Copy link
Copy Markdown
Member

What

A URL is looked up on the server when it is an http(s) URL on the baseUrl host or, with appToken set, on one of the workspace's link hosts: its link host label and verified custom domains.

  • LinkDomains learns the hosts from GET /api/sdk/v1/link-domains and saves them for the next launch. A link handled before the first fetch waits for it, at most 3 seconds, when no list was saved on an earlier launch.
  • A 4xx (unknown app token, or a server without the endpoint) forgets the list, and the SDK looks up links on the baseUrl host only. A network or server error keeps what is known.
  • With appToken set, every request carries X-LinkForty-App-Token, so a link lookup answers only with the app's own workspace's links.
  • Without appToken, the URLs looked up are those on the baseUrl host, as before. The host is compared rather than the URL prefix, so http and https both match.

This matches iOS 1.7.0 and Android 1.6.0.

Tests

LinkDomains: hosts from the server, saved list, saved list kept on a 5xx, list forgotten on a 4xx, no fetch without a token, the 3-second wait, and hostOf.

DeepLinkHandler imports react-native, which the test runner cannot parse, so the host decision lives in LinkDomains, which is tested directly.

… the app on every request

A URL is looked up on the server when it is an http(s) URL on the baseUrl
host or, with appToken set, on one of the workspace's link hosts, learned
from GET /api/sdk/v1/link-domains and saved for the next launch. A link
handled before the first fetch waits for it, at most 3 seconds, when no
list was saved. A 4xx forgets the list; a network or server error keeps it.

With appToken set, every request carries the X-LinkForty-App-Token header,
so a link lookup answers only with the app's own workspace's links.
@onamfc
onamfc merged commit 5719ddc into main Oct 21, 2026
1 check passed
github-actions Bot pushed a commit that referenced this pull request Oct 21, 2026
## 1.7.0 (2026-10-21)

* feat(deeplink): look up links on the workspace's link hosts, and name the app on every request (#9) ([5719ddc](5719ddc)), closes [#9](#9)
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants