@agnostack/next-shopify 1.13.5-beta.2 → 1.13.5-beta.3
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 +7 -0
- package/dist/lib/handlers/api/proxy.d.ts.map +1 -1
- package/dist/lib/handlers/api/proxy.js +119 -149
- package/dist/lib/handlers/api/proxy.js.map +1 -1
- package/dist/lib/utils/index.d.ts +1 -0
- package/dist/lib/utils/index.js +1 -0
- package/dist/lib/utils/index.js.map +1 -1
- package/dist/lib/utils/verification.d.ts +2 -0
- package/dist/lib/utils/verification.d.ts.map +1 -0
- package/dist/lib/utils/verification.js +63 -0
- package/dist/lib/utils/verification.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.13.5-beta.3](https://github.com/agnostack/next-shopify/compare/v1.13.5-beta.2...v1.13.5-beta.3) (2023-11-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* wip ([825f688](https://github.com/agnostack/next-shopify/commit/825f688f614be631c13a70e1c652c45f742408ed))
|
|
7
|
+
|
|
1
8
|
## [1.13.5-beta.2](https://github.com/agnostack/next-shopify/compare/v1.13.5-beta.1...v1.13.5-beta.2) (2023-11-29)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../../../src/lib/handlers/api/proxy.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../../../src/lib/handlers/api/proxy.js"],"names":[],"mappings":"AAmCO,sHA2LN"}
|
|
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
6
6
|
const nextjs_cors_1 = tslib_1.__importDefault(require("nextjs-cors"));
|
|
7
7
|
const http_proxy_1 = tslib_1.__importDefault(require("http-proxy"));
|
|
8
|
-
const raw_body_1 = tslib_1.__importDefault(require("raw-body"));
|
|
9
8
|
const node_http_proxy_json_1 = tslib_1.__importDefault(require("node-http-proxy-json"));
|
|
10
9
|
const utils_1 = require("../../utils");
|
|
11
10
|
const shared_1 = require("../../../shared");
|
|
@@ -14,164 +13,135 @@ const verifyAppProxySignature = (signature, verifiable, hmacSecret) => {
|
|
|
14
13
|
const hmac = (0, utils_1.generateHMAC)((0, shared_1.objectToSortedString)(verifiable), hmacSecret);
|
|
15
14
|
return (0, utils_1.compareHashes)(signature, hmac);
|
|
16
15
|
};
|
|
17
|
-
const handleProxy = (serverRuntimeConfig, config) =>
|
|
18
|
-
var _a, _b;
|
|
16
|
+
const handleProxy = (serverRuntimeConfig, config) => {
|
|
19
17
|
const { generateReplacements } = config !== null && config !== void 0 ? config : {};
|
|
20
|
-
const {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const rawBody = _rawBody.toString();
|
|
40
|
-
const parsedBody = JSON.parse(rawBody || '{}'); // NOTE: parsedBody should be encrypted when isVerifiable
|
|
41
|
-
let decryptedBody = parsedBody;
|
|
42
|
-
// NOTE: GET requests are not always sending along origin
|
|
43
|
-
if ((0, shared_1.stringEmpty)(origin)) {
|
|
44
|
-
req.headers = Object.assign(Object.assign({}, req.headers), { origin: proxyOrigin || forwardHost });
|
|
45
|
-
}
|
|
46
|
-
const _d = (_b = req.query) !== null && _b !== void 0 ? _b : {}, { signature, proxyEncoded } = _d, verifiable = tslib_1.__rest(_d, ["signature", "proxyEncoded"]);
|
|
47
|
-
const { shop: _shop, host, timestamp, path_prefix } = verifiable;
|
|
48
|
-
const shop = _shop || shopHeader;
|
|
49
|
-
yield (0, nextjs_cors_1.default)(req, res, {
|
|
50
|
-
methods: ['PUT', 'PATCH', 'POST', 'DELETE'],
|
|
51
|
-
origin: (origin, callback) => {
|
|
52
|
-
const isSafelisted = (0, shared_1.matchHostname)(origin, [
|
|
53
|
-
...ORIGIN_SAFELIST,
|
|
54
|
-
'cdn.shopify.com' // NOTE: this is the domain for checkout UI extensions
|
|
55
|
-
]);
|
|
56
|
-
if (isSafelisted) {
|
|
57
|
-
return callback(null, true);
|
|
58
|
-
}
|
|
59
|
-
return callback(new Error('Invalid CORS origin'));
|
|
60
|
-
},
|
|
61
|
-
optionsSuccessStatus: 200, // some legacy browsers (IE11, various SmartTVs) choke on 204
|
|
62
|
-
});
|
|
63
|
-
const { target: targetParam } = params !== null && params !== void 0 ? params : {};
|
|
64
|
-
// eslint-disable-next-line max-len
|
|
65
|
-
const _targetUrl = ((0, shared_1.stringEmpty)(targetParam) || targetParam.startsWith('http')) ? targetParam : `${APP_BASE_URL}/${(0, shared_1.removeLeadingSlash)(targetParam)}`;
|
|
66
|
-
const { origin: target, hostname, pathname, search } = (0, shared_1.stringNotEmpty)(_targetUrl) ? new URL(_targetUrl) : {};
|
|
67
|
-
targetPath = [pathname, search].filter(shared_1.stringNotEmpty).join('');
|
|
68
|
-
const safelistedTarget = (0, shared_1.matchHostname)(hostname, Object.assign({ [new URL(APP_BASE_URL).hostname]: {
|
|
69
|
-
// HMMM: can we generate our own session token (or use the current one) so as to not have to tell handleGraph/Rest to behave as offline?
|
|
70
|
-
// headers: {
|
|
71
|
-
// Authorization: 'Bearer {{setting.zendesk.token}}',
|
|
72
|
-
// },
|
|
73
|
-
params: {
|
|
74
|
-
shop,
|
|
75
|
-
host,
|
|
76
|
-
},
|
|
77
|
-
} }, TARGET_SAFELIST));
|
|
78
|
-
if ((0, shared_1.stringEmpty)(targetPath) || (safelistedTarget == undefined)) {
|
|
79
|
-
return res.status(407).json({ message: 'Unproxyable target' });
|
|
80
|
-
}
|
|
81
|
-
if (!shop || !host || !extensionPoint || !signature || !proxyEncoded) {
|
|
82
|
-
return res.status(400).json({ message: 'Invalid or missing headers', extensionPoint });
|
|
83
|
-
}
|
|
84
|
-
const isShopifyOriginOrRelative = (0, shared_1.stringNotEmpty)((0, shared_1.ensureString)(path_prefix).startsWith('http')
|
|
85
|
-
? (0, shared_1.sanitizeShop)(new URL(path_prefix).hostname)
|
|
86
|
-
: path_prefix);
|
|
87
|
-
// TODO: once Shopify fixes CORS issue when origin is cdn.shopify.com, update this!
|
|
88
|
-
if (!verifyAppProxySignature(signature, verifiable, isShopifyOriginOrRelative ? APP_CONFIG.apiSecretKey : timestamp)) {
|
|
89
|
-
return res.status(403).json({ message: 'Invalid signature' });
|
|
90
|
-
}
|
|
91
|
-
// TODO: clean up targetParam.startsWith??
|
|
92
|
-
if (!targetParam.startsWith(API_PATHS[shared_1.API_ROUTE_NAMES.SESSION_TOKEN])) {
|
|
93
|
-
const _getVerifiedSessionData = (0, utils_1.getVerifiedSessionData)(serverRuntimeConfig);
|
|
94
|
-
if (!_getVerifiedSessionData(sessionToken, { shop, host }).catch((_error) => {
|
|
95
|
-
if (_error instanceof shared_1.ShopifySessionInvalidError) {
|
|
96
|
-
return res.status(403).json({ message: _error.message });
|
|
97
|
-
}
|
|
98
|
-
throw _error;
|
|
99
|
-
})) {
|
|
100
|
-
return res.status(403).json({ message: 'Unverified signature' });
|
|
18
|
+
const { API_PATHS, APP_CONFIG, APP_BASE_URL, TARGET_SAFELIST, ORIGIN_SAFELIST, } = serverRuntimeConfig;
|
|
19
|
+
return (req, res, params) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
+
var _a, _b;
|
|
21
|
+
const _c = (_a = req.headers) !== null && _a !== void 0 ? _a : {}, { origin,
|
|
22
|
+
// 'x-public-key': apiKey,
|
|
23
|
+
// 'x-ephemeral-key': ephemeralPublicKey,
|
|
24
|
+
// 'x-authorization-timestamp': customAuthTimestamp,
|
|
25
|
+
// 'x-authorization': customAuth,
|
|
26
|
+
'x-forwarded-for': _forwardFor, 'x-forwarded-proto': _forwardProto, 'x-forwarded-host': forwardHost, 'x-proxy-origin': proxyOrigin } = _c, _headers = tslib_1.__rest(_c, ["origin", 'x-forwarded-for', 'x-forwarded-proto', 'x-forwarded-host', 'x-proxy-origin']);
|
|
27
|
+
const { 'x-extension-session': sessionToken, 'x-extension-point': extensionPoint, 'x-shop-domain': shopDomainHeader, 'x-shopify-shop-domain': shopifyShopDomainHeader, 'x-shopify-shop': shopHeader = shopifyShopDomainHeader !== null && shopifyShopDomainHeader !== void 0 ? shopifyShopDomainHeader : shopDomainHeader, 'x-shopify-app-id': shopifyAppId, 'x-app-id': appId = shopifyAppId,
|
|
28
|
+
// 'x-shopify-app-installation-id': shopifyAppInstallationId,
|
|
29
|
+
// 'x-app-installation-id': appInstallationId = shopifyAppInstallationId, // TODO: pass along installationId??
|
|
30
|
+
// TODO: pass along providerSetId??
|
|
31
|
+
} = _headers;
|
|
32
|
+
let targetPath;
|
|
33
|
+
try {
|
|
34
|
+
// NOTE: GET requests are not always sending along origin
|
|
35
|
+
if ((0, shared_1.stringEmpty)(origin)) {
|
|
36
|
+
req.headers = Object.assign(Object.assign({}, req.headers), { origin: proxyOrigin || forwardHost });
|
|
101
37
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
38
|
+
const _d = (_b = req.query) !== null && _b !== void 0 ? _b : {}, { signature, proxyEncoded } = _d, verifiable = tslib_1.__rest(_d, ["signature", "proxyEncoded"]);
|
|
39
|
+
const { shop: _shop, host, timestamp, path_prefix } = verifiable;
|
|
40
|
+
const shop = _shop || shopHeader;
|
|
41
|
+
yield (0, nextjs_cors_1.default)(req, res, {
|
|
42
|
+
methods: ['PUT', 'PATCH', 'POST', 'DELETE'],
|
|
43
|
+
origin: (origin, callback) => {
|
|
44
|
+
const isSafelisted = (0, shared_1.matchHostname)(origin, [
|
|
45
|
+
...ORIGIN_SAFELIST,
|
|
46
|
+
'cdn.shopify.com' // NOTE: this is the domain for checkout UI extensions
|
|
47
|
+
]);
|
|
48
|
+
if (isSafelisted) {
|
|
49
|
+
return callback(null, true);
|
|
50
|
+
}
|
|
51
|
+
return callback(new Error('Invalid CORS origin'));
|
|
52
|
+
},
|
|
53
|
+
optionsSuccessStatus: 200, // some legacy browsers (IE11, various SmartTVs) choke on 204
|
|
115
54
|
});
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
55
|
+
const { target: targetParam } = params !== null && params !== void 0 ? params : {};
|
|
56
|
+
// eslint-disable-next-line max-len
|
|
57
|
+
const _targetUrl = ((0, shared_1.stringEmpty)(targetParam) || targetParam.startsWith('http')) ? targetParam : `${APP_BASE_URL}/${(0, shared_1.removeLeadingSlash)(targetParam)}`;
|
|
58
|
+
const { origin: target, hostname, pathname, search } = (0, shared_1.stringNotEmpty)(_targetUrl) ? new URL(_targetUrl) : {};
|
|
59
|
+
targetPath = [pathname, search].filter(shared_1.stringNotEmpty).join('');
|
|
60
|
+
const safelistedTarget = (0, shared_1.matchHostname)(hostname, Object.assign({ [new URL(APP_BASE_URL).hostname]: {
|
|
61
|
+
// HMMM: can we generate our own session token (or use the current one) so as to not have to tell handleGraph/Rest to behave as offline?
|
|
62
|
+
// headers: {
|
|
63
|
+
// Authorization: 'Bearer {{setting.zendesk.token}}',
|
|
64
|
+
// },
|
|
65
|
+
params: {
|
|
66
|
+
shop,
|
|
67
|
+
host,
|
|
68
|
+
},
|
|
69
|
+
} }, TARGET_SAFELIST));
|
|
70
|
+
if ((0, shared_1.stringEmpty)(targetPath) || (safelistedTarget == undefined)) {
|
|
71
|
+
return res.status(407).json({ message: 'Unproxyable target' });
|
|
123
72
|
}
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
decryptedBody = JSON.parse(decryptedMessage !== null && decryptedMessage !== void 0 ? decryptedMessage : '{}');
|
|
73
|
+
if (!shop || !host || !extensionPoint || !signature || !proxyEncoded) {
|
|
74
|
+
return res.status(400).json({ message: 'Invalid or missing headers', extensionPoint });
|
|
127
75
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
headers: Object.assign(Object.assign({}, _headers), targetHeaders),
|
|
135
|
-
});
|
|
136
|
-
const proxy = http_proxy_1.default.createProxy();
|
|
137
|
-
return new Promise((resolve, reject) => {
|
|
138
|
-
req.url = targetPath;
|
|
139
|
-
if (headers) {
|
|
140
|
-
req.headers = headers;
|
|
76
|
+
const isShopifyOriginOrRelative = (0, shared_1.stringNotEmpty)((0, shared_1.ensureString)(path_prefix).startsWith('http')
|
|
77
|
+
? (0, shared_1.sanitizeShop)(new URL(path_prefix).hostname)
|
|
78
|
+
: path_prefix);
|
|
79
|
+
// TODO: once Shopify fixes CORS issue when origin is cdn.shopify.com, update this!
|
|
80
|
+
if (!verifyAppProxySignature(signature, verifiable, isShopifyOriginOrRelative ? APP_CONFIG.apiSecretKey : timestamp)) {
|
|
81
|
+
return res.status(403).json({ message: 'Invalid signature' });
|
|
141
82
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
83
|
+
// TODO: clean up targetParam.startsWith??
|
|
84
|
+
if (!targetParam.startsWith(API_PATHS[shared_1.API_ROUTE_NAMES.SESSION_TOKEN])) {
|
|
85
|
+
const _getVerifiedSessionData = (0, utils_1.getVerifiedSessionData)(serverRuntimeConfig);
|
|
86
|
+
if (!_getVerifiedSessionData(sessionToken, { shop, host }).catch((_error) => {
|
|
87
|
+
if (_error instanceof shared_1.ShopifySessionInvalidError) {
|
|
88
|
+
return res.status(403).json({ message: _error.message });
|
|
89
|
+
}
|
|
90
|
+
throw _error;
|
|
91
|
+
})) {
|
|
92
|
+
return res.status(403).json({ message: 'Unverified signature' });
|
|
147
93
|
}
|
|
94
|
+
}
|
|
95
|
+
const { headers: targetHeaders, params: targetParams } = (0, shared_1.ensureObject)(safelistedTarget);
|
|
96
|
+
if ((0, shared_1.objectNotEmpty)(targetParams)) {
|
|
97
|
+
targetPath = (0, shared_1.appendQuery)(targetPath, new URLSearchParams(targetParams).toString());
|
|
98
|
+
}
|
|
99
|
+
const [requestBody, processResponse] = yield (0, utils_1.getVerifiedBody)(req, res, targetPath);
|
|
100
|
+
console.log(`>>> > handleProxy > requestBody, processResponse:`, requestBody, processResponse);
|
|
101
|
+
const _prepareHeaders = (0, utils_1.prepareHeaders)(serverRuntimeConfig);
|
|
102
|
+
const headers = yield _prepareHeaders({
|
|
103
|
+
generateReplacements,
|
|
104
|
+
shop,
|
|
105
|
+
appId,
|
|
106
|
+
headers: Object.assign(Object.assign({}, _headers), targetHeaders),
|
|
148
107
|
});
|
|
149
|
-
proxy
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
108
|
+
const proxy = http_proxy_1.default.createProxy();
|
|
109
|
+
return new Promise((resolve, reject) => {
|
|
110
|
+
req.url = targetPath;
|
|
111
|
+
if (headers) {
|
|
112
|
+
req.headers = headers;
|
|
113
|
+
}
|
|
114
|
+
proxy.on('proxyReq', (proxyReq, proxyReqRequest, proxyReqResponse, options) => {
|
|
115
|
+
if ((0, shared_1.objectNotEmpty)(requestBody)) {
|
|
116
|
+
const bodyData = JSON.stringify(requestBody);
|
|
117
|
+
proxyReq.setHeader('Content-Length', Buffer.byteLength(bodyData));
|
|
118
|
+
proxyReq.write(bodyData);
|
|
153
119
|
}
|
|
154
|
-
|
|
120
|
+
});
|
|
121
|
+
proxy.on('proxyRes', function (proxyRes, proxyResRequest, proxyResResponse) {
|
|
122
|
+
(0, node_http_proxy_json_1.default)(proxyResResponse, proxyRes, function (proxyResBody) {
|
|
123
|
+
return processResponse(proxyResBody);
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
proxy.once('error', (error) => {
|
|
127
|
+
console.error('Proxy error', error);
|
|
128
|
+
reject(error);
|
|
129
|
+
});
|
|
130
|
+
proxy.web(req, res, {
|
|
131
|
+
target,
|
|
132
|
+
timeout: PROXY_TIMEOUT,
|
|
133
|
+
proxyTimeout: PROXY_TIMEOUT,
|
|
134
|
+
followRedirects: false,
|
|
135
|
+
changeOrigin: true,
|
|
136
|
+
secure: true,
|
|
155
137
|
});
|
|
156
138
|
});
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
proxyTimeout: PROXY_TIMEOUT,
|
|
165
|
-
followRedirects: false,
|
|
166
|
-
changeOrigin: true,
|
|
167
|
-
secure: true,
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
catch (error) {
|
|
172
|
-
console.error(`Error handling proxy request for '${targetPath}'`, error);
|
|
173
|
-
return res.status(200).json({ message: (error === null || error === void 0 ? void 0 : error.message) || 'Error handling proxy request', targetPath });
|
|
174
|
-
}
|
|
175
|
-
});
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
console.error(`Error handling proxy request for '${targetPath}'`, error);
|
|
142
|
+
return res.status(200).json({ message: (error === null || error === void 0 ? void 0 : error.message) || 'Error handling proxy request', targetPath });
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
};
|
|
176
146
|
exports.handleProxy = handleProxy;
|
|
177
147
|
//# sourceMappingURL=proxy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../../../src/lib/handlers/api/proxy.js"],"names":[],"mappings":";;;;AAAA,sDAAsD;AACtD,sEAAkC;AAClC,oEAAkC;AAClC,
|
|
1
|
+
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../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AAC,CAAA;qBACzB;gBACH,CAAC,CAAC,CAAA;gBAEF,KAAK,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,QAAQ,EAAE,eAAe,EAAE,gBAAgB;oBACxE,IAAA,8BAAe,EAAC,gBAAgB,EAAE,QAAQ,EAAE,UAAU,YAAY;wBAChE,OAAO,eAAe,CAAC,YAAY,CAAC,CAAA;oBACtC,CAAC,CAAC,CAAA;gBACJ,CAAC,CAAC,CAAA;gBAEF,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;oBAC5B,OAAO,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,CAAA;oBACnC,MAAM,CAAC,KAAK,CAAC,CAAA;gBACf,CAAC,CAAC,CAAA;gBAEF,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE;oBAClB,MAAM;oBACN,OAAO,EAAE,aAAa;oBACtB,YAAY,EAAE,aAAa;oBAC3B,eAAe,EAAE,KAAK;oBACtB,YAAY,EAAE,IAAI;oBAClB,MAAM,EAAE,IAAI;iBACb,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;SACH;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,qCAAqC,UAAU,GAAG,EAAE,KAAK,CAAC,CAAA;YACxE,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,KAAI,8BAA8B,EAAE,UAAU,EAAE,CAAC,CAAA;SACvG;IACH,CAAC,CAAA,CAAA;AACH,CAAC,CAAA;AA3LY,QAAA,WAAW,eA2LvB"}
|
package/dist/lib/utils/index.js
CHANGED
|
@@ -9,4 +9,5 @@ tslib_1.__exportStar(require("./session"), exports);
|
|
|
9
9
|
tslib_1.__exportStar(require("./shopify"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./shopify-api-js/oauth"), exports);
|
|
11
11
|
tslib_1.__exportStar(require("./token"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./verification"), exports);
|
|
12
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/utils/index.js"],"names":[],"mappings":";;;AAAA,oDAAyB;AACzB,mDAAwB;AACxB,qDAA0B;AAC1B,oDAAyB;AACzB,oDAAyB;AACzB,oDAAyB;AACzB,iEAAsC;AACtC,kDAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/utils/index.js"],"names":[],"mappings":";;;AAAA,oDAAyB;AACzB,mDAAwB;AACxB,qDAA0B;AAC1B,oDAAyB;AACzB,oDAAyB;AACzB,oDAAyB;AACzB,iEAAsC;AACtC,kDAAuB;AACvB,yDAA8B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/verification.js"],"names":[],"mappings":"AAUO,0GAmFN"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getVerifiedBody = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const raw_body_1 = tslib_1.__importDefault(require("raw-body"));
|
|
6
|
+
const shared_1 = require("../../../shared");
|
|
7
|
+
const getVerifiedBody = (serverRuntimeConfig) => {
|
|
8
|
+
const { keyPairs } = serverRuntimeConfig;
|
|
9
|
+
return (req, res, uri) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
10
|
+
var _a;
|
|
11
|
+
const { 'x-public-key': apiKey, 'x-ephemeral-key': ephemeralPublicKey, 'x-authorization-timestamp': customAuthTimestamp, 'x-authorization': customAuth, } = (_a = req.headers) !== null && _a !== void 0 ? _a : {};
|
|
12
|
+
try {
|
|
13
|
+
const [authProtocol, authSignature] = (0, shared_1.ensureString)(customAuth).split(' ');
|
|
14
|
+
const isVerifiable = (apiKey &&
|
|
15
|
+
ephemeralPublicKey &&
|
|
16
|
+
(keyPairs === null || keyPairs === void 0 ? void 0 : keyPairs.shared) &&
|
|
17
|
+
customAuthTimestamp &&
|
|
18
|
+
authSignature &&
|
|
19
|
+
(authProtocol === 'HMAC-SHA256'));
|
|
20
|
+
let verificationKeys;
|
|
21
|
+
// NOTE raw request body is required for shopify's validation
|
|
22
|
+
const _rawBody = yield (0, raw_body_1.default)(req);
|
|
23
|
+
const rawBody = _rawBody.toString();
|
|
24
|
+
const parsedBody = JSON.parse(rawBody || '{}'); // NOTE: parsedBody should be encrypted when isVerifiable
|
|
25
|
+
let decryptedBody = parsedBody;
|
|
26
|
+
// TEMP!!! remove isVerifiable check once webwidget moved to react
|
|
27
|
+
if (isVerifiable) {
|
|
28
|
+
if (!apiKey || !ephemeralPublicKey || !(keyPairs === null || keyPairs === void 0 ? void 0 : keyPairs.shared) || !customAuthTimestamp || !authSignature || (authProtocol !== 'HMAC-SHA256')) {
|
|
29
|
+
return res.status(401).json({ message: 'Invalid or missing authorization' });
|
|
30
|
+
}
|
|
31
|
+
verificationKeys = yield shared_1.subtle.getVerificationKeys({
|
|
32
|
+
publicKey: ephemeralPublicKey,
|
|
33
|
+
privateKey: keyPairs.shared.privateKey,
|
|
34
|
+
});
|
|
35
|
+
if (!verificationKeys) {
|
|
36
|
+
return res.status(412).json({ message: 'Invalid or missing verification' });
|
|
37
|
+
}
|
|
38
|
+
const verificationPayload = (0, shared_1.objectToSortedString)(Object.assign({ method: (0, shared_1.getRequestMethod)(rawBody, req.method), timestamp: customAuthTimestamp, body: parsedBody }, (0, shared_1.normalizeURIParts)(uri)));
|
|
39
|
+
const isValid = yield shared_1.subtle.verifyHMAC(verificationPayload, verificationKeys.derivedHMACKey, authSignature);
|
|
40
|
+
if (!isValid) {
|
|
41
|
+
return res.status(412).json({ message: 'Invalid or missing verification' });
|
|
42
|
+
}
|
|
43
|
+
if (rawBody) {
|
|
44
|
+
const decryptedMessage = yield shared_1.subtle.decryptMessage(parsedBody, verificationKeys.derivedSecretKey);
|
|
45
|
+
decryptedBody = JSON.parse(decryptedMessage !== null && decryptedMessage !== void 0 ? decryptedMessage : '{}');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const postProcess = (response) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
49
|
+
if (!response || !isVerifiable || !(verificationKeys === null || verificationKeys === void 0 ? void 0 : verificationKeys.derivedSecretKey)) {
|
|
50
|
+
return response;
|
|
51
|
+
}
|
|
52
|
+
return shared_1.subtle.encryptMessage(JSON.stringify(response), verificationKeys === null || verificationKeys === void 0 ? void 0 : verificationKeys.derivedSecretKey);
|
|
53
|
+
});
|
|
54
|
+
return [decryptedBody, postProcess];
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
console.error(`Error handling request verification for '${req.url}'`, error);
|
|
58
|
+
return res.status(200).json({ message: (error === null || error === void 0 ? void 0 : error.message) || 'Error handling request verification', targetPath: req.url });
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
exports.getVerifiedBody = getVerifiedBody;
|
|
63
|
+
//# sourceMappingURL=verification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verification.js","sourceRoot":"","sources":["../../../src/lib/utils/verification.js"],"names":[],"mappings":";;;;AAAA,gEAAiC;AAEjC,4CAMwB;AAEjB,MAAM,eAAe,GAAG,CAAC,mBAAmB,EAAE,EAAE;IACrD,MAAM,EAAE,QAAQ,EAAE,GAAG,mBAAmB,CAAA;IAExC,OAAO,CAAO,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;;QAC7B,MAAM,EACJ,cAAc,EAAE,MAAM,EACtB,iBAAiB,EAAE,kBAAkB,EACrC,2BAA2B,EAAE,mBAAmB,EAChD,iBAAiB,EAAE,UAAU,GAC9B,GAA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AW,CAAC,CAAA;SACpC;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,4CAA4C,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,CAAC,CAAA;YAC5E,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,KAAI,qCAAqC,EAAE,UAAU,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,CAAA;SACvH;IAEH,CAAC,CAAA,CAAA;AACH,CAAC,CAAA;AAnFY,QAAA,eAAe,mBAmF3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnostack/next-shopify",
|
|
3
|
-
"version": "1.13.5-beta.
|
|
3
|
+
"version": "1.13.5-beta.3",
|
|
4
4
|
"author": "agnoStack Dev <developers@agnostack.com> (https://agnostack.com)",
|
|
5
5
|
"owner": "agnoStack",
|
|
6
6
|
"description": "Please contact agnoStack via info@agnostack.com for any questions",
|