diff --git a/packages/template-retail-react-app/app/components/_app-config/index.jsx b/packages/template-retail-react-app/app/components/_app-config/index.jsx index 242c95a60e..855c0ef7c7 100644 --- a/packages/template-retail-react-app/app/components/_app-config/index.jsx +++ b/packages/template-retail-react-app/app/components/_app-config/index.jsx @@ -91,7 +91,7 @@ const AppConfig = ({children, locals = {}}) => { defaultDnt={DEFAULT_DNT_STATE} // Uncomment 'enablePWAKitPrivateClient' to use SLAS private client login flows. // Make sure to also enable useSLASPrivateClient in ssr.js when enabling this setting. - // enablePWAKitPrivateClient={true} + enablePWAKitPrivateClient={true} logger={createLogger({packageName: 'commerce-sdk-react'})} > diff --git a/packages/template-retail-react-app/app/ssr.js b/packages/template-retail-react-app/app/ssr.js index 1864b169de..0b36be09c3 100644 --- a/packages/template-retail-react-app/app/ssr.js +++ b/packages/template-retail-react-app/app/ssr.js @@ -39,7 +39,7 @@ const options = { mobify: config, // The port that the local dev server listens on - port: 3000, + port: 3001, // The protocol on which the development Express app listens. // Note that http://localhost is treated as a secure context for development, @@ -51,14 +51,14 @@ const options = { // Set this to false if using a SLAS public client // When setting this to true, make sure to also set the PWA_KIT_SLAS_CLIENT_SECRET // environment variable as this endpoint will return HTTP 501 if it is not set - useSLASPrivateClient: false, + useSLASPrivateClient: true, // If you wish to use additional SLAS endpoints that require private clients, // customize this regex to include the additional endpoints the custom SLAS // private client secret handler will inject an Authorization header. // The default regex is defined in this file: https://github.com/SalesforceCommerceCloud/pwa-kit/blob/develop/packages/pwa-kit-runtime/src/ssr/server/build-remote-server.js - // applySLASPrivateClientToEndpoints: - // /\/oauth2\/(token|passwordless\/(login|token)|password\/(reset|action))/, + applySLASPrivateClientToEndpoints: + /\/oauth2\/(token|passwordless\/(login|token)|password\/(reset|action))/, // If this is enabled, any HTTP header that has a non ASCII value will be URI encoded // If there any HTTP headers that have been encoded, an additional header will be @@ -305,7 +305,8 @@ const {handler} = runtime.createHandler(options, (app) => { directives: { 'img-src': [ // Default source for product images - replace with your CDN - '*.commercecloud.salesforce.com' + '*.commercecloud.salesforce.com', + "*.demandware.net" ], 'script-src': [ // Used by the service worker in /worker/main.js diff --git a/packages/template-retail-react-app/config/default.js b/packages/template-retail-react-app/config/default.js index 5aa70912a1..15517fe36f 100644 --- a/packages/template-retail-react-app/config/default.js +++ b/packages/template-retail-react-app/config/default.js @@ -20,7 +20,7 @@ module.exports = { }, login: { passwordless: { - enabled: false, + enabled: true, callbackURI: process.env.PASSWORDLESS_LOGIN_CALLBACK_URI || '/passwordless-login-callback', landingPath: '/passwordless-login-landing' @@ -44,9 +44,9 @@ module.exports = { commerceAPI: { proxyPath: `/mobify/proxy/api`, parameters: { - clientId: 'c9c45bfd-0ed3-4aa2-9971-40f88962b836', - organizationId: 'f_ecom_zzrf_001', - shortCode: '8o7m175y', + clientId: '6b996c35-61bd-4268-abde-4edc86159563', + organizationId: 'f_ecom_bhbg_stg', + shortCode: 'sandbox-001', siteId: 'RefArchGlobal' } }, @@ -62,7 +62,7 @@ module.exports = { tenantId: 'g82wgnrvm-ywk9dggrrw8mtggy.pc-rnd' }, oneClickCheckout: { - enabled: false + enabled: true } }, externals: [], @@ -80,11 +80,11 @@ module.exports = { ssrFunctionNodeVersion: '22.x', proxyConfigs: [ { - host: 'kv7kzm78.api.commercecloud.salesforce.com', + host: 'sandbox-001.api.commercecloud.salesforce.com', path: 'api' }, { - host: 'zzrf-001.dx.commercecloud.salesforce.com', + host: 'bhbg_stg.dx.commercecloud.salesforce.com', path: 'ocapi' } ] diff --git a/packages/template-typescript-minimal/package.json b/packages/template-typescript-minimal/package.json index 548ea1cf77..e6d3e0cfb9 100644 --- a/packages/template-typescript-minimal/package.json +++ b/packages/template-typescript-minimal/package.json @@ -53,11 +53,11 @@ "ssrFunctionNodeVersion": "22.x", "proxyConfigs": [ { - "host": "kv7kzm78.api.commercecloud.salesforce.com", + "host": "sandbox-001.api.commercecloud.salesforce.com", "path": "api" }, { - "host": "zzrf-001.dx.commercecloud.salesforce.com", + "host": "bhbg_stg.dx.commercecloud.salesforce.com", "path": "ocapi" } ] diff --git a/packages/test-commerce-sdk-react/app/components/_app-config/index.tsx b/packages/test-commerce-sdk-react/app/components/_app-config/index.tsx index 55e896002e..5d0dede5e6 100644 --- a/packages/test-commerce-sdk-react/app/components/_app-config/index.tsx +++ b/packages/test-commerce-sdk-react/app/components/_app-config/index.tsx @@ -28,14 +28,15 @@ const AppConfig = (props: AppConfigProps): ReactElement => { return ( {props.children}