@salesforce/commerce-sdk-react 5.4.0-nightly-20260807082212 → 5.4.0-preview.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -4
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
## v5.4.0-
|
|
2
|
-
## v5.4.0-dev (Aug 07, 2026)
|
|
3
|
-
## v3.20.0-nightly-20260807082212 (Aug 07, 2026)
|
|
4
|
-
## v5.4.0-dev (Jul 13, 2026)
|
|
1
|
+
## v5.4.0-preview.0 (Aug 07, 2026)
|
|
5
2
|
- [Bugfix] Fix Trusted Agent (Order on Behalf) login failing when the storefront sends a `Cross-Origin-Opener-Policy: same-origin` header. That header severs the authentication popup so the opener can no longer read the popup location and `popup.closed` wrongly reports `true`, which made the flow reject with "Popup closed without authenticating." before the agent finished. `useTrustedAgent` now receives the result out of band via `postMessage` from the same origin callback page with a `BroadcastChannel` fallback, and it no longer treats a severed `popup.closed` as user cancellation (a genuinely abandoned popup is still caught by the existing timeout). Exposes a `useTrustedAgentPopupCallback` hook for the same origin callback page to hand the OAuth result back to the opener. The hook owns the message contract and the delivery. After delivering the result the callback page also closes itself, since the opener's `popup.close()` is unreliable through the COOP-severed window reference. Additive to the public API. Adds `TRUSTED_AGENT_RUNBOOK.md` documenting the callback contract, the upgrade steps, and how to reproduce and verify the flow.
|
|
6
3
|
- [Bugfix] Gracefully handle stale or malformed session tokens on load. A truncated `cc-at` cookie chunk or a value left by an older token format could be handed to `jwt-decode`, surfacing an `Invalid token specified: missing part #2` error to the storefront during `ready()`. The auth module now decodes such tokens defensively: an undecodable access token is discarded (and its cookie cleared) and treated as expired, an undecodable SFRA `cc-at` handoff token is cleared with a fallback to the local store, and a malformed `fetchedToken` is ignored — in every case the flow falls through to a refresh / guest login instead of throwing. Only affects non-HttpOnly / SSR / hybrid mode.
|
|
7
4
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/commerce-sdk-react",
|
|
3
|
-
"version": "5.4.0-
|
|
3
|
+
"version": "5.4.0-preview.0",
|
|
4
4
|
"description": "A library that provides react hooks for fetching data from Commerce Cloud",
|
|
5
5
|
"homepage": "https://github.com/SalesforceCommerceCloud/pwa-kit/tree/develop/packages/ecom-react-hooks#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"jwt-decode": "^4.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@salesforce/pwa-kit-dev": "3.20.0-
|
|
49
|
+
"@salesforce/pwa-kit-dev": "3.20.0-preview.0",
|
|
50
50
|
"@tanstack/react-query": "^4.28.0",
|
|
51
51
|
"@testing-library/jest-dom": "^5.16.5",
|
|
52
52
|
"@testing-library/react": "^14.0.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@types/react-helmet": "~6.1.6",
|
|
62
62
|
"@types/react-router-dom": "~5.3.3",
|
|
63
63
|
"cross-env": "^5.2.1",
|
|
64
|
-
"internal-lib-build": "3.20.0-
|
|
64
|
+
"internal-lib-build": "3.20.0-preview.0",
|
|
65
65
|
"jsonwebtoken": "^9.0.0",
|
|
66
66
|
"nock": "^13.3.0",
|
|
67
67
|
"nodemon": "^2.0.22",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"publishConfig": {
|
|
99
99
|
"directory": "dist"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "63b3848e2c46b8e1ca540f8c80e7f9d96a4a7cb9"
|
|
102
102
|
}
|