Skip to content

feat(app-links): show a get-the-app page for sign-in links opened without the app - #497

Merged
ryzizub merged 6 commits into
2026from
fix/app-link-landing-pages
Oct 27, 2026
Merged

ryzizub merged 6 commits into
2026from
fix/app-link-landing-pages

Conversation

@ryzizub

@ryzizub ryzizub commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Summary

The app's sign-in email link (/login/<code>) now lands on a get-the-app page instead of the 404 when the app is not installed, and the code never reaches analytics. lineupApi also answers the app's PWA cross-origin, at app.devfest.cz and devfest-cz-app.web.app.

Why

With the app installed, iOS and Android open the sign-in link in the app. Without it (a computer, or a phone before install) the browser hit the 404. The PWA (one Hosting site at app.devfest.cz and devfest-cz-app.web.app) could not read /api/lineup because the endpoint sent no CORS headers.

Behavior

  • /login/<code> shows a noindex page with App Store and Google Play links, kept out of the sitemap. One static page serves every code through a Hosting rewrite in firebase.json (/login/**), since a static build has no page per code.
  • The code never reaches analytics: page_location and page_referrer are cut to /login/, and Performance Monitoring does not start on that path.
  • /app now shows the App Store and Google Play badges instead of "Coming soon": the store links live once, in src/lib/app-links.ts, filled with the live listings.
  • lineupApi sends Access-Control-Allow-Origin only to https://app.devfest.cz, https://devfest-cz-app.web.app and http://localhost:*, answers the preflight, and always sends Vary: Origin so the CDN keeps one copy per origin. The other /api/* endpoints stay same-origin.
  • Needs the website deploy (hosting, and the functions deploy on merge) before Friday 30 Oct, when the app's sign-in links go out.
  • A PR preview calls production functions, so the CORS change is visible only after the functions deploy.

Files

  • src/pages/login/index.astro: the page, store links from src/lib/app-links.ts.
  • src/lib/firebase.ts: sign-in link URLs redacted for GA4, Performance skipped on them.
  • firebase.json: the rewrite. astro.config.mjs: the page out of the sitemap.
  • functions/src/lib/cors.ts (+ tests for the origin match, preflight, Vary: Origin and a refused origin), cached-endpoint.ts, lineup/lineup-api.ts: opt-in CORS per cached endpoint, on for lineupApi.
  • scripts/a11y.mjs: the page in the axe sweep. README.md, .claude/rules/api.md, analytics.md, backend.md: docs.
  • npm run verify passes in full (check, complexity, function tests, a11y); nothing skipped.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

🤖 Generated with Claude Code

…inks opened without the app

/game/<token> and /login/<code> open the DevFest.cz app when it is installed. Without it they hit the 404; they now land on a noindex page with App Store and Google Play links, served for every token by a Hosting rewrite.
lineupApi answers https://devfest-cz-app.web.app (and localhost dev servers) with CORS headers and Vary: Origin, so the edge cache keeps one copy per origin.
…one set of store links

page_location and page_referrer for /login/<code> and /game/<token> are cut to /login/ and /game/ before they reach GA4, and Performance Monitoring no longer boots on those paths. The get-the-app pages read the store links from APP_LINKS, now filled with the live App Store and Google Play listings, so /app shows the badges too. applyReadCors gets tests for the preflight, Vary: Origin and a refused origin.
…origin

The PWA is one Hosting site under app.devfest.cz and devfest-cz-app.web.app; lineupApi now allows both, plus localhost for its dev server.
@ryzizub
ryzizub marked this pull request as ready for review October 27, 2026 20:11
…arry only a token

The printed codes hold a bare token, never a devfest.cz/game URL, so nothing lands on /game. Its page, rewrite, sitemap filter, a11y entry and analytics trimming go; /login keeps all of them.
@ryzizub ryzizub changed the title feat(app-links): show a get-the-app page for game codes and sign-in links opened without the app feat(app-links): show a get-the-app page for sign-in links opened without the app Oct 27, 2026
@ryzizub
ryzizub merged commit e56d227 into 2026 Oct 27, 2026
5 checks passed
@ryzizub
ryzizub deleted the fix/app-link-landing-pages branch October 27, 2026 20:19

This branch was successfully deployed

1 active deployment
preview — bb42a221 Deployed Oct 27, 2026 by ryzizub via build_and_preview #761
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.

1 participant