auth0-lock 11.35.0 → 12.0.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 +3 -1
- package/.shiprc +4 -5
- package/CHANGELOG.md +25 -0
- package/DEVELOPMENT.md +1 -1
- package/README.md +20 -16
- 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 +24 -47
- package/lib/__tests__/connection/database/password_reset_confirmation.js +23 -32
- package/lib/__tests__/connection/database/reset_password.js +17 -39
- package/lib/__tests__/connection/database/signed_up_confirmation.js +23 -32
- 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 +32 -75
- package/lib/__tests__/connection/passwordless/ask_vcode.js +29 -51
- package/lib/__tests__/connection/passwordless/email_sent_confirmation.js +23 -32
- 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 +23 -32
- 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/social_or_email_login_screen.js +7 -28
- package/lib/__tests__/engine/passwordless/social_or_phone_number_login_screen.js +7 -28
- 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 +23 -42
- 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 +15 -34
- 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 -65
- 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 +154 -305
- package/lib/core/loading_screen.js +61 -71
- package/lib/core/pane_separator.js +10 -10
- package/lib/core/remote_data.js +30 -51
- 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 +22 -28
- package/lib/core/web_api/p2_api.js +162 -171
- package/lib/core/web_api.js +106 -94
- 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 +80 -116
- package/lib/engine/passwordless/social_or_phone_number_login_screen.js +79 -110
- package/lib/engine/passwordless.js +75 -104
- package/lib/field/actions.js +11 -17
- package/lib/field/captcha/captcha_pane.js +83 -103
- 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 +50 -87
- 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/package.json +48 -34
- package/webpack.config.js +36 -3
|
@@ -1,105 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _screen = require(
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
var _index = require('../../connection/database/index');
|
|
26
|
-
|
|
27
|
-
var _actions = require('../../connection/database/actions');
|
|
28
|
-
|
|
29
|
-
var _signed_in_confirmation = require('../../core/signed_in_confirmation');
|
|
30
|
-
|
|
31
|
-
var _login_sign_up_tabs = require('../../connection/database/login_sign_up_tabs');
|
|
32
|
-
|
|
33
|
-
var _login_sign_up_tabs2 = _interopRequireDefault(_login_sign_up_tabs);
|
|
34
|
-
|
|
35
|
-
var _index2 = require('../../core/index');
|
|
36
|
-
|
|
37
|
-
var l = _interopRequireWildcard(_index2);
|
|
38
|
-
|
|
39
|
-
var _actions2 = require('../../connection/enterprise/actions');
|
|
40
|
-
|
|
41
|
-
var _enterprise = require('../../connection/enterprise');
|
|
42
|
-
|
|
43
|
-
var _single_sign_on_notice = require('../../connection/enterprise/single_sign_on_notice');
|
|
44
|
-
|
|
45
|
-
var _single_sign_on_notice2 = _interopRequireDefault(_single_sign_on_notice);
|
|
46
|
-
|
|
47
|
-
var _classic = require('../classic');
|
|
48
|
-
|
|
49
|
-
var _i18n = require('../../i18n');
|
|
50
|
-
|
|
51
|
-
var i18n = _interopRequireWildcard(_i18n);
|
|
52
|
-
|
|
53
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
54
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _screen = _interopRequireDefault(require("../../core/screen"));
|
|
10
|
+
var _social_buttons_pane = _interopRequireDefault(require("../../field/social/social_buttons_pane"));
|
|
11
|
+
var _login_pane = _interopRequireDefault(require("../../connection/database/login_pane"));
|
|
12
|
+
var _pane_separator = _interopRequireDefault(require("../../core/pane_separator"));
|
|
13
|
+
var _index = require("../../connection/database/index");
|
|
14
|
+
var _actions = require("../../connection/database/actions");
|
|
15
|
+
var _signed_in_confirmation = require("../../core/signed_in_confirmation");
|
|
16
|
+
var _login_sign_up_tabs = _interopRequireDefault(require("../../connection/database/login_sign_up_tabs"));
|
|
17
|
+
var l = _interopRequireWildcard(require("../../core/index"));
|
|
18
|
+
var _actions2 = require("../../connection/enterprise/actions");
|
|
19
|
+
var _enterprise = require("../../connection/enterprise");
|
|
20
|
+
var _single_sign_on_notice = _interopRequireDefault(require("../../connection/enterprise/single_sign_on_notice"));
|
|
21
|
+
var _classic = require("../classic");
|
|
22
|
+
var i18n = _interopRequireWildcard(require("../../i18n"));
|
|
23
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
55
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
56
|
-
|
|
57
26
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
58
|
-
|
|
59
|
-
function
|
|
60
|
-
|
|
61
|
-
function
|
|
62
|
-
|
|
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
|
+
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
30
|
+
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); }
|
|
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
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
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); }; }
|
|
34
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
35
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
36
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
63
38
|
function shouldRenderTabs(m) {
|
|
64
39
|
if ((0, _classic.isSSOEnabled)(m)) return false;
|
|
65
40
|
if (l.hasSomeConnections(m, 'database')) return (0, _index.hasScreen)(m, 'signUp');
|
|
66
41
|
if (l.hasSomeConnections(m, 'social') && (0, _index.hasInitialScreen)(m, 'signUp')) return (0, _index.hasScreen)(m, 'signUp');
|
|
67
42
|
}
|
|
68
|
-
|
|
69
43
|
var LoginComponent = function LoginComponent(_ref) {
|
|
70
44
|
var i18n = _ref.i18n,
|
|
71
|
-
|
|
72
|
-
|
|
45
|
+
model = _ref.model;
|
|
73
46
|
var sso = (0, _classic.isSSOEnabled)(model);
|
|
74
47
|
var onlySocial = (0, _classic.hasOnlyClassicConnections)(model, 'social');
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
key: 'loginsignup',
|
|
48
|
+
var tabs = shouldRenderTabs(model) && /*#__PURE__*/_react.default.createElement(_login_sign_up_tabs.default, {
|
|
49
|
+
key: "loginsignup",
|
|
78
50
|
lock: model,
|
|
79
51
|
loginLabel: i18n.str('loginLabel'),
|
|
80
52
|
signUpLink: (0, _index.signUpLink)(model),
|
|
81
53
|
signUpLabel: i18n.str('signUpLabel')
|
|
82
54
|
});
|
|
83
|
-
|
|
84
|
-
var social = l.hasSomeConnections(model, 'social') && _react2.default.createElement(_social_buttons_pane2.default, {
|
|
55
|
+
var social = l.hasSomeConnections(model, 'social') && /*#__PURE__*/_react.default.createElement(_social_buttons_pane.default, {
|
|
85
56
|
instructions: i18n.html('socialLoginInstructions'),
|
|
86
57
|
labelFn: i18n.str,
|
|
87
58
|
lock: model,
|
|
88
59
|
showLoading: onlySocial,
|
|
89
60
|
signUp: false
|
|
90
61
|
});
|
|
91
|
-
|
|
92
62
|
var showPassword = !sso && (l.hasSomeConnections(model, 'database') || !!(0, _enterprise.findADConnectionWithoutDomain)(model));
|
|
93
|
-
|
|
94
63
|
var showForgotPasswordLink = showPassword && l.hasSomeConnections(model, 'database');
|
|
95
|
-
|
|
96
64
|
var loginInstructionsKey = social ? 'databaseEnterpriseAlternativeLoginInstructions' : 'databaseEnterpriseLoginInstructions';
|
|
97
|
-
|
|
98
65
|
var usernameInputPlaceholderKey = (0, _index.databaseUsernameStyle)(model) === 'any' || l.countConnections(model, 'enterprise') > 1 ? 'usernameOrEmailInputPlaceholder' : 'usernameInputPlaceholder';
|
|
99
|
-
|
|
100
66
|
var usernameStyle = (0, _index.databaseUsernameStyle)(model);
|
|
101
|
-
|
|
102
|
-
var login = (sso || l.hasSomeConnections(model, 'database') || l.hasSomeConnections(model, 'enterprise')) && _react2.default.createElement(_login_pane2.default, {
|
|
67
|
+
var login = (sso || l.hasSomeConnections(model, 'database') || l.hasSomeConnections(model, 'enterprise')) && /*#__PURE__*/_react.default.createElement(_login_pane.default, {
|
|
103
68
|
emailInputPlaceholder: i18n.str('emailInputPlaceholder'),
|
|
104
69
|
forgotPasswordAction: i18n.str('forgotPasswordAction'),
|
|
105
70
|
i18n: i18n,
|
|
@@ -111,81 +76,64 @@ var LoginComponent = function LoginComponent(_ref) {
|
|
|
111
76
|
usernameInputPlaceholder: i18n.str(usernameInputPlaceholderKey),
|
|
112
77
|
usernameStyle: usernameStyle
|
|
113
78
|
});
|
|
114
|
-
|
|
115
|
-
var
|
|
116
|
-
|
|
117
|
-
null,
|
|
118
|
-
i18n.str('ssoEnabled')
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
var separator = social && login && _react2.default.createElement(_pane_separator2.default, null);
|
|
122
|
-
|
|
123
|
-
return _react2.default.createElement(
|
|
124
|
-
'div',
|
|
125
|
-
null,
|
|
126
|
-
ssoNotice,
|
|
127
|
-
tabs,
|
|
128
|
-
_react2.default.createElement(
|
|
129
|
-
'div',
|
|
130
|
-
null,
|
|
131
|
-
social,
|
|
132
|
-
separator,
|
|
133
|
-
login
|
|
134
|
-
)
|
|
135
|
-
);
|
|
79
|
+
var ssoNotice = sso && /*#__PURE__*/_react.default.createElement(_single_sign_on_notice.default, null, i18n.str('ssoEnabled'));
|
|
80
|
+
var separator = social && login && /*#__PURE__*/_react.default.createElement(_pane_separator.default, null);
|
|
81
|
+
return /*#__PURE__*/_react.default.createElement("div", null, ssoNotice, tabs, /*#__PURE__*/_react.default.createElement("div", null, social, separator, login));
|
|
136
82
|
};
|
|
137
|
-
|
|
138
|
-
var Login = function (_Screen) {
|
|
83
|
+
var Login = /*#__PURE__*/function (_Screen) {
|
|
139
84
|
_inherits(Login, _Screen);
|
|
140
|
-
|
|
85
|
+
var _super = _createSuper(Login);
|
|
141
86
|
function Login() {
|
|
142
87
|
_classCallCheck(this, Login);
|
|
143
|
-
|
|
144
|
-
return _possibleConstructorReturn(this, _Screen.call(this, 'main.login'));
|
|
88
|
+
return _super.call(this, 'main.login');
|
|
145
89
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
Login.prototype.renderTabs = function renderTabs(model) {
|
|
152
|
-
return shouldRenderTabs(model);
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
Login.prototype.submitButtonLabel = function submitButtonLabel(m) {
|
|
156
|
-
return i18n.str(m, ['loginSubmitLabel']);
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
Login.prototype.isSubmitDisabled = function isSubmitDisabled(m) {
|
|
160
|
-
// it should disable the submit button if there is any connection that
|
|
161
|
-
// requires username/password and there is no enterprise with domain
|
|
162
|
-
// that matches with the email domain entered for HRD
|
|
163
|
-
return !l.hasSomeConnections(m, 'database') && // no database connection
|
|
164
|
-
!(0, _enterprise.findADConnectionWithoutDomain)(m) && // no enterprise without domain
|
|
165
|
-
!(0, _classic.isSSOEnabled)(m); // no matching domain
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
Login.prototype.submitHandler = function submitHandler(model) {
|
|
169
|
-
if ((0, _classic.hasOnlyClassicConnections)(model, 'social')) {
|
|
170
|
-
return null;
|
|
90
|
+
_createClass(Login, [{
|
|
91
|
+
key: "renderAuxiliaryPane",
|
|
92
|
+
value: function renderAuxiliaryPane(lock) {
|
|
93
|
+
return (0, _signed_in_confirmation.renderSignedInConfirmation)(lock);
|
|
171
94
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
};
|
|
95
|
+
}, {
|
|
96
|
+
key: "renderTabs",
|
|
97
|
+
value: function renderTabs(model) {
|
|
98
|
+
return shouldRenderTabs(model);
|
|
177
99
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
100
|
+
}, {
|
|
101
|
+
key: "submitButtonLabel",
|
|
102
|
+
value: function submitButtonLabel(m) {
|
|
103
|
+
return i18n.str(m, ['loginSubmitLabel']);
|
|
104
|
+
}
|
|
105
|
+
}, {
|
|
106
|
+
key: "isSubmitDisabled",
|
|
107
|
+
value: function isSubmitDisabled(m) {
|
|
108
|
+
// it should disable the submit button if there is any connection that
|
|
109
|
+
// requires username/password and there is no enterprise with domain
|
|
110
|
+
// that matches with the email domain entered for HRD
|
|
111
|
+
return !l.hasSomeConnections(m, 'database') &&
|
|
112
|
+
// no database connection
|
|
113
|
+
!(0, _enterprise.findADConnectionWithoutDomain)(m) &&
|
|
114
|
+
// no enterprise without domain
|
|
115
|
+
!(0, _classic.isSSOEnabled)(m); // no matching domain
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
key: "submitHandler",
|
|
119
|
+
value: function submitHandler(model) {
|
|
120
|
+
if ((0, _classic.hasOnlyClassicConnections)(model, 'social')) {
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
if ((0, _enterprise.isHRDDomain)(model, (0, _index.databaseUsernameValue)(model))) {
|
|
124
|
+
return function (id) {
|
|
125
|
+
return (0, _actions2.startHRD)(id, (0, _index.databaseUsernameValue)(model));
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
var useDatabaseConnection = !(0, _classic.isSSOEnabled)(model) && (0, _index.databaseConnection)(model) && ((0, _index.defaultDatabaseConnection)(model) || !(0, _enterprise.defaultEnterpriseConnection)(model));
|
|
129
|
+
return useDatabaseConnection ? _actions.logIn : _actions2.logIn;
|
|
130
|
+
}
|
|
131
|
+
}, {
|
|
132
|
+
key: "render",
|
|
133
|
+
value: function render() {
|
|
134
|
+
return LoginComponent;
|
|
135
|
+
}
|
|
136
|
+
}]);
|
|
188
137
|
return Login;
|
|
189
|
-
}(
|
|
190
|
-
|
|
138
|
+
}(_screen.default);
|
|
191
139
|
exports.default = Login;
|
|
@@ -1,44 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _screen = require(
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
var _i18n = require('../../i18n');
|
|
18
|
-
|
|
19
|
-
var i18n = _interopRequireWildcard(_i18n);
|
|
20
|
-
|
|
21
|
-
var _actions = require('../../connection/database/actions');
|
|
22
|
-
|
|
23
|
-
var _index = require('../../connection/database/index');
|
|
24
|
-
|
|
25
|
-
var _signed_in_confirmation = require('../../core/signed_in_confirmation');
|
|
26
|
-
|
|
27
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
28
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _screen = _interopRequireDefault(require("../../core/screen"));
|
|
10
|
+
var _mfa_pane = _interopRequireDefault(require("../../connection/database/mfa_pane"));
|
|
11
|
+
var i18n = _interopRequireWildcard(require("../../i18n"));
|
|
12
|
+
var _actions = require("../../connection/database/actions");
|
|
13
|
+
var _index = require("../../connection/database/index");
|
|
14
|
+
var _signed_in_confirmation = require("../../core/signed_in_confirmation");
|
|
15
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
|
-
|
|
31
18
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
32
|
-
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
function
|
|
36
|
-
|
|
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
|
+
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
22
|
+
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); }
|
|
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
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
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); }; }
|
|
26
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
27
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
28
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
29
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
30
|
var Component = function Component(_ref) {
|
|
38
31
|
var i18n = _ref.i18n,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return _react2.default.createElement(_mfa_pane2.default, {
|
|
32
|
+
model = _ref.model;
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement(_mfa_pane.default, {
|
|
42
34
|
mfaInputPlaceholder: i18n.str('mfaInputPlaceholder'),
|
|
43
35
|
i18n: i18n,
|
|
44
36
|
instructions: i18n.str('mfaLoginInstructions'),
|
|
@@ -46,39 +38,41 @@ var Component = function Component(_ref) {
|
|
|
46
38
|
title: i18n.str('mfaLoginTitle')
|
|
47
39
|
});
|
|
48
40
|
};
|
|
49
|
-
|
|
50
|
-
var MFALoginScreen = function (_Screen) {
|
|
41
|
+
var MFALoginScreen = /*#__PURE__*/function (_Screen) {
|
|
51
42
|
_inherits(MFALoginScreen, _Screen);
|
|
52
|
-
|
|
43
|
+
var _super = _createSuper(MFALoginScreen);
|
|
53
44
|
function MFALoginScreen() {
|
|
54
45
|
_classCallCheck(this, MFALoginScreen);
|
|
55
|
-
|
|
56
|
-
return _possibleConstructorReturn(this, _Screen.call(this, 'mfa.mfaCode'));
|
|
46
|
+
return _super.call(this, 'mfa.mfaCode');
|
|
57
47
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
48
|
+
_createClass(MFALoginScreen, [{
|
|
49
|
+
key: "renderAuxiliaryPane",
|
|
50
|
+
value: function renderAuxiliaryPane(lock) {
|
|
51
|
+
return (0, _signed_in_confirmation.renderSignedInConfirmation)(lock);
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
key: "submitButtonLabel",
|
|
55
|
+
value: function submitButtonLabel(m) {
|
|
56
|
+
return i18n.str(m, ['mfaSubmitLabel']);
|
|
57
|
+
}
|
|
58
|
+
}, {
|
|
59
|
+
key: "submitHandler",
|
|
60
|
+
value: function submitHandler(m) {
|
|
61
|
+
return function (id) {
|
|
62
|
+
return (0, _actions.logIn)(id, true);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
key: "render",
|
|
67
|
+
value: function render() {
|
|
68
|
+
return Component;
|
|
69
|
+
}
|
|
70
|
+
}, {
|
|
71
|
+
key: "backHandler",
|
|
72
|
+
value: function backHandler(m) {
|
|
73
|
+
return (0, _index.hasScreen)(m, 'login') ? _actions.cancelMFALogin : undefined;
|
|
74
|
+
}
|
|
75
|
+
}]);
|
|
81
76
|
return MFALoginScreen;
|
|
82
|
-
}(
|
|
83
|
-
|
|
77
|
+
}(_screen.default);
|
|
84
78
|
exports.default = MFALoginScreen;
|