Skip to content

Commit f599410

Browse files
authored
Update SLAS private proxy path (#1752)
* update private path to /mobify/slas/private * update proxy path and add loggings * disable private client by default * bump versions
1 parent 2e2780d commit f599410

File tree

34 files changed

+101
-75
lines changed

34 files changed

+101
-75
lines changed

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "3.5.0",
2+
"version": "3.5.1",
33
"packages": [
44
"packages/*"
55
]

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pwa-kit",
3-
"version": "3.5.0",
3+
"version": "3.5.1",
44
"scripts": {
55
"bump-version": "node ./scripts/bump-version/index.js",
66
"bump-version:retail-react-app": "node ./scripts/bump-version/index.js --package=@salesforce/retail-react-app",

packages/commerce-sdk-react/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v1.4.2 (Apr 17, 2024)
2+
- Update SLAS private proxy path [#1752](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1752)
3+
14
## v1.4.1 (Apr 16, 2024)
25
- Add missing params keys `allVariationProperties` and `perPricebook` for Shopper Search [#1750](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1750)
36

packages/commerce-sdk-react/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/commerce-sdk-react/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@salesforce/commerce-sdk-react",
3-
"version": "1.4.1",
3+
"version": "1.4.2",
44
"description": "A library that provides react hooks for fetching data from Commerce Cloud",
55
"homepage": "https://github.com/SalesforceCommerceCloud/pwa-kit/tree/develop/packages/ecom-react-hooks#readme",
66
"bugs": {
@@ -45,7 +45,7 @@
4545
"jwt-decode": "^4.0.0"
4646
},
4747
"devDependencies": {
48-
"@salesforce/pwa-kit-dev": "3.5.0",
48+
"@salesforce/pwa-kit-dev": "3.5.1",
4949
"@tanstack/react-query": "^4.28.0",
5050
"@testing-library/jest-dom": "^5.16.5",
5151
"@testing-library/react": "^14.0.0",
@@ -59,7 +59,7 @@
5959
"@types/react-helmet": "~6.1.6",
6060
"@types/react-router-dom": "~5.3.3",
6161
"cross-env": "^5.2.1",
62-
"internal-lib-build": "3.5.0",
62+
"internal-lib-build": "3.5.1",
6363
"jsonwebtoken": "^9.0.0",
6464
"nock": "^13.3.0",
6565
"nodemon": "^2.0.22",

packages/commerce-sdk-react/src/auth/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class Auth {
176176
constructor(config: AuthConfig) {
177177
// Special endpoint for injecting SLAS private client secret
178178
const baseUrl = config.proxy.split(`/mobify/proxy/api`)[0]
179-
const privateClientEndpoint = `${baseUrl}/mobify/scapi/shopper/auth`
179+
const privateClientEndpoint = `${baseUrl}/mobify/slas/private`
180180

181181
this.client = new ShopperLogin({
182182
proxy: config.enablePWAKitPrivateClient ? privateClientEndpoint : config.proxy,
@@ -221,12 +221,12 @@ class Auth {
221221

222222
/*
223223
* There are 2 ways to enable SLAS private client mode.
224-
* If enablePWAKitPrivateClient=true, we route SLAS calls to /mobify/scapi/shopper/auth
224+
* If enablePWAKitPrivateClient=true, we route SLAS calls to /mobify/slas/private
225225
* and set an internal placeholder as the client secret. The proxy will override the placeholder
226226
* with the actual client secret so any truthy value as the placeholder works here.
227227
*
228228
* If enablePWAKitPrivateClient=false and clientSecret is provided as a non-empty string,
229-
* private client mode is enabled but we don't route calls to /mobify/scapi/shopper/auth
229+
* private client mode is enabled but we don't route calls to /mobify/slas/private
230230
* This is how non-PWA Kit consumers of commerce-sdk-react can enable private client and set a secret
231231
*
232232
* If both enablePWAKitPrivateClient and clientSecret are truthy, enablePWAKitPrivateClient takes

packages/commerce-sdk-react/src/provider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const AuthContext = React.createContext({} as Auth)
8484
* ```
8585
* Note: The provider can enable SLAS Private Client mode in 2 ways.
8686
* `enablePWAKitPrivateClient` sets commerce-sdk-react to work with the PWA proxy
87-
* `/mobify/scapi/api/auth` to set the private client secret. PWA users should use
87+
* `/mobify/slas/private` to set the private client secret. PWA users should use
8888
* this option.
8989
*
9090
* Non-PWA Kit users can enable private client mode by passing in a client secret

packages/internal-lib-build/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/internal-lib-build/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "internal-lib-build",
3-
"version": "3.5.0",
3+
"version": "3.5.1",
44
"private": true,
55
"description": "Build tools for *libraries* in the monorepo",
66
"bugs": {
@@ -60,7 +60,7 @@
6060
"shelljs": "^0.8.5"
6161
},
6262
"devDependencies": {
63-
"@salesforce/pwa-kit-dev": "3.5.0",
63+
"@salesforce/pwa-kit-dev": "3.5.1",
6464
"npm-packlist": "^4.0.0",
6565
"typescript": "4.9.5"
6666
},

0 commit comments

Comments
 (0)