flea/gro-2012-portal-sessionid-fallback
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>
web
GroomBook web app (extracted from groombook/app monorepo)
Description
Languages
TypeScript
99.5%
CSS
0.3%