Expand description
Magic link — encode/decode a ConnectionIdentifier as a shareable link for email/text/web
onboarding. A single connection payload can travel three interchangeable ways, all decoded by
from_link:
- A custom-scheme deep link (
web+qualia://connect?p=<payload>) that opens the app directly. - A domain-hosted HTTPS fallback (
https://<domain>/w#<payload>) — a normal link that works in any browser and, on a device with the app registered, hands off to it. The payload rides in the URL#fragment so it is never sent to the hosting server (fragments are client-only). - A bare
qcx1_…string (paste-anywhere).
The payload in every form is the self-certifying qcx1_<base64url> from
ConnectionIdentifier::encode; recipients verify it locally, so the link carries no trust in the
transport. base64url is already URL-safe, but we percent-decode defensively on the way in.
Constants§
- SCHEME
- Custom URL scheme registered by the app for deep links.
Functions§
- from_
link - Decode a
ConnectionIdentifierfrom ANY supported link form: - to_
deep_ link - Build a custom-scheme deep link that opens the app directly:
web+qualia://connect?p=<id.encode()?>. - to_
https_ link - Build a domain-hosted HTTPS fallback link:
https://<domain>/w#<id.encode()?>. - to_
mailto - Build a
mailto:URI that pre-fills an onboarding email: a short human line plus the deep link in the body. Both subject and body are percent-encoded.