@wix/sdk 1.7.0 → 1.7.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.
|
@@ -6,7 +6,6 @@ import { API_URL } from '../../common.js';
|
|
|
6
6
|
import { LoginState, TokenRole, } from './types.js';
|
|
7
7
|
import { addPostMessageListener, loadFrame } from '../../iframeUtils.js';
|
|
8
8
|
import { EMAIL_EXISTS, INVALID_CAPTCHA, INVALID_PASSWORD, MISSING_CAPTCHA, RESET_PASSWORD, } from './constants.js';
|
|
9
|
-
import { verify } from 'jsonwebtoken';
|
|
10
9
|
import { biHeaderGenerator } from '../../bi/biHeaderGenerator.js';
|
|
11
10
|
import { pkceChallenge } from './pkce-challenge.js';
|
|
12
11
|
const moduleWithTokens = { redirects, authentication, recovery, verification };
|
|
@@ -335,16 +334,6 @@ export function OAuthStrategy(config) {
|
|
|
335
334
|
sendPasswordResetEmail,
|
|
336
335
|
captchaInvisibleSiteKey: '6LdoPaUfAAAAAJphvHoUoOob7mx0KDlXyXlgrx5v',
|
|
337
336
|
captchaVisibleSiteKey: '6Ld0J8IcAAAAANyrnxzrRlX1xrrdXsOmsepUYosy',
|
|
338
|
-
decodeJWT(token) {
|
|
339
|
-
if (!config.publicKey) {
|
|
340
|
-
throw new Error('Missing public key. Make sure to pass it to the OAuthStrategy');
|
|
341
|
-
}
|
|
342
|
-
const decoded = verify(token, config.publicKey);
|
|
343
|
-
return {
|
|
344
|
-
decoded,
|
|
345
|
-
valid: true,
|
|
346
|
-
};
|
|
347
|
-
},
|
|
348
337
|
};
|
|
349
338
|
}
|
|
350
339
|
const fetchTokens = async (payload) => {
|
package/build/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ export * from './wixMedia.js';
|
|
|
3
3
|
export * from './auth/oauth2/OAuthStrategy.js';
|
|
4
4
|
export * from './auth/oauth2/types.js';
|
|
5
5
|
export * from './auth/ApiKeyAuthStrategy.js';
|
|
6
|
-
export * from './auth/WixAppOAuthStrategy.js';
|
|
7
6
|
export * from '@wix/sdk-types';
|
|
8
7
|
export { getDefaultDomain } from './rest-modules.js';
|
|
9
8
|
export { API_URL } from './common.js';
|
package/build/index.js
CHANGED
|
@@ -3,7 +3,6 @@ export * from './wixMedia.js';
|
|
|
3
3
|
export * from './auth/oauth2/OAuthStrategy.js';
|
|
4
4
|
export * from './auth/oauth2/types.js';
|
|
5
5
|
export * from './auth/ApiKeyAuthStrategy.js';
|
|
6
|
-
export * from './auth/WixAppOAuthStrategy.js';
|
|
7
6
|
export * from '@wix/sdk-types';
|
|
8
7
|
export { getDefaultDomain } from './rest-modules.js';
|
|
9
8
|
export { API_URL } from './common.js';
|
|
@@ -9,7 +9,6 @@ const common_js_1 = require("../../common.js");
|
|
|
9
9
|
const types_js_1 = require("./types.js");
|
|
10
10
|
const iframeUtils_js_1 = require("../../iframeUtils.js");
|
|
11
11
|
const constants_js_1 = require("./constants.js");
|
|
12
|
-
const jsonwebtoken_1 = require("jsonwebtoken");
|
|
13
12
|
const biHeaderGenerator_js_1 = require("../../bi/biHeaderGenerator.js");
|
|
14
13
|
const pkce_challenge_js_1 = require("./pkce-challenge.js");
|
|
15
14
|
const moduleWithTokens = { redirects: redirects_1.redirects, authentication: identity_1.authentication, recovery: identity_1.recovery, verification: identity_1.verification };
|
|
@@ -338,16 +337,6 @@ function OAuthStrategy(config) {
|
|
|
338
337
|
sendPasswordResetEmail,
|
|
339
338
|
captchaInvisibleSiteKey: '6LdoPaUfAAAAAJphvHoUoOob7mx0KDlXyXlgrx5v',
|
|
340
339
|
captchaVisibleSiteKey: '6Ld0J8IcAAAAANyrnxzrRlX1xrrdXsOmsepUYosy',
|
|
341
|
-
decodeJWT(token) {
|
|
342
|
-
if (!config.publicKey) {
|
|
343
|
-
throw new Error('Missing public key. Make sure to pass it to the OAuthStrategy');
|
|
344
|
-
}
|
|
345
|
-
const decoded = (0, jsonwebtoken_1.verify)(token, config.publicKey);
|
|
346
|
-
return {
|
|
347
|
-
decoded,
|
|
348
|
-
valid: true,
|
|
349
|
-
};
|
|
350
|
-
},
|
|
351
340
|
};
|
|
352
341
|
}
|
|
353
342
|
exports.OAuthStrategy = OAuthStrategy;
|
package/cjs/build/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ export * from './wixMedia.js';
|
|
|
3
3
|
export * from './auth/oauth2/OAuthStrategy.js';
|
|
4
4
|
export * from './auth/oauth2/types.js';
|
|
5
5
|
export * from './auth/ApiKeyAuthStrategy.js';
|
|
6
|
-
export * from './auth/WixAppOAuthStrategy.js';
|
|
7
6
|
export * from '@wix/sdk-types';
|
|
8
7
|
export { getDefaultDomain } from './rest-modules.js';
|
|
9
8
|
export { API_URL } from './common.js';
|
package/cjs/build/index.js
CHANGED
|
@@ -20,7 +20,6 @@ __exportStar(require("./wixMedia.js"), exports);
|
|
|
20
20
|
__exportStar(require("./auth/oauth2/OAuthStrategy.js"), exports);
|
|
21
21
|
__exportStar(require("./auth/oauth2/types.js"), exports);
|
|
22
22
|
__exportStar(require("./auth/ApiKeyAuthStrategy.js"), exports);
|
|
23
|
-
__exportStar(require("./auth/WixAppOAuthStrategy.js"), exports);
|
|
24
23
|
__exportStar(require("@wix/sdk-types"), exports);
|
|
25
24
|
var rest_modules_js_1 = require("./rest-modules.js");
|
|
26
25
|
Object.defineProperty(exports, "getDefaultDomain", { enumerable: true, get: function () { return rest_modules_js_1.getDefaultDomain; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/sdk",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Ronny Ringel",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@babel/runtime": "^7.23.2",
|
|
62
62
|
"@wix/identity": "^1.0.71",
|
|
63
63
|
"@wix/image-kit": "^1.49.0",
|
|
64
|
-
"@wix/redirects": "^1.0.
|
|
64
|
+
"@wix/redirects": "^1.0.32",
|
|
65
65
|
"@wix/sdk-types": "^1.5.4",
|
|
66
66
|
"crypto-js": "^4.2.0",
|
|
67
67
|
"jsonwebtoken": "^9.0.2",
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
"@types/jsonwebtoken": "^9.0.5",
|
|
79
79
|
"@types/node": "^20.10.6",
|
|
80
80
|
"@vitest/ui": "^1.1.3",
|
|
81
|
-
"@wix/ecom": "^1.0.
|
|
81
|
+
"@wix/ecom": "^1.0.469",
|
|
82
82
|
"@wix/events": "^1.0.141",
|
|
83
83
|
"@wix/metro": "^1.0.73",
|
|
84
|
-
"@wix/metro-runtime": "^1.
|
|
84
|
+
"@wix/metro-runtime": "^1.1613.0",
|
|
85
85
|
"eslint": "^8.56.0",
|
|
86
86
|
"eslint-config-sdk": "0.0.0",
|
|
87
87
|
"graphql": "^16.8.0",
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"wallaby": {
|
|
116
116
|
"autoDetect": true
|
|
117
117
|
},
|
|
118
|
-
"falconPackageHash": "
|
|
118
|
+
"falconPackageHash": "7ecfbb6b8ddbff79f63faa32866769f65b2656c06880ebfda5d46d9f"
|
|
119
119
|
}
|