Skip to content

Serve apple-app-site-association on the live site for iOS universal links - #134

Merged
advitagelli merged 1 commit into
mainfrom
akul/apple-app-site-association
Aug 6, 2026
Merged

Serve apple-app-site-association on the live site for iOS universal links#134
advitagelli merged 1 commit into
mainfrom
akul/apple-app-site-association

Conversation

@akulsharma1

Copy link
Copy Markdown
Contributor

Summary

Magic-link emails for mobile point at https://reflectionsprojections.org/auth/mobile/login?token=…. For iOS to open that link in rp-mobile instead of the browser, the domain must serve /.well-known/apple-app-site-association as JSON. It currently returns the SPA HTML with text/html.

The AASA was added to rp-monorepo (ReflectionsProjections/rp-monorepo#32) — but reflectionsprojections.org is deployed from this repo (apps/site → Cloudflare Pages project rp-web-site), not from the rp-monorepo Pages project, so that fix never reached production. (Verified: rp-monorepo.pages.dev/.well-known/apple-app-site-association serves correct JSON; the live domain serves this repo's 2025 site.)

Changes

  • apps/site/public/.well-known/apple-app-site-association — same file as rp-monorepo#32: app ID 8VNQTQM2L6.com.reflectionsprojections (Apple team + bundle ID from rp-mobile), applinks scoped to /auth/mobile/login only, plus webcredentials.
  • apps/site/public/_headers — Cloudflare Pages headers rule forcing Content-Type: application/json on the extensionless file (the existing assetlinks.json gets JSON via its extension; extensionless files default to octet-stream).

Testing

  • yarn build in apps/site: dist/.well-known/apple-app-site-association and dist/_headers are present.
  • After merge/deploy: curl -i https://reflectionsprojections.org/.well-known/apple-app-site-association should return the JSON with content-type: application/json.
  • Then validate Apple's CDN copy: https://app-site-association.cdn-apple.com/a/v1/reflectionsprojections.org (can take up to ~24h to refresh).

Notes

Serving the AASA is necessary but not sufficient — rp-mobile still needs the associatedDomains (applinks:reflectionsprojections.org) entitlement and a handler for the /auth/mobile/login route that posts the token to POST /auth/magic-links/verify. That will be done separately in rp-mobile.

🤖 Generated with Claude Code

…inks

reflectionsprojections.org is deployed from this repo's apps/site (Cloudflare
Pages project rp-web-site), not from rp-monorepo, so the AASA file added
there (rp-monorepo#32) never reached production and the path still returns
the SPA HTML. iOS therefore never associates the domain, and magic-link
emails open in the browser instead of rp-mobile.

Adds the AASA next to the existing assetlinks.json, scoped to the
/auth/mobile/login callback path, plus a _headers rule so Cloudflare Pages
serves the extensionless file as application/json.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploying rp-web-site with  Cloudflare Pages  Cloudflare Pages

Latest commit: e6a1335
Status: ✅  Deploy successful!
Preview URL: https://17430dfb.rp-web-site.pages.dev
Branch Preview URL: https://akul-apple-app-site-associat.rp-web-site.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rp-web-dash with  Cloudflare Pages  Cloudflare Pages

Latest commit: e6a1335
Status: ✅  Deploy successful!
Preview URL: https://61f1ef11.rp-web-dash.pages.dev
Branch Preview URL: https://akul-apple-app-site-associat.rp-web-dash.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rp-web-info with  Cloudflare Pages  Cloudflare Pages

Latest commit: e6a1335
Status: ✅  Deploy successful!
Preview URL: https://b67da399.rp-web-info.pages.dev
Branch Preview URL: https://akul-apple-app-site-associat.rp-web-info.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rp-web-hype with  Cloudflare Pages  Cloudflare Pages

Latest commit: e6a1335
Status: ✅  Deploy successful!
Preview URL: https://c104784c.rp-web-hype.pages.dev
Branch Preview URL: https://akul-apple-app-site-associat.rp-web-hype.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rp-web-admin with  Cloudflare Pages  Cloudflare Pages

Latest commit: e6a1335
Status: ✅  Deploy successful!
Preview URL: https://8a836549.rp-web-admin.pages.dev
Branch Preview URL: https://akul-apple-app-site-associat.rp-web-admin.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rp-web-sponsor with  Cloudflare Pages  Cloudflare Pages

Latest commit: e6a1335
Status: ✅  Deploy successful!
Preview URL: https://1f095360.rp-web-sponsor.pages.dev
Branch Preview URL: https://akul-apple-app-site-associat.rp-web-sponsor.pages.dev

View logs

@advitagelli

Copy link
Copy Markdown
Contributor

looks shit, ship it

@advitagelli
advitagelli merged commit a515381 into main Aug 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants