@scayle/storefront-core 7.58.0 → 7.58.1
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
CHANGED
|
@@ -31,7 +31,7 @@ const getCheckoutToken = exports.getCheckoutToken = async function getCheckoutTo
|
|
|
31
31
|
carrier,
|
|
32
32
|
basketId: context.basketKey,
|
|
33
33
|
campaignKey: context.campaignKey
|
|
34
|
-
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"7.
|
|
34
|
+
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"7.58.0"}`).setProtectedHeader({
|
|
35
35
|
alg: "HS256",
|
|
36
36
|
typ: "JWT"
|
|
37
37
|
}).sign(secret);
|
|
@@ -21,7 +21,7 @@ export const getCheckoutToken = async function getCheckoutToken2(jwtPayload = {}
|
|
|
21
21
|
carrier,
|
|
22
22
|
basketId: context.basketKey,
|
|
23
23
|
campaignKey: context.campaignKey
|
|
24
|
-
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"7.
|
|
24
|
+
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"7.58.0"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
|
|
25
25
|
return {
|
|
26
26
|
accessToken: refreshedAccessToken,
|
|
27
27
|
checkoutJwt
|
|
@@ -75,7 +75,7 @@ const getAccessToken = exports.getAccessToken = async function getAccessToken2({
|
|
|
75
75
|
status: 401
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
-
if (
|
|
78
|
+
if (forceTokenRefresh) {
|
|
79
79
|
if (!context.refreshToken) {
|
|
80
80
|
return new Response("No refresh token present", {
|
|
81
81
|
status: 401
|
|
@@ -47,7 +47,7 @@ const getAccessToken = async function getAccessToken2({ forceTokenRefresh = fals
|
|
|
47
47
|
if (!context.accessToken) {
|
|
48
48
|
return new Response("No access token present", { status: 401 });
|
|
49
49
|
}
|
|
50
|
-
if (
|
|
50
|
+
if (forceTokenRefresh) {
|
|
51
51
|
if (!context.refreshToken) {
|
|
52
52
|
return new Response("No refresh token present", { status: 401 });
|
|
53
53
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-core",
|
|
3
|
-
"version": "7.58.
|
|
3
|
+
"version": "7.58.1",
|
|
4
4
|
"description": "Collection of essential utilities to work with the Storefront API",
|
|
5
5
|
"author": "SCAYLE Commerce Engine",
|
|
6
6
|
"license": "MIT",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@types/node": "20.14.5",
|
|
75
75
|
"@types/webpack-env": "1.18.5",
|
|
76
76
|
"@vitest/coverage-v8": "1.6.0",
|
|
77
|
-
"dprint": "0.46.
|
|
77
|
+
"dprint": "0.46.3",
|
|
78
78
|
"eslint": "9.5.0",
|
|
79
79
|
"eslint-formatter-gitlab": "5.1.0",
|
|
80
80
|
"publint": "0.2.8",
|