auth0-lock 12.3.0 → 12.4.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/.github/actions/get-prerelease/action.yml +30 -0
- package/.github/actions/get-release-notes/action.yml +42 -0
- package/.github/actions/get-version/action.yml +21 -0
- package/.github/actions/npm-publish/action.yml +53 -0
- package/.github/actions/release-create/action.yml +47 -0
- package/.github/actions/tag-exists/action.yml +36 -0
- package/.github/dependabot.yml +5 -0
- package/.github/workflows/codeql.yml +3 -3
- package/.github/workflows/npm-release.yml +83 -0
- package/.github/workflows/release.yml +25 -0
- package/.github/workflows/snyk.yml +1 -1
- package/.github/workflows/test.yml +8 -8
- package/.shiprc +3 -2
- package/.version +1 -0
- package/CHANGELOG.md +15 -0
- package/DEVELOPMENT.md +8 -8
- package/Makefile +4 -4
- package/lib/CSSCore.js +0 -1
- package/lib/__tests__/connection/database/actions.js +2 -3
- package/lib/__tests__/connection/database/index.js +2 -2
- package/lib/__tests__/connection/enterprise/actions.js +2 -2
- package/lib/__tests__/connection/enterprise/hrd_pane.js +2 -2
- package/lib/__tests__/connection/enterprise/hrd_screen.js +2 -2
- package/lib/__tests__/connection/passwordless/ask_vcode.js +2 -2
- package/lib/__tests__/core/actions.js +4 -4
- package/lib/__tests__/core/remote_data.js +2 -2
- package/lib/__tests__/core/sso/last_login_screen.js +2 -2
- package/lib/__tests__/core/tenant.js +2 -2
- package/lib/__tests__/core/web_api.js +2 -2
- package/lib/__tests__/engine/classic.js +2 -2
- package/lib/__tests__/field/captcha/auth0_v2.js +28 -0
- package/lib/__tests__/field/captcha/third_party_captcha.js +261 -0
- package/lib/__tests__/field/captcha.js +22 -0
- package/lib/__tests__/field/field.js +2 -2
- package/lib/__tests__/i18n.js +2 -2
- package/lib/__tests__/testUtils.js +2 -2
- package/lib/__tests__/ui/box/chrome.js +2 -2
- package/lib/avatar.js +2 -2
- package/lib/connection/captcha.js +3 -3
- package/lib/connection/database/actions.js +2 -2
- package/lib/connection/database/index.js +2 -2
- package/lib/connection/database/login_pane.js +4 -4
- package/lib/connection/database/login_sign_up_tabs.js +4 -4
- package/lib/connection/database/mfa_pane.js +2 -2
- package/lib/connection/database/password_reset_confirmation.js +4 -4
- package/lib/connection/database/reset_password.js +4 -4
- package/lib/connection/database/reset_password_pane.js +4 -4
- package/lib/connection/database/signed_up_confirmation.js +4 -4
- package/lib/connection/enterprise/actions.js +4 -4
- package/lib/connection/enterprise/hrd_pane.js +4 -4
- package/lib/connection/enterprise/hrd_screen.js +4 -4
- package/lib/connection/enterprise/kerberos_screen.js +4 -4
- package/lib/connection/enterprise/quick_auth_screen.js +4 -4
- package/lib/connection/enterprise.js +2 -2
- package/lib/connection/passwordless/actions.js +5 -5
- package/lib/connection/passwordless/ask_vcode.js +2 -2
- package/lib/connection/passwordless/email_sent_confirmation.js +4 -4
- package/lib/connection/passwordless/index.js +2 -2
- package/lib/connection/social/index.js +2 -2
- package/lib/core/actions.js +4 -4
- package/lib/core/client/index.js +4 -5
- package/lib/core/client/settings.js +2 -2
- package/lib/core/error_screen.js +4 -4
- package/lib/core/index.js +3 -3
- package/lib/core/loading_screen.js +4 -4
- package/lib/core/remote_data.js +2 -2
- package/lib/core/screen.js +4 -4
- package/lib/core/signed_in_confirmation.js +4 -4
- package/lib/core/sso/last_login_screen.js +4 -4
- package/lib/core/tenant/index.js +4 -5
- package/lib/core/tenant/settings.js +2 -2
- package/lib/core/web_api/helper.js +5 -6
- package/lib/core/web_api/p2_api.js +4 -6
- package/lib/core/web_api.js +2 -2
- package/lib/core.js +5 -5
- package/lib/engine/classic/login.js +4 -4
- package/lib/engine/classic/mfa_login_screen.js +4 -4
- package/lib/engine/classic/sign_up_pane.js +4 -4
- package/lib/engine/classic/sign_up_screen.js +4 -4
- package/lib/engine/classic.js +4 -4
- package/lib/engine/passwordless/social_or_email_login_screen.js +4 -4
- package/lib/engine/passwordless/social_or_phone_number_login_screen.js +4 -4
- package/lib/engine/passwordless.js +4 -4
- package/lib/field/captcha/captcha_pane.js +4 -4
- package/lib/field/captcha/third_party_captcha.js +72 -30
- package/lib/field/custom_input.js +2 -2
- package/lib/field/email/email_pane.js +4 -4
- package/lib/field/email.js +2 -2
- package/lib/field/index.js +2 -2
- package/lib/field/mfa-code/mfa_code_pane.js +4 -4
- package/lib/field/password/password_pane.js +4 -4
- package/lib/field/phone-number/phone_number_pane.js +4 -4
- package/lib/field/social/event.js +2 -2
- package/lib/field/social/social_buttons_pane.js +4 -4
- package/lib/field/username/username_pane.js +4 -4
- package/lib/field/vcode/vcode_pane.js +4 -4
- package/lib/i18n.js +3 -3
- package/lib/lock.js +5 -5
- package/lib/passwordless.js +5 -5
- package/lib/quick-auth/actions.js +4 -4
- package/lib/sync.js +2 -2
- package/lib/ui/box/chrome.js +4 -4
- package/lib/ui/box/confirmation_pane.js +2 -2
- package/lib/ui/box/container.js +4 -4
- package/lib/ui/box/global_message.js +2 -2
- package/lib/ui/box/header.js +2 -2
- package/lib/ui/box/multisize_slide.js +2 -2
- package/lib/ui/box.js +2 -2
- package/lib/ui/input/captcha_input.js +2 -2
- package/lib/ui/input/checkbox_input.js +2 -2
- package/lib/ui/input/email_input.js +2 -2
- package/lib/ui/input/input_wrap.js +2 -2
- package/lib/ui/input/location_input.js +2 -2
- package/lib/ui/input/mfa_code_input.js +2 -2
- package/lib/ui/input/password/password_strength.js +2 -2
- package/lib/ui/input/password_input.js +4 -4
- package/lib/ui/input/phone_number_input.js +2 -2
- package/lib/ui/input/select_input.js +2 -2
- package/lib/ui/input/text_input.js +2 -2
- package/lib/ui/input/username_input.js +2 -2
- package/lib/ui/input/vcode_input.js +2 -2
- package/lib/ui/list.js +4 -4
- package/lib/utils/atom.js +2 -2
- package/lib/utils/cache.js +2 -2
- package/lib/utils/jsonp_utils.js +2 -2
- package/package.json +4 -3
- package/.github/workflows/publish.yml +0 -121
|
@@ -20,14 +20,14 @@ var _enterprise = require("../../connection/enterprise");
|
|
|
20
20
|
var _single_sign_on_notice = _interopRequireDefault(require("../../connection/enterprise/single_sign_on_notice"));
|
|
21
21
|
var _classic = require("../classic");
|
|
22
22
|
var i18n = _interopRequireWildcard(require("../../i18n"));
|
|
23
|
-
function _getRequireWildcardCache(
|
|
24
|
-
function _interopRequireWildcard(
|
|
23
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
24
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
25
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
26
26
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
27
|
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); } }
|
|
28
28
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
29
|
-
function _toPropertyKey(
|
|
30
|
-
function _toPrimitive(
|
|
29
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
30
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
31
31
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
32
32
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
33
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -12,14 +12,14 @@ var i18n = _interopRequireWildcard(require("../../i18n"));
|
|
|
12
12
|
var _actions = require("../../connection/database/actions");
|
|
13
13
|
var _index = require("../../connection/database/index");
|
|
14
14
|
var _signed_in_confirmation = require("../../core/signed_in_confirmation");
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
18
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19
19
|
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); } }
|
|
20
20
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
21
|
-
function _toPropertyKey(
|
|
22
|
-
function _toPrimitive(
|
|
21
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
22
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
23
23
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
24
24
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
25
25
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -16,14 +16,14 @@ var l = _interopRequireWildcard(require("../../core/index"));
|
|
|
16
16
|
var _captcha = require("../../connection/captcha");
|
|
17
17
|
var _enterprise = require("../../connection/enterprise");
|
|
18
18
|
var _classic = require("../classic");
|
|
19
|
-
function _getRequireWildcardCache(
|
|
20
|
-
function _interopRequireWildcard(
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
22
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23
23
|
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); } }
|
|
24
24
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
|
-
function _toPropertyKey(
|
|
26
|
-
function _toPrimitive(
|
|
25
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
26
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
27
27
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
28
28
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
29
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -23,14 +23,14 @@ var _sign_up_terms = _interopRequireDefault(require("../../connection/database/s
|
|
|
23
23
|
var _social_buttons_pane = _interopRequireDefault(require("../../field/social/social_buttons_pane"));
|
|
24
24
|
var _login_sign_up_tabs = _interopRequireDefault(require("../../connection/database/login_sign_up_tabs"));
|
|
25
25
|
var _single_sign_on_notice = _interopRequireDefault(require("../../connection/enterprise/single_sign_on_notice"));
|
|
26
|
-
function _getRequireWildcardCache(
|
|
27
|
-
function _interopRequireWildcard(
|
|
26
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
27
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
28
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
29
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
30
30
|
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); } }
|
|
31
31
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
32
|
-
function _toPropertyKey(
|
|
33
|
-
function _toPrimitive(
|
|
32
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
33
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
34
34
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
35
35
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
36
36
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
package/lib/engine/classic.js
CHANGED
|
@@ -31,16 +31,16 @@ var _last_login_screen = _interopRequireDefault(require("../core/sso/last_login_
|
|
|
31
31
|
var _sync = require("../sync");
|
|
32
32
|
var _index5 = require("../field/index");
|
|
33
33
|
var _index6 = require("../store/index");
|
|
34
|
-
function _getRequireWildcardCache(
|
|
35
|
-
function _interopRequireWildcard(
|
|
34
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
35
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
36
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
37
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
38
38
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
39
39
|
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); } }
|
|
40
40
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
41
41
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
42
|
-
function _toPropertyKey(
|
|
43
|
-
function _toPrimitive(
|
|
42
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
43
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
44
44
|
function isSSOEnabled(m, options) {
|
|
45
45
|
return matchesEnterpriseConnection(m, (0, _index3.databaseUsernameValue)(m, options));
|
|
46
46
|
}
|
|
@@ -18,14 +18,14 @@ var _email_sent_confirmation = require("../../connection/passwordless/email_sent
|
|
|
18
18
|
var _signed_in_confirmation = require("../../core/signed_in_confirmation");
|
|
19
19
|
var l = _interopRequireWildcard(require("../../core/index"));
|
|
20
20
|
var _sign_up_terms = _interopRequireDefault(require("../../connection/database/sign_up_terms"));
|
|
21
|
-
function _getRequireWildcardCache(
|
|
22
|
-
function _interopRequireWildcard(
|
|
21
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
24
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
25
|
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); } }
|
|
26
26
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
|
-
function _toPropertyKey(
|
|
28
|
-
function _toPrimitive(
|
|
27
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
28
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
29
29
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
30
30
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
31
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -18,14 +18,14 @@ var l = _interopRequireWildcard(require("../../core/index"));
|
|
|
18
18
|
var _index2 = require("../../field/index");
|
|
19
19
|
var _index3 = require("../../connection/passwordless/index");
|
|
20
20
|
var _sign_up_terms = _interopRequireDefault(require("../../connection/database/sign_up_terms"));
|
|
21
|
-
function _getRequireWildcardCache(
|
|
22
|
-
function _interopRequireWildcard(
|
|
21
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
24
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
25
|
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); } }
|
|
26
26
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
|
-
function _toPropertyKey(
|
|
28
|
-
function _toPrimitive(
|
|
27
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
28
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
29
29
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
30
30
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
31
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -18,15 +18,15 @@ var _quick_auth = require("../quick_auth");
|
|
|
18
18
|
var sso = _interopRequireWildcard(require("../core/sso/index"));
|
|
19
19
|
var _email = require("../field/email");
|
|
20
20
|
var _phone_number = require("../field/phone_number");
|
|
21
|
-
function _getRequireWildcardCache(
|
|
22
|
-
function _interopRequireWildcard(
|
|
21
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
24
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
25
25
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
26
26
|
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); } }
|
|
27
27
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
28
|
-
function _toPropertyKey(
|
|
29
|
-
function _toPrimitive(
|
|
28
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
29
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
30
30
|
var setPrefill = function setPrefill(m) {
|
|
31
31
|
var _l$prefill$toJS = l.prefill(m).toJS(),
|
|
32
32
|
email = _l$prefill$toJS.email,
|
|
@@ -13,14 +13,14 @@ var _index2 = require("../../store/index");
|
|
|
13
13
|
var captchaField = _interopRequireWildcard(require("../captcha"));
|
|
14
14
|
var _index3 = require("../index");
|
|
15
15
|
var _third_party_captcha = require("./third_party_captcha");
|
|
16
|
-
function _getRequireWildcardCache(
|
|
17
|
-
function _interopRequireWildcard(
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
20
20
|
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); } }
|
|
21
21
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
22
|
-
function _toPropertyKey(
|
|
23
|
-
function _toPrimitive(
|
|
22
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
23
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
24
24
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
25
25
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
26
26
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -9,11 +9,14 @@ var _createRef = require("../../utils/createRef");
|
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
15
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
13
16
|
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); } }
|
|
14
17
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
15
|
-
function _toPropertyKey(
|
|
16
|
-
function _toPrimitive(
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
20
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
18
21
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
19
22
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -27,10 +30,11 @@ var RECAPTCHA_ENTERPRISE_PROVIDER = 'recaptcha_enterprise';
|
|
|
27
30
|
var HCAPTCHA_PROVIDER = 'hcaptcha';
|
|
28
31
|
var FRIENDLY_CAPTCHA_PROVIDER = 'friendly_captcha';
|
|
29
32
|
var ARKOSE_PROVIDER = 'arkose';
|
|
33
|
+
var AUTH0_V2_CAPTCHA_PROVIDER = 'auth0_v2';
|
|
30
34
|
var TIMEOUT_MS = 500;
|
|
31
35
|
var MAX_RETRY = 3;
|
|
32
36
|
var isThirdPartyCaptcha = exports.isThirdPartyCaptcha = function isThirdPartyCaptcha(provider) {
|
|
33
|
-
return provider === RECAPTCHA_ENTERPRISE_PROVIDER || provider === RECAPTCHA_V2_PROVIDER || provider === HCAPTCHA_PROVIDER || provider === FRIENDLY_CAPTCHA_PROVIDER || provider === ARKOSE_PROVIDER;
|
|
37
|
+
return provider === RECAPTCHA_ENTERPRISE_PROVIDER || provider === RECAPTCHA_V2_PROVIDER || provider === HCAPTCHA_PROVIDER || provider === FRIENDLY_CAPTCHA_PROVIDER || provider === ARKOSE_PROVIDER || provider === AUTH0_V2_CAPTCHA_PROVIDER;
|
|
34
38
|
};
|
|
35
39
|
var getCaptchaProvider = function getCaptchaProvider(provider) {
|
|
36
40
|
switch (provider) {
|
|
@@ -44,6 +48,8 @@ var getCaptchaProvider = function getCaptchaProvider(provider) {
|
|
|
44
48
|
return window.friendlyChallenge;
|
|
45
49
|
case ARKOSE_PROVIDER:
|
|
46
50
|
return window.arkose;
|
|
51
|
+
case AUTH0_V2_CAPTCHA_PROVIDER:
|
|
52
|
+
return window.turnstile;
|
|
47
53
|
}
|
|
48
54
|
};
|
|
49
55
|
var scriptForProvider = function scriptForProvider(provider, lang, callback, clientSubdomain, siteKey) {
|
|
@@ -58,6 +64,8 @@ var scriptForProvider = function scriptForProvider(provider, lang, callback, cli
|
|
|
58
64
|
return 'https://cdn.jsdelivr.net/npm/friendly-challenge@0.9.12/widget.min.js';
|
|
59
65
|
case ARKOSE_PROVIDER:
|
|
60
66
|
return 'https://' + clientSubdomain + '.arkoselabs.com/v2/' + siteKey + '/api.js';
|
|
67
|
+
case AUTH0_V2_CAPTCHA_PROVIDER:
|
|
68
|
+
return "https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit&onload=".concat(callback);
|
|
61
69
|
}
|
|
62
70
|
};
|
|
63
71
|
var providerDomPrefix = function providerDomPrefix(provider) {
|
|
@@ -72,6 +80,8 @@ var providerDomPrefix = function providerDomPrefix(provider) {
|
|
|
72
80
|
return 'friendly-captcha';
|
|
73
81
|
case ARKOSE_PROVIDER:
|
|
74
82
|
return 'arkose';
|
|
83
|
+
case AUTH0_V2_CAPTCHA_PROVIDER:
|
|
84
|
+
return 'auth0-v2';
|
|
75
85
|
}
|
|
76
86
|
};
|
|
77
87
|
var loadScript = function loadScript(url, attributes) {
|
|
@@ -133,9 +143,51 @@ var ThirdPartyCaptcha = exports.ThirdPartyCaptcha = /*#__PURE__*/function (_Reac
|
|
|
133
143
|
return _this;
|
|
134
144
|
}
|
|
135
145
|
_createClass(ThirdPartyCaptcha, [{
|
|
146
|
+
key: "getRenderParams",
|
|
147
|
+
value: function getRenderParams() {
|
|
148
|
+
var _this2 = this;
|
|
149
|
+
if (this.props.provider === FRIENDLY_CAPTCHA_PROVIDER) {
|
|
150
|
+
return {
|
|
151
|
+
sitekey: this.props.sitekey,
|
|
152
|
+
language: this.props.hl,
|
|
153
|
+
doneCallback: this.changeHandler,
|
|
154
|
+
errorCallback: this.erroredHandler
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
var renderParams = {
|
|
158
|
+
sitekey: this.props.sitekey,
|
|
159
|
+
callback: this.changeHandler,
|
|
160
|
+
'expired-callback': this.expiredHandler,
|
|
161
|
+
'error-callback': this.erroredHandler
|
|
162
|
+
};
|
|
163
|
+
if (this.props.provider === AUTH0_V2_CAPTCHA_PROVIDER) {
|
|
164
|
+
renderParams = _objectSpread(_objectSpread({}, renderParams), {}, {
|
|
165
|
+
language: this.props.hl,
|
|
166
|
+
theme: 'light',
|
|
167
|
+
retry: 'never',
|
|
168
|
+
'response-field': false,
|
|
169
|
+
'error-callback': function errorCallback() {
|
|
170
|
+
if (_this2.state.retryCount < MAX_RETRY) {
|
|
171
|
+
getCaptchaProvider(_this2.props.provider).reset(_this2.widgetId);
|
|
172
|
+
_this2.setState(function (prevState) {
|
|
173
|
+
return {
|
|
174
|
+
retryCount: prevState.retryCount + 1
|
|
175
|
+
};
|
|
176
|
+
});
|
|
177
|
+
} else {
|
|
178
|
+
// similar implementation to ARKOSE_PROVIDER failOpen
|
|
179
|
+
_this2.changeHandler('BYPASS_CAPTCHA');
|
|
180
|
+
}
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
return renderParams;
|
|
186
|
+
}
|
|
187
|
+
}, {
|
|
136
188
|
key: "injectCaptchaScript",
|
|
137
189
|
value: function injectCaptchaScript() {
|
|
138
|
-
var
|
|
190
|
+
var _this3 = this;
|
|
139
191
|
var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : noop;
|
|
140
192
|
var _this$props = this.props,
|
|
141
193
|
provider = _this$props.provider,
|
|
@@ -151,13 +203,13 @@ var ThirdPartyCaptcha = exports.ThirdPartyCaptcha = /*#__PURE__*/function (_Reac
|
|
|
151
203
|
async: true,
|
|
152
204
|
defer: true
|
|
153
205
|
};
|
|
154
|
-
if (provider === ARKOSE_PROVIDER) {
|
|
206
|
+
if (provider === ARKOSE_PROVIDER || provider === AUTH0_V2_CAPTCHA_PROVIDER) {
|
|
155
207
|
attributes['data-callback'] = callbackName;
|
|
156
208
|
attributes['onerror'] = function () {
|
|
157
|
-
if (
|
|
209
|
+
if (_this3.state.retryCount < MAX_RETRY) {
|
|
158
210
|
removeScript(scriptUrl);
|
|
159
211
|
loadScript(scriptUrl, attributes);
|
|
160
|
-
|
|
212
|
+
_this3.setState(function (prevState) {
|
|
161
213
|
return {
|
|
162
214
|
retryCount: prevState.retryCount + 1
|
|
163
215
|
};
|
|
@@ -165,7 +217,7 @@ var ThirdPartyCaptcha = exports.ThirdPartyCaptcha = /*#__PURE__*/function (_Reac
|
|
|
165
217
|
return;
|
|
166
218
|
}
|
|
167
219
|
removeScript(scriptUrl);
|
|
168
|
-
|
|
220
|
+
_this3.changeHandler('BYPASS_CAPTCHA');
|
|
169
221
|
};
|
|
170
222
|
window[callbackName] = function (arkose) {
|
|
171
223
|
callback(arkose);
|
|
@@ -192,49 +244,39 @@ var ThirdPartyCaptcha = exports.ThirdPartyCaptcha = /*#__PURE__*/function (_Reac
|
|
|
192
244
|
}, {
|
|
193
245
|
key: "componentDidMount",
|
|
194
246
|
value: function componentDidMount() {
|
|
195
|
-
var
|
|
247
|
+
var _this4 = this;
|
|
196
248
|
this.injectCaptchaScript(function (arkose) {
|
|
197
|
-
var provider = getCaptchaProvider(
|
|
198
|
-
if (
|
|
249
|
+
var provider = getCaptchaProvider(_this4.props.provider);
|
|
250
|
+
if (_this4.props.provider === ARKOSE_PROVIDER) {
|
|
199
251
|
arkose.setConfig({
|
|
200
252
|
onReady: function onReady() {
|
|
201
253
|
arkose.run();
|
|
202
254
|
},
|
|
203
255
|
onCompleted: function onCompleted(response) {
|
|
204
|
-
|
|
256
|
+
_this4.changeHandler(response.token);
|
|
205
257
|
},
|
|
206
258
|
onError: function onError() {
|
|
207
|
-
if (
|
|
259
|
+
if (_this4.state.retryCount < MAX_RETRY) {
|
|
208
260
|
arkose.reset();
|
|
209
261
|
// To ensure reset is successful, we need to set a timeout here
|
|
210
262
|
setTimeout(function () {
|
|
211
263
|
arkose.run();
|
|
212
264
|
}, TIMEOUT_MS);
|
|
213
|
-
|
|
265
|
+
_this4.setState(function (prevState) {
|
|
214
266
|
return {
|
|
215
267
|
retryCount: prevState.retryCount + 1
|
|
216
268
|
};
|
|
217
269
|
});
|
|
218
270
|
} else {
|
|
219
|
-
|
|
271
|
+
_this4.changeHandler('BYPASS_CAPTCHA');
|
|
220
272
|
}
|
|
221
273
|
}
|
|
222
274
|
});
|
|
223
|
-
} else if (
|
|
224
|
-
|
|
225
|
-
sitekey: _this3.props.sitekey,
|
|
226
|
-
language: _this3.props.hl,
|
|
227
|
-
doneCallback: _this3.changeHandler,
|
|
228
|
-
errorCallback: _this3.erroredHandler
|
|
229
|
-
});
|
|
275
|
+
} else if (_this4.props.provider === FRIENDLY_CAPTCHA_PROVIDER) {
|
|
276
|
+
_this4.widgetInstance = new provider.WidgetInstance(_this4.ref.current, _this4.getRenderParams());
|
|
230
277
|
} else {
|
|
231
278
|
// if this is enterprise then we change this to window.grecaptcha.enterprise.render
|
|
232
|
-
|
|
233
|
-
callback: _this3.changeHandler,
|
|
234
|
-
'expired-callback': _this3.expiredHandler,
|
|
235
|
-
'error-callback': _this3.erroredHandler,
|
|
236
|
-
sitekey: _this3.props.sitekey
|
|
237
|
-
});
|
|
279
|
+
_this4.widgetId = provider.render(_this4.ref.current, _this4.getRenderParams());
|
|
238
280
|
}
|
|
239
281
|
});
|
|
240
282
|
}
|
|
@@ -253,7 +295,7 @@ var ThirdPartyCaptcha = exports.ThirdPartyCaptcha = /*#__PURE__*/function (_Reac
|
|
|
253
295
|
}, {
|
|
254
296
|
key: "render",
|
|
255
297
|
value: function render() {
|
|
256
|
-
var
|
|
298
|
+
var _this5 = this;
|
|
257
299
|
/*
|
|
258
300
|
This is an override for the following conflicting css-rule:
|
|
259
301
|
@media screen and (max-width: 480px)
|
|
@@ -262,7 +304,7 @@ var ThirdPartyCaptcha = exports.ThirdPartyCaptcha = /*#__PURE__*/function (_Reac
|
|
|
262
304
|
}
|
|
263
305
|
*/
|
|
264
306
|
var fixInterval = setInterval(function () {
|
|
265
|
-
var iframes = Array.from(document.querySelectorAll("iframe[src*=\"".concat(providerDomPrefix(
|
|
307
|
+
var iframes = Array.from(document.querySelectorAll("iframe[src*=\"".concat(providerDomPrefix(_this5.props.provider), "\"]")));
|
|
266
308
|
var containers = iframes.map(function (iframe) {
|
|
267
309
|
return iframe.parentNode.parentNode;
|
|
268
310
|
}).filter(function (container) {
|
|
@@ -12,8 +12,8 @@ var _text_input = _interopRequireDefault(require("../ui/input/text_input"));
|
|
|
12
12
|
var _select_input = _interopRequireDefault(require("../ui/input/select_input"));
|
|
13
13
|
var _checkbox_input = _interopRequireDefault(require("../ui/input/checkbox_input"));
|
|
14
14
|
var l = _interopRequireWildcard(require("../core/index"));
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
18
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
var CustomInput = function CustomInput(_ref) {
|
|
@@ -13,14 +13,14 @@ var _index2 = require("../../store/index");
|
|
|
13
13
|
var l = _interopRequireWildcard(require("../../core/index"));
|
|
14
14
|
var _email = require("../email");
|
|
15
15
|
var _avatar = require("../../avatar");
|
|
16
|
-
function _getRequireWildcardCache(
|
|
17
|
-
function _interopRequireWildcard(
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
20
20
|
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); } }
|
|
21
21
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
22
|
-
function _toPropertyKey(
|
|
23
|
-
function _toPrimitive(
|
|
22
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
23
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
24
24
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
25
25
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
26
26
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
package/lib/field/email.js
CHANGED
|
@@ -14,8 +14,8 @@ var _isEmail2 = _interopRequireDefault(require("validator/lib/isEmail"));
|
|
|
14
14
|
var _index = require("./index");
|
|
15
15
|
var _enterprise = require("../connection/enterprise");
|
|
16
16
|
var i18n = _interopRequireWildcard(require("../i18n"));
|
|
17
|
-
function _getRequireWildcardCache(
|
|
18
|
-
function _interopRequireWildcard(
|
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
20
|
function validateEmail(str) {
|
|
21
21
|
var strictValidation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|