bilhej/frontend/src
Hermes Agent 120251867c
Some checks failed
CI / Lint, type check, unit tests, coverage (pull_request) Successful in 3m38s
CI / E2E browser tests (pull_request) Failing after 1m16s
fix(guest): move guest token from URL query to sessionStorage
The guest token (the customer's only credential) was passed as
?token=... in the URL query string on the payment page. Query strings
land in browser history, nginx/reverse-proxy access logs, and can leak
via Referer headers.

The magic-link landing /gast-order/:token is inherently URL-based
(accepted Notion/Stripe pattern), but the payment page does not need to
expose the token in the URL.

Changes:
  - GuestCheckoutPage.vue: store token in sessionStorage before
    navigating to payment page; remove token from query string
  - GuestOrderPage.vue: replace RouterLink with click handler that
    stores token in sessionStorage before navigating to payment;
    add useRouter import
  - GuestPaymentRedirect.vue: read token from sessionStorage with
    fallback to query.token for backward compatibility with existing
    magic links
  - GuestCheckoutPage.spec.ts: assert token is NOT in query, IS in
    sessionStorage after navigation
  - GuestPaymentRedirect.spec.ts: set sessionStorage in mount helper;
    clear sessionStorage in beforeEach

sessionStorage persists across page refreshes within the same tab, so
the payment page still survives refresh. If the user opens the payment
URL in a new tab (from history), sessionStorage is lost — but the
canonical re-entry point is the magic link /gast-order/:token, from
which they can navigate to payment again.

Closes #21
2026-07-18 11:41:58 +00:00
..
__tests__ fix(guest): move guest token from URL query to sessionStorage 2026-07-18 11:41:58 +00:00
api feat(guest): guest checkout without login (Swish + QR) 2026-06-22 10:35:56 +00:00
assets/styles Make customer-facing UI usable on smartphones. 2026-05-26 13:03:35 +02:00
components Refactor admin fulfillment into focused modules. 2026-05-28 14:34:03 +02:00
composables Log out users automatically when their JWT expires. 2026-06-17 12:43:31 +02:00
constants Refactor admin fulfillment into focused modules. 2026-05-28 14:34:03 +02:00
data refactor: redesign all pages and components with new design system 2026-05-16 16:11:01 +02:00
pages fix(guest): move guest token from URL query to sessionStorage 2026-07-18 11:41:58 +00:00
router feat(guest): guest checkout without login (Swish + QR) 2026-06-22 10:35:56 +00:00
stores Log out users automatically when their JWT expires. 2026-06-17 12:43:31 +02:00
utils Log out users automatically when their JWT expires. 2026-06-17 12:43:31 +02:00
App.vue refactor: add design system with CSS tokens, utilities, and app shell 2026-05-16 16:09:35 +02:00
env.d.ts Add production-only Umami analytics for bilhej.se. 2026-06-01 12:02:14 +02:00
main.ts Add production-only Umami analytics for bilhej.se. 2026-06-01 12:02:14 +02:00