Problem
Three session fields are written (or expected) but never reach the code that needs them. Verified on master:
EpCtx.accountId is always undefined. Both the example catchall page and proxy-routes.ts read session.user?.accountId — a field that does not exist. The account id lives at the raw session.epAccountId, which the public EpSession shape (create-ep-auth-better.ts) does not surface at all (epAccountId/epAccountToken/epAccountExpires are cookie-only).
locale/currency never reach EpCtx on either path: EpSessionData has no such fields, the proxy reads session.locale (always undefined), and the catchall never passes them into buildEpCtx. Net: normalizeCart(..., "en-US") always, and the currency header is never sent.
Consequences
Account-scoped reads silently behave anonymous; localized pricing/formatting is hardcoded to en-US.
Fix
Found during the session-system audit behind the internals guide; see also #279 for the security workstream this sits beside.
Problem
Three session fields are written (or expected) but never reach the code that needs them. Verified on master:
EpCtx.accountIdis alwaysundefined. Both the example catchall page andproxy-routes.tsreadsession.user?.accountId— a field that does not exist. The account id lives at the rawsession.epAccountId, which the publicEpSessionshape (create-ep-auth-better.ts) does not surface at all (epAccountId/epAccountToken/epAccountExpiresare cookie-only).locale/currencynever reachEpCtxon either path:EpSessionDatahas no such fields, the proxy readssession.locale(always undefined), and the catchall never passes them intobuildEpCtx. Net:normalizeCart(..., "en-US")always, and the currency header is never sent.Consequences
Account-scoped reads silently behave anonymous; localized pricing/formatting is hardcoded to en-US.
Fix
EpSession(e.g.session.account: { id, token, expires } | null) and update both read sitesbuildEpCtxon both the SSR and proxy pathsEpCtxwithaccountIdafter/ep/account/login; locale reachesnormalizeCartFound during the session-system audit behind the internals guide; see also #279 for the security workstream this sits beside.