auth0-lock 11.34.2 → 12.0.0-beta.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/.browserslistrc +1 -0
- package/.circleci/config.yml +4 -2
- package/.eslintrc.json +5 -5
- package/.github/workflows/codeql.yml +41 -0
- package/.shiprc +4 -5
- package/CHANGELOG.md +26 -0
- package/EXAMPLES.md +626 -0
- package/README.md +77 -649
- package/karma.conf.js +1 -1
- package/lib/CSSCore.js +1 -4
- package/lib/__tests__/auth_button.js +12 -22
- package/lib/__tests__/connection/database/actions.js +48 -49
- package/lib/__tests__/connection/database/index.js +22 -28
- package/lib/__tests__/connection/database/login_pane.js +20 -41
- package/lib/__tests__/connection/database/password_reset_confirmation.js +19 -26
- package/lib/__tests__/connection/database/reset_password.js +17 -39
- package/lib/__tests__/connection/database/signed_up_confirmation.js +19 -26
- package/lib/__tests__/connection/enterprise/actions.js +22 -47
- package/lib/__tests__/connection/enterprise/hrd_pane.js +16 -33
- package/lib/__tests__/connection/enterprise/hrd_screen.js +26 -40
- package/lib/__tests__/connection/enterprise/quick_auth_screen.js +27 -68
- package/lib/__tests__/connection/passwordless/ask_vcode.js +29 -51
- package/lib/__tests__/connection/passwordless/email_sent_confirmation.js +19 -26
- package/lib/__tests__/connection/passwordless/passwordless.js +35 -97
- package/lib/__tests__/core/actions.js +23 -46
- package/lib/__tests__/core/client/index.js +10 -13
- package/lib/__tests__/core/index.js +46 -94
- package/lib/__tests__/core/remote_data.js +14 -20
- package/lib/__tests__/core/signed_in_confirmation.js +19 -26
- package/lib/__tests__/core/sso/last_login_screen.js +27 -50
- package/lib/__tests__/core/tenant.js +10 -12
- package/lib/__tests__/core/web_api/helper.js +6 -14
- package/lib/__tests__/core/web_api/p2_api.js +38 -33
- package/lib/__tests__/core/web_api.js +37 -33
- package/lib/__tests__/engine/classic/login.js +20 -41
- package/lib/__tests__/engine/classic/mfa_login_screen.js +6 -19
- package/lib/__tests__/engine/classic/sign_up_pane.js +33 -55
- package/lib/__tests__/engine/classic/sign_up_screen.js +18 -45
- package/lib/__tests__/engine/classic.js +13 -6
- package/lib/__tests__/engine/passwordless.js +2 -5
- package/lib/__tests__/field/captcha/recaptcha_enterprise.js +27 -27
- package/lib/__tests__/field/captcha/recaptchav2.js +27 -27
- package/lib/__tests__/field/captcha.js +39 -51
- package/lib/__tests__/field/custom_input.js +23 -47
- package/lib/__tests__/field/email.js +2 -3
- package/lib/__tests__/field/email_pane.js +25 -48
- package/lib/__tests__/field/field.js +9 -13
- package/lib/__tests__/field/login_pane.js +30 -34
- package/lib/__tests__/field/mfa_code_pane.js +13 -28
- package/lib/__tests__/field/option_selection_pane.js +7 -25
- package/lib/__tests__/field/password.js +6 -12
- package/lib/__tests__/field/password_pane.js +29 -46
- package/lib/__tests__/field/phone_number_pane.js +18 -41
- package/lib/__tests__/field/social_buttons_pane.js +30 -47
- package/lib/__tests__/field/username.js +27 -48
- package/lib/__tests__/field/username_pane.js +30 -47
- package/lib/__tests__/field/vcode.js +5 -13
- package/lib/__tests__/field/vcode_pane.js +20 -44
- package/lib/__tests__/i18n.js +28 -53
- package/lib/__tests__/quick-auth/actions.js +4 -27
- package/lib/__tests__/setup-tests.js +7 -9
- package/lib/__tests__/testUtils.js +41 -58
- package/lib/__tests__/ui/box/chrome.js +24 -49
- package/lib/__tests__/ui/box/confirmation_pane.js +19 -36
- package/lib/__tests__/ui/box/container.js +21 -46
- package/lib/__tests__/ui/box/global_message.js +60 -37
- package/lib/__tests__/ui/input/email_input.js +6 -17
- package/lib/__tests__/ui/input/input_wrap.js +6 -19
- package/lib/__tests__/ui/input/password/password_strength.js +13 -15
- package/lib/__tests__/ui/input/password_input.js +22 -27
- package/lib/__tests__/utils/format.js +10 -17
- package/lib/__tests__/utils/url_utils.js +2 -5
- package/lib/avatar/gravatar_provider.js +13 -28
- package/lib/avatar.js +22 -41
- package/lib/browser.js +372 -23
- package/lib/connection/captcha.js +14 -32
- package/lib/connection/database/actions.js +39 -108
- package/lib/connection/database/index.js +90 -191
- package/lib/connection/database/login_pane.js +107 -147
- package/lib/connection/database/login_sign_up_tabs.js +106 -125
- package/lib/connection/database/mfa_pane.js +50 -69
- package/lib/connection/database/password_reset_confirmation.js +51 -73
- package/lib/connection/database/reset_password.js +116 -132
- package/lib/connection/database/reset_password_pane.js +45 -56
- package/lib/connection/database/sign_up_terms.js +17 -23
- package/lib/connection/database/signed_up_confirmation.js +52 -75
- package/lib/connection/enterprise/actions.js +23 -52
- package/lib/connection/enterprise/hrd_pane.js +60 -76
- package/lib/connection/enterprise/hrd_screen.js +60 -75
- package/lib/connection/enterprise/kerberos_screen.js +46 -60
- package/lib/connection/enterprise/quick_auth_screen.js +46 -64
- package/lib/connection/enterprise/single_sign_on_notice.js +14 -26
- package/lib/connection/enterprise.js +51 -84
- package/lib/connection/passwordless/actions.js +29 -62
- package/lib/connection/passwordless/ask_vcode.js +53 -60
- package/lib/connection/passwordless/email_sent_confirmation.js +129 -179
- package/lib/connection/passwordless/index.js +36 -68
- package/lib/connection/social/index.js +12 -15
- package/lib/core/actions.js +33 -85
- package/lib/core/client/index.js +38 -58
- package/lib/core/client/settings.js +12 -20
- package/lib/core/error_screen.js +38 -52
- package/lib/core/index.js +152 -301
- package/lib/core/loading_screen.js +61 -71
- package/lib/core/pane_separator.js +10 -10
- package/lib/core/remote_data.js +28 -48
- package/lib/core/screen.js +85 -79
- package/lib/core/signed_in_confirmation.js +51 -73
- package/lib/core/sso/data.js +9 -17
- package/lib/core/sso/index.js +5 -6
- package/lib/core/sso/last_login_screen.js +46 -63
- package/lib/core/tenant/index.js +37 -59
- package/lib/core/tenant/settings.js +11 -15
- package/lib/core/web_api/helper.js +24 -30
- package/lib/core/web_api/p2_api.js +156 -165
- package/lib/core/web_api.js +101 -90
- package/lib/core.js +126 -160
- package/lib/engine/classic/login.js +92 -144
- package/lib/engine/classic/mfa_login_screen.js +61 -67
- package/lib/engine/classic/sign_up_pane.js +89 -123
- package/lib/engine/classic/sign_up_screen.js +112 -158
- package/lib/engine/classic.js +122 -183
- package/lib/engine/passwordless/social_or_email_login_screen.js +71 -106
- package/lib/engine/passwordless/social_or_phone_number_login_screen.js +70 -100
- package/lib/engine/passwordless.js +75 -104
- package/lib/field/actions.js +11 -17
- package/lib/field/captcha/captcha_pane.js +82 -102
- package/lib/field/captcha/recaptcha.js +140 -145
- package/lib/field/captcha.js +7 -10
- package/lib/field/custom_input.js +37 -50
- package/lib/field/email/email_pane.js +90 -109
- package/lib/field/email.js +17 -35
- package/lib/field/index.js +51 -88
- package/lib/field/mfa-code/mfa_code_pane.js +57 -71
- package/lib/field/mfa_code.js +15 -21
- package/lib/field/option_selection_pane.js +16 -22
- package/lib/field/password/password_pane.js +79 -91
- package/lib/field/password.js +8 -14
- package/lib/field/phone-number/locations.js +7 -3
- package/lib/field/phone-number/phone_number_pane.js +87 -124
- package/lib/field/phone_number.js +16 -30
- package/lib/field/social/event.js +9 -12
- package/lib/field/social/social_buttons_pane.js +93 -121
- package/lib/field/username/username_pane.js +105 -123
- package/lib/field/username.js +16 -26
- package/lib/field/vcode/vcode_pane.js +67 -93
- package/lib/field/vcode.js +5 -5
- package/lib/i18n/af.js +7 -4
- package/lib/i18n/ar.js +7 -4
- package/lib/i18n/az.js +7 -4
- package/lib/i18n/bg.js +7 -4
- package/lib/i18n/ca.js +7 -4
- package/lib/i18n/cs.js +7 -4
- package/lib/i18n/da.js +7 -4
- package/lib/i18n/de.js +7 -3
- package/lib/i18n/el.js +7 -4
- package/lib/i18n/en.js +9 -4
- package/lib/i18n/es.js +7 -3
- package/lib/i18n/et.js +7 -4
- package/lib/i18n/fa.js +7 -4
- package/lib/i18n/fi.js +7 -4
- package/lib/i18n/fr.js +7 -4
- package/lib/i18n/he.js +7 -4
- package/lib/i18n/hr.js +7 -4
- package/lib/i18n/hu.js +7 -4
- package/lib/i18n/id.js +7 -4
- package/lib/i18n/it.js +7 -3
- package/lib/i18n/ja.js +7 -4
- package/lib/i18n/ko.js +7 -4
- package/lib/i18n/lt.js +7 -4
- package/lib/i18n/lv.js +7 -4
- package/lib/i18n/ms.js +7 -4
- package/lib/i18n/nb.js +7 -4
- package/lib/i18n/nl.js +7 -4
- package/lib/i18n/nn.js +7 -4
- package/lib/i18n/no.js +7 -4
- package/lib/i18n/pl.js +7 -4
- package/lib/i18n/pt-br.js +7 -3
- package/lib/i18n/pt.js +7 -4
- package/lib/i18n/ro.js +7 -4
- package/lib/i18n/ru.js +7 -4
- package/lib/i18n/sk.js +7 -4
- package/lib/i18n/sl.js +7 -4
- package/lib/i18n/sr.js +7 -4
- package/lib/i18n/sv.js +7 -4
- package/lib/i18n/tr.js +7 -4
- package/lib/i18n/ua.js +7 -4
- package/lib/i18n/uk.js +7 -4
- package/lib/i18n/vi.js +7 -4
- package/lib/i18n/zh-tw.js +7 -4
- package/lib/i18n/zh.js +7 -4
- package/lib/i18n.js +38 -75
- package/lib/index.js +14 -17
- package/lib/lock.js +29 -32
- package/lib/passwordless.js +29 -31
- package/lib/quick-auth/actions.js +19 -26
- package/lib/quick_auth.js +8 -10
- package/lib/sanitizer.js +5 -5
- package/lib/store/index.js +22 -42
- package/lib/sync.js +21 -42
- package/lib/ui/box/button.js +85 -105
- package/lib/ui/box/chrome.js +463 -548
- package/lib/ui/box/confirmation_pane.js +34 -48
- package/lib/ui/box/container.js +305 -339
- package/lib/ui/box/global_message.js +51 -60
- package/lib/ui/box/header.js +155 -177
- package/lib/ui/box/multisize_slide.js +233 -229
- package/lib/ui/box/success_pane.js +34 -37
- package/lib/ui/box.js +88 -93
- package/lib/ui/button/auth_button.js +44 -51
- package/lib/ui/input/captcha_input.js +162 -181
- package/lib/ui/input/checkbox_input.js +57 -59
- package/lib/ui/input/email_input.js +117 -124
- package/lib/ui/input/input_wrap.js +65 -80
- package/lib/ui/input/location_input.js +130 -150
- package/lib/ui/input/mfa_code_input.js +98 -98
- package/lib/ui/input/password/password_strength.js +103 -127
- package/lib/ui/input/password_input.js +141 -147
- package/lib/ui/input/phone_number_input.js +101 -109
- package/lib/ui/input/select_input.js +120 -132
- package/lib/ui/input/text_input.js +89 -84
- package/lib/ui/input/username_input.js +109 -115
- package/lib/ui/input/vcode_input.js +110 -118
- package/lib/ui/list.js +224 -247
- package/lib/ui/pane/quick_auth_pane.js +55 -80
- package/lib/utils/atom.js +55 -48
- package/lib/utils/cache.js +54 -43
- package/lib/utils/cdn_utils.js +17 -31
- package/lib/utils/createRef.js +3 -1
- package/lib/utils/data_utils.js +10 -16
- package/lib/utils/fn_utils.js +5 -4
- package/lib/utils/format.js +6 -8
- package/lib/utils/id_utils.js +4 -3
- package/lib/utils/jsonp_utils.js +20 -17
- package/lib/utils/media_utils.js +4 -2
- package/lib/utils/preload_utils.js +4 -3
- package/lib/utils/string_utils.js +4 -4
- package/lib/utils/url_utils.js +4 -3
- package/opslevel.yml +6 -0
- package/package.json +53 -38
- package/webpack.config.js +36 -3
package/lib/utils/jsonp_utils.js
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
|
|
5
|
-
var _jsonp = require('jsonp');
|
|
6
|
-
|
|
7
|
-
var _jsonp2 = _interopRequireDefault(_jsonp);
|
|
1
|
+
"use strict";
|
|
8
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _jsonp = _interopRequireDefault(require("jsonp"));
|
|
9
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
|
|
9
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
11
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
12
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
13
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
15
|
+
var JSONPUtils = /*#__PURE__*/function () {
|
|
14
16
|
function JSONPUtils() {
|
|
15
17
|
_classCallCheck(this, JSONPUtils);
|
|
16
18
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
_createClass(JSONPUtils, [{
|
|
20
|
+
key: "get",
|
|
21
|
+
value: function get() {
|
|
22
|
+
return _jsonp.default.apply(void 0, arguments);
|
|
23
|
+
}
|
|
24
|
+
}]);
|
|
22
25
|
return JSONPUtils;
|
|
23
26
|
}();
|
|
24
|
-
|
|
25
|
-
exports.default =
|
|
27
|
+
var _default = new JSONPUtils();
|
|
28
|
+
exports.default = _default;
|
package/lib/utils/media_utils.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.isSmallScreen = isSmallScreen;
|
|
5
7
|
function isSmallScreen() {
|
|
6
8
|
return window.matchMedia && !window.matchMedia('(min-width: 380px)').matches;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.img = img;
|
|
5
7
|
function img(src) {
|
|
6
8
|
var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
|
|
7
|
-
|
|
8
9
|
var img = document.createElement('img');
|
|
9
10
|
img.addEventListener('load', function () {
|
|
10
11
|
cb(null, img);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.endsWith = endsWith;
|
|
4
7
|
exports.matches = matches;
|
|
5
8
|
exports.startsWith = startsWith;
|
|
6
|
-
exports.endsWith = endsWith;
|
|
7
9
|
function matches(search, str) {
|
|
8
10
|
return str.toLowerCase().indexOf(search.toLowerCase()) > -1;
|
|
9
11
|
}
|
|
10
|
-
|
|
11
12
|
function startsWith(str, search) {
|
|
12
13
|
return str.indexOf(search) === 0;
|
|
13
14
|
}
|
|
14
|
-
|
|
15
15
|
function endsWith(str, search) {
|
|
16
16
|
return str.indexOf(search, str.length - search.length) !== -1;
|
|
17
17
|
}
|
package/lib/utils/url_utils.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.getLocationFromUrl = getLocationFromUrl;
|
|
5
7
|
exports.getOriginFromUrl = getOriginFromUrl;
|
|
6
8
|
function getLocationFromUrl(href) {
|
|
@@ -16,7 +18,6 @@ function getLocationFromUrl(href) {
|
|
|
16
18
|
hash: match[7]
|
|
17
19
|
};
|
|
18
20
|
}
|
|
19
|
-
|
|
20
21
|
function getOriginFromUrl(url) {
|
|
21
22
|
if (!url) {
|
|
22
23
|
return undefined;
|
package/opslevel.yml
ADDED
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auth0-lock",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0-beta.0",
|
|
4
4
|
"description": "Auth0 Lock",
|
|
5
5
|
"author": "Auth0 <support@auth0.com> (http://auth0.com)",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"homepage": "https://github.com/auth0/lock",
|
|
7
8
|
"keywords": [
|
|
8
9
|
"auth0",
|
|
9
10
|
"auth",
|
|
@@ -40,26 +41,42 @@
|
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"@auth0/component-cdn-uploader": "^2.2.2",
|
|
44
|
+
"@babel/core": "^7.0.0",
|
|
45
|
+
"@babel/plugin-proposal-class-properties": "^7.0.0",
|
|
46
|
+
"@babel/plugin-proposal-decorators": "^7.0.0",
|
|
47
|
+
"@babel/plugin-proposal-do-expressions": "^7.0.0",
|
|
48
|
+
"@babel/plugin-proposal-export-default-from": "^7.0.0",
|
|
49
|
+
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
|
|
50
|
+
"@babel/plugin-proposal-function-bind": "^7.0.0",
|
|
51
|
+
"@babel/plugin-proposal-function-sent": "^7.0.0",
|
|
52
|
+
"@babel/plugin-proposal-json-strings": "^7.0.0",
|
|
53
|
+
"@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
|
|
54
|
+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
|
|
55
|
+
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
|
|
56
|
+
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
|
|
57
|
+
"@babel/plugin-proposal-pipeline-operator": "^7.0.0",
|
|
58
|
+
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
|
|
59
|
+
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
|
|
60
|
+
"@babel/plugin-syntax-import-meta": "^7.0.0",
|
|
61
|
+
"@babel/preset-env": "^7.0.0",
|
|
62
|
+
"@babel/preset-react": "^7.0.0",
|
|
63
|
+
"@cfaester/enzyme-adapter-react-18": "^0.6.0",
|
|
43
64
|
"@google-cloud/translate": "^6.0.2",
|
|
44
|
-
"babel-
|
|
45
|
-
"babel-
|
|
46
|
-
"babel-loader": "
|
|
65
|
+
"babel-eslint": "^9.0.0",
|
|
66
|
+
"babel-jest": "^29.3.1",
|
|
67
|
+
"babel-loader": "8.3.0",
|
|
47
68
|
"babel-plugin-stylus-compiler": "^1.4.0",
|
|
48
|
-
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
49
69
|
"babel-plugin-transform-css-import-to-string": "0.0.2",
|
|
50
70
|
"babel-plugin-version-inline": "^1.0.0",
|
|
51
|
-
"
|
|
52
|
-
"babel-preset-react": "^6.24.1",
|
|
53
|
-
"babel-preset-stage-0": "^6.3.13",
|
|
54
|
-
"babelify": "^8.0.0",
|
|
71
|
+
"babelify": "^10.0.0",
|
|
55
72
|
"browserify": "^17.0.0",
|
|
56
73
|
"bump-version": "^0.5.0",
|
|
57
74
|
"chalk": "^4.1.2",
|
|
75
|
+
"core-js": "^3.26.1",
|
|
58
76
|
"cross-env": "^7.0.3",
|
|
59
77
|
"css-loader": "^0.28.11",
|
|
60
|
-
"emojic": "^1.1.
|
|
61
|
-
"enzyme": "^3.1.
|
|
62
|
-
"enzyme-adapter-react-15": "^1.0.1",
|
|
78
|
+
"emojic": "^1.1.17",
|
|
79
|
+
"enzyme": "^3.1.1",
|
|
63
80
|
"es-check": "^6.0.0",
|
|
64
81
|
"eslint": "^7.32.0",
|
|
65
82
|
"eslint-config-prettier": "^8.3.0",
|
|
@@ -67,66 +84,63 @@
|
|
|
67
84
|
"esm": "^3.2.25",
|
|
68
85
|
"expect.js": "^0.3.1",
|
|
69
86
|
"flat": "^5.0.2",
|
|
70
|
-
"glob": "^7.1.
|
|
87
|
+
"glob": "^7.1.7",
|
|
71
88
|
"grunt": "^1.3.0",
|
|
72
|
-
"grunt-babel": "^
|
|
89
|
+
"grunt-babel": "^8.0.0",
|
|
73
90
|
"grunt-cli": "^0.1.13",
|
|
74
91
|
"grunt-concurrent": "^2.3.1",
|
|
75
92
|
"grunt-contrib-clean": "^0.7.0",
|
|
76
93
|
"grunt-env": "^0.4.4",
|
|
77
94
|
"grunt-exec": "^0.4.6",
|
|
78
|
-
"grunt-webpack": "^
|
|
95
|
+
"grunt-webpack": "^5.0.0",
|
|
79
96
|
"husky": "^7.0.2",
|
|
80
|
-
"jest": "^
|
|
97
|
+
"jest": "^29.3.1",
|
|
98
|
+
"jest-environment-jsdom": "^29.3.1",
|
|
99
|
+
"jest-environment-jsdom-global": "^4.0.0",
|
|
81
100
|
"json-beautify": "^1.0.1",
|
|
82
|
-
"karma": "^6.
|
|
83
|
-
"karma-babel-preprocessor": "^
|
|
101
|
+
"karma": "^6.4.1",
|
|
102
|
+
"karma-babel-preprocessor": "^8.0.2",
|
|
84
103
|
"karma-browserify": "^8.1.0",
|
|
85
104
|
"karma-browserstack-launcher": "^1.6.0",
|
|
86
|
-
"karma-chrome-launcher": "^3.1.
|
|
105
|
+
"karma-chrome-launcher": "^3.1.1",
|
|
87
106
|
"karma-mocha": "^2.0.1",
|
|
88
107
|
"karma-mocha-reporter": "^2.2.5",
|
|
89
|
-
"lint-staged": "^11.1.
|
|
90
|
-
"mocha": "^9.1.
|
|
108
|
+
"lint-staged": "^11.1.4",
|
|
109
|
+
"mocha": "^9.1.4",
|
|
91
110
|
"node-es-module-loader": "^0.3.8",
|
|
92
111
|
"prettier": "^2.4.1",
|
|
93
112
|
"puppeteer": "^10.1.0",
|
|
94
|
-
"react-test-renderer": "^
|
|
113
|
+
"react-test-renderer": "^18.2.0",
|
|
95
114
|
"sinon": "^1.15.4",
|
|
96
115
|
"stylus": "^0.59.0",
|
|
97
116
|
"stylus-loader": "^2.3.1",
|
|
98
117
|
"tmp": "^0.2.1",
|
|
99
118
|
"uglify-js": "^2.7.4",
|
|
100
|
-
"unminified-webpack-plugin": "^
|
|
119
|
+
"unminified-webpack-plugin": "^3.0.0",
|
|
101
120
|
"unreleased": "^0.1.0",
|
|
102
121
|
"watchify": "^4.0.0",
|
|
103
|
-
"webpack": "^
|
|
104
|
-
"webpack-
|
|
105
|
-
"webpack-dev-server": "^
|
|
122
|
+
"webpack": "^5.75.0",
|
|
123
|
+
"webpack-cli": "^5.0.0",
|
|
124
|
+
"webpack-dev-server": "^4.11.1"
|
|
106
125
|
},
|
|
107
126
|
"dependencies": {
|
|
108
|
-
"auth0-js": "^9.19.
|
|
127
|
+
"auth0-js": "^9.19.2",
|
|
109
128
|
"auth0-password-policies": "^1.0.2",
|
|
110
129
|
"blueimp-md5": "^2.19.0",
|
|
111
|
-
"classnames": "^2.3.
|
|
112
|
-
"dompurify": "^2.3.
|
|
113
|
-
"immutable": "^3.7.
|
|
130
|
+
"classnames": "^2.3.2",
|
|
131
|
+
"dompurify": "^2.3.12",
|
|
132
|
+
"immutable": "^3.7.6",
|
|
114
133
|
"jsonp": "^0.2.1",
|
|
115
|
-
"node-fetch": "^2.6.7",
|
|
116
134
|
"password-sheriff": "^1.1.1",
|
|
117
135
|
"prop-types": "^15.8.0",
|
|
118
136
|
"qs": "^6.10.3",
|
|
119
|
-
"react": "^
|
|
120
|
-
"react-dom": "^
|
|
137
|
+
"react": "^18.2.0",
|
|
138
|
+
"react-dom": "^18.2.0",
|
|
121
139
|
"react-transition-group": "^2.2.1",
|
|
122
140
|
"trim": "^1.0.1",
|
|
123
141
|
"url-join": "^1.1.0",
|
|
124
142
|
"validator": "^13.6.0"
|
|
125
143
|
},
|
|
126
|
-
"resolutions": {
|
|
127
|
-
"node-fetch": "^2.6.1",
|
|
128
|
-
"crypto-js": "^4.1.1"
|
|
129
|
-
},
|
|
130
144
|
"ccu": {
|
|
131
145
|
"name": "lock",
|
|
132
146
|
"cdn": "https://cdn.auth0.com",
|
|
@@ -167,7 +181,8 @@
|
|
|
167
181
|
"coverageReporters": [
|
|
168
182
|
"lcov",
|
|
169
183
|
"text-summary"
|
|
170
|
-
]
|
|
184
|
+
],
|
|
185
|
+
"testEnvironment": "jest-environment-jsdom-global"
|
|
171
186
|
},
|
|
172
187
|
"lint-staged": {
|
|
173
188
|
"*.{js,jsx}": [
|
package/webpack.config.js
CHANGED
|
@@ -1,8 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const { spawnSync } = require('child_process');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const tmp = require('tmp');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* This is a helper function to generate valid certs using mkcert.
|
|
8
|
+
* If mkcert is not installed it will return false.
|
|
9
|
+
*/
|
|
10
|
+
function getDevCerts() {
|
|
11
|
+
let result = false;
|
|
12
|
+
const tmpDir = tmp.dirSync({ unsafeCleanup: true, prefix: 'lock-dev-' });
|
|
13
|
+
|
|
14
|
+
try {
|
|
15
|
+
spawnSync('mkcert', ['localhost'], { cwd: tmpDir.name });
|
|
16
|
+
result = {
|
|
17
|
+
key: fs.readFileSync(path.join(tmpDir.name, 'localhost-key.pem')),
|
|
18
|
+
cert: fs.readFileSync(path.join(tmpDir.name, 'localhost.pem'))
|
|
19
|
+
};
|
|
20
|
+
} catch (err) {}
|
|
21
|
+
|
|
22
|
+
tmpDir.removeCallback();
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
3
25
|
|
|
4
26
|
module.exports = {
|
|
5
27
|
entry: './src/browser.js',
|
|
28
|
+
mode: 'development',
|
|
29
|
+
target: 'browserslist',
|
|
6
30
|
output: {
|
|
7
31
|
path: path.join(__dirname, '../build'),
|
|
8
32
|
filename: 'lock.js'
|
|
@@ -10,13 +34,22 @@ module.exports = {
|
|
|
10
34
|
resolve: {
|
|
11
35
|
extensions: ['.webpack.js', '.web.js', '.js', '.jsx', '.styl']
|
|
12
36
|
},
|
|
37
|
+
devtool: 'source-map',
|
|
13
38
|
progress: true,
|
|
14
39
|
watch: true,
|
|
15
40
|
watchOptions: {
|
|
16
41
|
aggregateTimeout: 500,
|
|
17
42
|
poll: true
|
|
18
43
|
},
|
|
19
|
-
|
|
44
|
+
devServer: {
|
|
45
|
+
hot: true,
|
|
46
|
+
port: 3000,
|
|
47
|
+
https: getDevCerts() || true,
|
|
48
|
+
static: {
|
|
49
|
+
directory: path.join(__dirname, 'support'),
|
|
50
|
+
publicPath: '/support'
|
|
51
|
+
}
|
|
52
|
+
},
|
|
20
53
|
stats: {
|
|
21
54
|
colors: true,
|
|
22
55
|
modules: true,
|