Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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'})}
>
<MultiSiteProvider site={locals.site} locale={locals.locale} buildUrl={locals.buildUrl}>
Expand Down
11 changes: 6 additions & 5 deletions packages/template-retail-react-app/app/ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions packages/template-retail-react-app/config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
}
},
Expand All @@ -62,7 +62,7 @@ module.exports = {
tenantId: 'g82wgnrvm-ywk9dggrrw8mtggy.pc-rnd'
},
oneClickCheckout: {
enabled: false
enabled: true
}
},
externals: [],
Expand All @@ -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'
}
]
Expand Down
4 changes: 2 additions & 2 deletions packages/template-typescript-minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ const AppConfig = (props: AppConfigProps): ReactElement => {
return (
<CommerceApiProvider
siteId={siteId}
shortCode="kv7kzm78"
clientId="4afbc51f-6423-41c8-8b29-d7f2825b5bee"
organizationId="f_ecom_zzrf_006"
redirectURI="http://localhost:3000/callback"
proxy={`http://localhost:3000/${String(proxyBasePath)}/api`}
shortCode="sandbox-001"
clientId="6b996c35-61bd-4268-abde-4edc86159563"
organizationId="f_ecom_bhbg_stg"
redirectURI="http://localhost:3001/callback"
proxy={`http://localhost:3001/${String(proxyBasePath)}/api`}
locale={locale}
currency="USD"
headers={headers}
enablePWAKitPrivateClient={true}
>
{props.children}
<div
Expand Down
4 changes: 2 additions & 2 deletions packages/test-commerce-sdk-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,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"
}
]
Expand Down