fix(GRO-2012): pass portalSessionId to RescheduleFlow for SSO bridge customers #38

Merged
Flea Flicker merged 1 commits from flea/gro-2012-portal-sessionid-fallback into dev 2026-06-01 17:28:43 +00:00

1 Commits

Author SHA1 Message Date
Flea Flicker f8c6737ede fix(GRO-2012): pass portalSessionId to RescheduleFlow for SSO bridge customers
CI / Test (pull_request) Successful in 21s
CI / Lint & Typecheck (pull_request) Successful in 25s
CI / Build & Push Docker Image (pull_request) Successful in 41s
The <RescheduleFlow> render in CustomerPortal.tsx (line 329) was passing
sessionId={session?.id ?? null}, so SSO-bridge customers (no impersonation
session, only a portalSessionId from the Better Auth bridge) received a
null sessionId. That null leaked into the X-Impersonation-Session-Id
header on the internal /api/book/availability call, causing 401s.

This was missed when renderSection() was updated to session?.id ??
portalSessionId; the RescheduleFlow render block was not.

Fix: align the RescheduleFlow prop with the rest of the portal by using
the same ?? portalSessionId fallback. Existing impersonation flow is
unaffected (session?.id is still preferred when present).

- UAT_PLAYBOOK §5.26 added covering RescheduleFlow under SSO bridge.
- Unit test added that asserts RescheduleFlow receives the bridged
  sessionId for SSO customers (fails without this fix).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-01 17:25:58 +00:00