Skip to content

Commit 8183cb5

Browse files
authored
Merge pull request #4012 from SalesforceCommerceCloud/feature/b2c-email-cartridge
feat: add app_pwakit_base B2C cartridge for transactional email delivery
2 parents 66d7b06 + ba4ae17 commit 8183cb5

47 files changed

Lines changed: 2484 additions & 610 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/hybrid-cookie-domain-configuration.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Hybrid Cookie Domain Configuration
22

33
> **WIP: HttpOnly session cookies are in-progress. Do not enable `enableHttpOnlySessionCookies` in production.**
4-
4+
55
Maintain shopper sessions across subdomains by configuring a shared parent cookie domain. Without this configuration, browsers isolate cookies to individual hosts, causing shoppers to appear logged out and lose their baskets when crossing subdomain boundaries. The domain-level cookie applies to storefronts that use multiple subdomains, such as `www.` and `shop.` on the `example.com` domain. It also applies to hybrid PWA Kit and SFRA storefronts that serve different paths under one parent domain. This guide shows how to align the cookie domain settings on both PWA Kit and B2C Commerce to enable seamless cross-subdomain navigation.
66

77
## Overview

‎packages/pwa-kit-create-app/CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
## v3.21.0 (Oct 08, 2026)
55
- [Bugfix] Keep the generated `ssr.js.hbs` templates in sync with `template-retail-react-app` for Commerce Client image upload (`cc_enableImageUpload`): add `blob:` and `data:` to `img-src` in both SSR template variants so the widget's image preview and sent-image thumbnail are not blocked by CSP in generated projects. [#4053](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/4053)
6+
- Keep the generated `ssr.js.hbs` templates in sync with `template-retail-react-app`: fix GLO endpoints to read the SLAS access token from `req.headers.authorization` (sent by the client via `useAccessToken().getTokenWhenReady()`) instead of the `cc-at_*` cookie, which is never written in standard SLAS setups. Remove the unused `parseCookieValue` helper. Add `pwakit-notify` token acquisition via a dedicated private SLAS client: `getNotifyToken()` requires `notifyClientId` in `commerceAPI.parameters` and `PWA_KIT_NOTIFY_SLAS_CLIENT_SECRET`; there is no public-client fallback. **Do not add the `c_pwakit_notify` scope to the shopper client.** See `cartridges/app_pwakit_base/README.md` for the required notify-client setup. [#4012](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/4012)
67
- Keep the generated `ssr.js.hbs` templates in sync with `template-retail-react-app` for the `dw_attribution` first-touch marketing-attribution cookie (W-23493129): both SSR template variants now import `createAttributionCookieMiddleware`, construct it with the configured `cookieDomain`, and mount it on the catch-all render route, so generated projects write the attribution cookie instead of shipping the utility as dead code.
78
- Keep the generated `ssr.js.hbs` templates in sync with `template-retail-react-app` for Guest Order Lookup (GLO): add all `/api/order-lookup/*` Express route handlers (verify, order, oms-meta, cancel, return), helper functions (`makeShopperOrders`, `filterGuestOrderFields`, `parseGuestOrderCookie`, `evictIfNeeded`, `createVerifyThrottle`), and the `commerce-sdk-isomorphic` `ShopperOrders` import so generated projects compile and run the feature when `guestOrderLookup.enabled` is set to `true`. [#3982](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3982)
89
- Keep the generated Commerce Client auth-link templates in sync with `template-retail-react-app`: the browser reads the deployment-scoped `cim_af_ct_<orgId>_<embeddedServiceName>` storage value and calls SCRT2's `/iamessage/api/v2/authorization/authlink` endpoint directly with the Commerce Client JWT to obtain an `auth_link_key` for Token Bridge use. The generated `ssr.js.hbs` no longer registers a `/api/agent/authlink` proxy route. [#3981](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3981)

‎packages/pwa-kit-create-app/assets/bootstrap/js/config/default.js.hbs‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ module.exports = {
8585
enabled: false,
8686
{{/if}}
8787
// The mode for passwordless login. Valid values include 'email|callback'. Defaults to: 'callback'
88-
mode: 'email',
88+
mode: 'callback',
8989
// The callback URI, which can be an absolute URL (including third-party URIs) or a relative path set up by the developer.
9090
// Required when mode is set to 'callback'. If the env var `PASSWORDLESS_LOGIN_CALLBACK_URI` is set, it will override the config value.
91-
// callbackURI:
92-
// process.env.PASSWORDLESS_LOGIN_CALLBACK_URI || '/passwordless-login-callback',
91+
callbackURI:
92+
process.env.PASSWORDLESS_LOGIN_CALLBACK_URI || '/passwordless-login-callback',
9393
// The landing path for passwordless login
9494
landingPath: '/passwordless-login-landing'
9595
},
@@ -110,12 +110,17 @@ module.exports = {
110110
},
111111
resetPassword: {
112112
// The mode for reset password. Valid values include 'email|callback'. Defaults to: 'callback'
113-
mode: 'email',
113+
mode: 'callback',
114114
// The callback URI, which can be an absolute URL (including third-party URIs) or a relative path set up by the developer.
115115
// Required when mode is set to 'callback'. If the env var `RESET_PASSWORD_CALLBACK_URI` is set, it will override the config value.
116-
// callbackURI: process.env.RESET_PASSWORD_CALLBACK_URI || '/reset-password-callback',
116+
callbackURI: process.env.RESET_PASSWORD_CALLBACK_URI || '/reset-password-callback',
117117
// The landing path for reset password
118118
landingPath: '/reset-password-landing'
119+
},
120+
registrationVerification: {
121+
callbackURI:
122+
process.env.REGISTRATION_VERIFICATION_CALLBACK_URI ||
123+
'/registration-verification-callback'
119124
}
120125
},
121126
// The default site for your app. This value will be used when a siteRef could not be determined from the url
@@ -139,6 +144,7 @@ module.exports = {
139144
proxyPath: '/mobify/proxy/api',
140145
parameters: {
141146
clientId: '{{answers.project.commerce.clientId}}',
147+
notifyClientId: '',
142148
organizationId: '{{answers.project.commerce.organizationId}}',
143149
shortCode: '{{answers.project.commerce.shortCode}}',
144150
siteId: '{{answers.project.commerce.siteId}}'

0 commit comments

Comments
 (0)