auth0-lock 11.34.1 → 12.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.browserslistrc +1 -0
- package/.circleci/config.yml +4 -2
- package/.eslintrc.json +5 -5
- package/.github/workflows/codeql.yml +41 -0
- package/.shiprc +4 -5
- package/CHANGELOG.md +32 -0
- package/EXAMPLES.md +626 -0
- package/README.md +77 -649
- package/karma.conf.js +1 -1
- package/lib/CSSCore.js +1 -4
- package/lib/__tests__/auth_button.js +12 -22
- package/lib/__tests__/connection/database/actions.js +48 -49
- package/lib/__tests__/connection/database/index.js +22 -28
- package/lib/__tests__/connection/database/login_pane.js +20 -41
- package/lib/__tests__/connection/database/password_reset_confirmation.js +19 -26
- package/lib/__tests__/connection/database/reset_password.js +17 -39
- package/lib/__tests__/connection/database/signed_up_confirmation.js +19 -26
- package/lib/__tests__/connection/enterprise/actions.js +22 -47
- package/lib/__tests__/connection/enterprise/hrd_pane.js +16 -33
- package/lib/__tests__/connection/enterprise/hrd_screen.js +26 -40
- package/lib/__tests__/connection/enterprise/quick_auth_screen.js +27 -68
- package/lib/__tests__/connection/passwordless/ask_vcode.js +29 -51
- package/lib/__tests__/connection/passwordless/email_sent_confirmation.js +19 -26
- package/lib/__tests__/connection/passwordless/passwordless.js +35 -97
- package/lib/__tests__/core/actions.js +23 -46
- package/lib/__tests__/core/client/index.js +10 -13
- package/lib/__tests__/core/index.js +46 -94
- package/lib/__tests__/core/remote_data.js +14 -20
- package/lib/__tests__/core/signed_in_confirmation.js +19 -26
- package/lib/__tests__/core/sso/last_login_screen.js +27 -50
- package/lib/__tests__/core/tenant.js +10 -12
- package/lib/__tests__/core/web_api/helper.js +6 -14
- package/lib/__tests__/core/web_api/p2_api.js +38 -33
- package/lib/__tests__/core/web_api.js +37 -33
- package/lib/__tests__/engine/classic/login.js +20 -41
- package/lib/__tests__/engine/classic/mfa_login_screen.js +6 -19
- package/lib/__tests__/engine/classic/sign_up_pane.js +33 -55
- package/lib/__tests__/engine/classic/sign_up_screen.js +18 -45
- package/lib/__tests__/engine/classic.js +13 -6
- package/lib/__tests__/engine/passwordless.js +2 -5
- package/lib/__tests__/field/captcha/recaptcha_enterprise.js +27 -27
- package/lib/__tests__/field/captcha/recaptchav2.js +27 -27
- package/lib/__tests__/field/captcha.js +39 -51
- package/lib/__tests__/field/custom_input.js +23 -47
- package/lib/__tests__/field/email.js +2 -3
- package/lib/__tests__/field/email_pane.js +25 -48
- package/lib/__tests__/field/field.js +9 -13
- package/lib/__tests__/field/login_pane.js +30 -34
- package/lib/__tests__/field/mfa_code_pane.js +13 -28
- package/lib/__tests__/field/option_selection_pane.js +7 -25
- package/lib/__tests__/field/password.js +6 -12
- package/lib/__tests__/field/password_pane.js +29 -46
- package/lib/__tests__/field/phone_number_pane.js +18 -41
- package/lib/__tests__/field/social_buttons_pane.js +30 -47
- package/lib/__tests__/field/username.js +27 -48
- package/lib/__tests__/field/username_pane.js +30 -47
- package/lib/__tests__/field/vcode.js +5 -13
- package/lib/__tests__/field/vcode_pane.js +20 -44
- package/lib/__tests__/i18n.js +28 -53
- package/lib/__tests__/quick-auth/actions.js +4 -27
- package/lib/__tests__/setup-tests.js +7 -9
- package/lib/__tests__/testUtils.js +41 -58
- package/lib/__tests__/ui/box/chrome.js +24 -49
- package/lib/__tests__/ui/box/confirmation_pane.js +19 -36
- package/lib/__tests__/ui/box/container.js +21 -46
- package/lib/__tests__/ui/box/global_message.js +60 -37
- package/lib/__tests__/ui/input/email_input.js +6 -17
- package/lib/__tests__/ui/input/input_wrap.js +6 -19
- package/lib/__tests__/ui/input/password/password_strength.js +13 -15
- package/lib/__tests__/ui/input/password_input.js +22 -27
- package/lib/__tests__/utils/format.js +10 -17
- package/lib/__tests__/utils/url_utils.js +2 -5
- package/lib/avatar/gravatar_provider.js +13 -28
- package/lib/avatar.js +22 -41
- package/lib/browser.js +372 -23
- package/lib/connection/captcha.js +14 -32
- package/lib/connection/database/actions.js +39 -108
- package/lib/connection/database/index.js +90 -191
- package/lib/connection/database/login_pane.js +107 -147
- package/lib/connection/database/login_sign_up_tabs.js +106 -125
- package/lib/connection/database/mfa_pane.js +50 -69
- package/lib/connection/database/password_reset_confirmation.js +51 -73
- package/lib/connection/database/reset_password.js +116 -132
- package/lib/connection/database/reset_password_pane.js +45 -56
- package/lib/connection/database/sign_up_terms.js +17 -23
- package/lib/connection/database/signed_up_confirmation.js +52 -75
- package/lib/connection/enterprise/actions.js +23 -52
- package/lib/connection/enterprise/hrd_pane.js +60 -76
- package/lib/connection/enterprise/hrd_screen.js +60 -75
- package/lib/connection/enterprise/kerberos_screen.js +46 -60
- package/lib/connection/enterprise/quick_auth_screen.js +46 -64
- package/lib/connection/enterprise/single_sign_on_notice.js +14 -26
- package/lib/connection/enterprise.js +51 -84
- package/lib/connection/passwordless/actions.js +29 -62
- package/lib/connection/passwordless/ask_vcode.js +53 -60
- package/lib/connection/passwordless/email_sent_confirmation.js +129 -179
- package/lib/connection/passwordless/index.js +36 -68
- package/lib/connection/social/index.js +12 -15
- package/lib/core/actions.js +33 -85
- package/lib/core/client/index.js +38 -58
- package/lib/core/client/settings.js +12 -20
- package/lib/core/error_screen.js +38 -52
- package/lib/core/index.js +152 -301
- package/lib/core/loading_screen.js +61 -71
- package/lib/core/pane_separator.js +10 -10
- package/lib/core/remote_data.js +28 -48
- package/lib/core/screen.js +85 -79
- package/lib/core/signed_in_confirmation.js +51 -73
- package/lib/core/sso/data.js +9 -17
- package/lib/core/sso/index.js +5 -6
- package/lib/core/sso/last_login_screen.js +46 -63
- package/lib/core/tenant/index.js +37 -59
- package/lib/core/tenant/settings.js +11 -15
- package/lib/core/web_api/helper.js +24 -30
- package/lib/core/web_api/p2_api.js +156 -165
- package/lib/core/web_api.js +101 -90
- package/lib/core.js +126 -160
- package/lib/engine/classic/login.js +92 -144
- package/lib/engine/classic/mfa_login_screen.js +61 -67
- package/lib/engine/classic/sign_up_pane.js +89 -123
- package/lib/engine/classic/sign_up_screen.js +112 -158
- package/lib/engine/classic.js +122 -183
- package/lib/engine/passwordless/social_or_email_login_screen.js +71 -106
- package/lib/engine/passwordless/social_or_phone_number_login_screen.js +70 -100
- package/lib/engine/passwordless.js +75 -104
- package/lib/field/actions.js +11 -17
- package/lib/field/captcha/captcha_pane.js +82 -102
- package/lib/field/captcha/recaptcha.js +140 -145
- package/lib/field/captcha.js +7 -10
- package/lib/field/custom_input.js +37 -50
- package/lib/field/email/email_pane.js +90 -109
- package/lib/field/email.js +17 -35
- package/lib/field/index.js +51 -88
- package/lib/field/mfa-code/mfa_code_pane.js +57 -71
- package/lib/field/mfa_code.js +15 -21
- package/lib/field/option_selection_pane.js +16 -22
- package/lib/field/password/password_pane.js +79 -91
- package/lib/field/password.js +8 -14
- package/lib/field/phone-number/locations.js +7 -3
- package/lib/field/phone-number/phone_number_pane.js +87 -124
- package/lib/field/phone_number.js +16 -30
- package/lib/field/social/event.js +9 -12
- package/lib/field/social/social_buttons_pane.js +93 -121
- package/lib/field/username/username_pane.js +105 -123
- package/lib/field/username.js +16 -26
- package/lib/field/vcode/vcode_pane.js +67 -93
- package/lib/field/vcode.js +5 -5
- package/lib/i18n/af.js +7 -4
- package/lib/i18n/ar.js +7 -4
- package/lib/i18n/az.js +7 -4
- package/lib/i18n/bg.js +7 -4
- package/lib/i18n/ca.js +7 -4
- package/lib/i18n/cs.js +7 -4
- package/lib/i18n/da.js +7 -4
- package/lib/i18n/de.js +7 -3
- package/lib/i18n/el.js +7 -4
- package/lib/i18n/en.js +9 -4
- package/lib/i18n/es.js +7 -3
- package/lib/i18n/et.js +7 -4
- package/lib/i18n/fa.js +7 -4
- package/lib/i18n/fi.js +7 -4
- package/lib/i18n/fr.js +7 -4
- package/lib/i18n/he.js +7 -4
- package/lib/i18n/hr.js +7 -4
- package/lib/i18n/hu.js +7 -4
- package/lib/i18n/id.js +7 -4
- package/lib/i18n/it.js +7 -3
- package/lib/i18n/ja.js +7 -4
- package/lib/i18n/ko.js +7 -4
- package/lib/i18n/lt.js +7 -4
- package/lib/i18n/lv.js +7 -4
- package/lib/i18n/ms.js +7 -4
- package/lib/i18n/nb.js +7 -4
- package/lib/i18n/nl.js +7 -4
- package/lib/i18n/nn.js +7 -4
- package/lib/i18n/no.js +7 -4
- package/lib/i18n/pl.js +7 -4
- package/lib/i18n/pt-br.js +7 -3
- package/lib/i18n/pt.js +7 -4
- package/lib/i18n/ro.js +7 -4
- package/lib/i18n/ru.js +7 -4
- package/lib/i18n/sk.js +7 -4
- package/lib/i18n/sl.js +7 -4
- package/lib/i18n/sr.js +7 -4
- package/lib/i18n/sv.js +7 -4
- package/lib/i18n/tr.js +7 -4
- package/lib/i18n/ua.js +7 -4
- package/lib/i18n/uk.js +7 -4
- package/lib/i18n/vi.js +7 -4
- package/lib/i18n/zh-tw.js +7 -4
- package/lib/i18n/zh.js +7 -4
- package/lib/i18n.js +38 -75
- package/lib/index.js +14 -17
- package/lib/lock.js +29 -32
- package/lib/passwordless.js +29 -31
- package/lib/quick-auth/actions.js +19 -26
- package/lib/quick_auth.js +8 -10
- package/lib/sanitizer.js +5 -5
- package/lib/store/index.js +22 -42
- package/lib/sync.js +21 -42
- package/lib/ui/box/button.js +85 -105
- package/lib/ui/box/chrome.js +463 -548
- package/lib/ui/box/confirmation_pane.js +34 -48
- package/lib/ui/box/container.js +305 -339
- package/lib/ui/box/global_message.js +51 -60
- package/lib/ui/box/header.js +155 -177
- package/lib/ui/box/multisize_slide.js +233 -229
- package/lib/ui/box/success_pane.js +34 -37
- package/lib/ui/box.js +88 -93
- package/lib/ui/button/auth_button.js +44 -51
- package/lib/ui/input/captcha_input.js +162 -181
- package/lib/ui/input/checkbox_input.js +57 -59
- package/lib/ui/input/email_input.js +117 -124
- package/lib/ui/input/input_wrap.js +65 -80
- package/lib/ui/input/location_input.js +130 -150
- package/lib/ui/input/mfa_code_input.js +98 -98
- package/lib/ui/input/password/password_strength.js +103 -127
- package/lib/ui/input/password_input.js +141 -147
- package/lib/ui/input/phone_number_input.js +101 -109
- package/lib/ui/input/select_input.js +120 -132
- package/lib/ui/input/text_input.js +89 -84
- package/lib/ui/input/username_input.js +109 -115
- package/lib/ui/input/vcode_input.js +110 -118
- package/lib/ui/list.js +224 -247
- package/lib/ui/pane/quick_auth_pane.js +55 -80
- package/lib/utils/atom.js +55 -48
- package/lib/utils/cache.js +54 -43
- package/lib/utils/cdn_utils.js +17 -31
- package/lib/utils/createRef.js +3 -1
- package/lib/utils/data_utils.js +10 -16
- package/lib/utils/fn_utils.js +5 -4
- package/lib/utils/format.js +6 -8
- package/lib/utils/id_utils.js +4 -3
- package/lib/utils/jsonp_utils.js +20 -17
- package/lib/utils/media_utils.js +4 -2
- package/lib/utils/preload_utils.js +4 -3
- package/lib/utils/string_utils.js +4 -4
- package/lib/utils/url_utils.js +4 -3
- package/opslevel.yml +6 -0
- package/package.json +53 -38
- package/webpack.config.js +36 -3
|
@@ -1,214 +1,164 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
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;
|
|
4
8
|
exports.renderEmailSentConfirmation = renderEmailSentConfirmation;
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
var _index = require('../../core/index');
|
|
17
|
-
|
|
18
|
-
var l = _interopRequireWildcard(_index);
|
|
19
|
-
|
|
20
|
-
var _index2 = require('../../field/index');
|
|
21
|
-
|
|
22
|
-
var c = _interopRequireWildcard(_index2);
|
|
23
|
-
|
|
24
|
-
var _actions2 = require('./actions');
|
|
25
|
-
|
|
26
|
-
var _index3 = require('./index');
|
|
27
|
-
|
|
28
|
-
var m = _interopRequireWildcard(_index3);
|
|
29
|
-
|
|
30
|
-
var _i18n = require('../../i18n');
|
|
31
|
-
|
|
32
|
-
var i18n = _interopRequireWildcard(_i18n);
|
|
33
|
-
|
|
34
|
-
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; } }
|
|
35
|
-
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _success_pane = _interopRequireDefault(require("../../ui/box/success_pane"));
|
|
11
|
+
var _actions = require("../../core/actions");
|
|
12
|
+
var l = _interopRequireWildcard(require("../../core/index"));
|
|
13
|
+
var c = _interopRequireWildcard(require("../../field/index"));
|
|
14
|
+
var _actions2 = require("./actions");
|
|
15
|
+
var m = _interopRequireWildcard(require("./index"));
|
|
16
|
+
var i18n = _interopRequireWildcard(require("../../i18n"));
|
|
17
|
+
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); }
|
|
18
|
+
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; }
|
|
36
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
|
-
|
|
20
|
+
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; }
|
|
38
21
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
39
|
-
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
function
|
|
43
|
-
|
|
22
|
+
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); } }
|
|
23
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
24
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
25
|
+
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); }
|
|
26
|
+
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); }
|
|
27
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
28
|
+
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); }; }
|
|
29
|
+
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); }
|
|
30
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
31
|
+
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; } }
|
|
32
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
44
33
|
// TODO: can't we get this from pops?
|
|
45
34
|
|
|
46
|
-
var RetrySvgIcon =
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
style: { enableBackground: 'new 0 0 32 32' },
|
|
52
|
-
version: '1.1',
|
|
53
|
-
viewBox: '0 0 32 32',
|
|
54
|
-
width: '32px',
|
|
55
|
-
xmlSpace: 'preserve',
|
|
56
|
-
xmlns: 'http://www.w3.org/2000/svg',
|
|
57
|
-
xmlnsXlink: 'http://www.w3.org/1999/xlink'
|
|
35
|
+
var RetrySvgIcon = /*#__PURE__*/_react.default.createElement("svg", {
|
|
36
|
+
focusable: "false",
|
|
37
|
+
height: "32px",
|
|
38
|
+
style: {
|
|
39
|
+
enableBackground: 'new 0 0 32 32'
|
|
58
40
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
41
|
+
version: "1.1",
|
|
42
|
+
viewBox: "0 0 32 32",
|
|
43
|
+
width: "32px",
|
|
44
|
+
xmlSpace: "preserve",
|
|
45
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
46
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
47
|
+
}, ' ', /*#__PURE__*/_react.default.createElement("path", {
|
|
48
|
+
d: "M27.877,19.662c0.385-1.23,0.607-2.531,0.607-3.884c0-7.222-5.83-13.101-13.029-13.194v4.238 c4.863,0.093,8.793,4.071,8.793,8.956c0,0.678-0.088,1.332-0.232,1.966l-3.963-1.966l2.76,8.199l8.197-2.762L27.877,19.662z"
|
|
49
|
+
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
50
|
+
d: "M7.752,16.222c0-0.678,0.088-1.332,0.232-1.967l3.963,1.967l-2.76-8.199L0.99,10.785l3.133,1.553 c-0.384,1.23-0.607,2.531-0.607,3.885c0,7.223,5.83,13.1,13.03,13.194v-4.238C11.682,25.086,7.752,21.107,7.752,16.222z"
|
|
51
|
+
}));
|
|
52
|
+
var ResendLink = /*#__PURE__*/function (_React$Component) {
|
|
65
53
|
_inherits(ResendLink, _React$Component);
|
|
66
|
-
|
|
54
|
+
var _super = _createSuper(ResendLink);
|
|
67
55
|
function ResendLink() {
|
|
68
56
|
_classCallCheck(this, ResendLink);
|
|
69
|
-
|
|
70
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
57
|
+
return _super.apply(this, arguments);
|
|
71
58
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
null,
|
|
86
|
-
RetrySvgIcon
|
|
87
|
-
)
|
|
88
|
-
);
|
|
89
|
-
};
|
|
90
|
-
|
|
59
|
+
_createClass(ResendLink, [{
|
|
60
|
+
key: "render",
|
|
61
|
+
value: function render() {
|
|
62
|
+
var _this$props = this.props,
|
|
63
|
+
label = _this$props.label,
|
|
64
|
+
onClick = _this$props.onClick;
|
|
65
|
+
return /*#__PURE__*/_react.default.createElement("a", {
|
|
66
|
+
className: "auth0-lock-resend-link",
|
|
67
|
+
href: "#",
|
|
68
|
+
onClick: onClick
|
|
69
|
+
}, label, " ", /*#__PURE__*/_react.default.createElement("span", null, RetrySvgIcon));
|
|
70
|
+
}
|
|
71
|
+
}]);
|
|
91
72
|
return ResendLink;
|
|
92
|
-
}(
|
|
93
|
-
|
|
94
|
-
var Resend = function (_React$Component2) {
|
|
73
|
+
}(_react.default.Component);
|
|
74
|
+
var Resend = /*#__PURE__*/function (_React$Component2) {
|
|
95
75
|
_inherits(Resend, _React$Component2);
|
|
96
|
-
|
|
76
|
+
var _super2 = _createSuper(Resend);
|
|
97
77
|
function Resend() {
|
|
98
|
-
var
|
|
99
|
-
|
|
78
|
+
var _this;
|
|
100
79
|
_classCallCheck(this, Resend);
|
|
101
|
-
|
|
102
|
-
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
80
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
103
81
|
args[_key] = arguments[_key];
|
|
104
82
|
}
|
|
105
|
-
|
|
106
|
-
|
|
83
|
+
_this = _super2.call.apply(_super2, [this].concat(args));
|
|
84
|
+
_defineProperty(_assertThisInitialized(_this), "handleClick", function (e) {
|
|
107
85
|
e.preventDefault();
|
|
108
|
-
(0, _actions2.resendEmail)(l.id(
|
|
109
|
-
}, _temp), _possibleConstructorReturn(_this2, _ret);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
Resend.prototype.render = function render() {
|
|
113
|
-
var _props2 = this.props,
|
|
114
|
-
labels = _props2.labels,
|
|
115
|
-
lock = _props2.lock;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
var resendLink = m.resendAvailable(lock) && _react2.default.createElement(ResendLink, {
|
|
119
|
-
onClick: this.handleClick,
|
|
120
|
-
label: m.resendFailed(lock) ? labels.retry : labels.resend
|
|
86
|
+
(0, _actions2.resendEmail)(l.id(_this.props.lock));
|
|
121
87
|
});
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
null,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
resendSuccessLabel,
|
|
147
|
-
resendFailedLabel
|
|
148
|
-
);
|
|
149
|
-
};
|
|
150
|
-
|
|
88
|
+
return _this;
|
|
89
|
+
}
|
|
90
|
+
_createClass(Resend, [{
|
|
91
|
+
key: "render",
|
|
92
|
+
value: function render() {
|
|
93
|
+
var _this$props2 = this.props,
|
|
94
|
+
labels = _this$props2.labels,
|
|
95
|
+
lock = _this$props2.lock;
|
|
96
|
+
var resendLink = m.resendAvailable(lock) && /*#__PURE__*/_react.default.createElement(ResendLink, {
|
|
97
|
+
onClick: this.handleClick,
|
|
98
|
+
label: m.resendFailed(lock) ? labels.retry : labels.resend
|
|
99
|
+
});
|
|
100
|
+
var resendingLabel = m.resendOngoing(lock) && /*#__PURE__*/_react.default.createElement("a", {
|
|
101
|
+
className: "auth0-lock-resend-link"
|
|
102
|
+
}, labels.resending);
|
|
103
|
+
var resendSuccessLabel = m.resendSuccess(lock) && /*#__PURE__*/_react.default.createElement("span", {
|
|
104
|
+
className: "auth0-lock-sent-label"
|
|
105
|
+
}, labels.sent);
|
|
106
|
+
var resendFailedLabel = m.resendFailed(lock) && /*#__PURE__*/_react.default.createElement("span", {
|
|
107
|
+
className: "auth0-lock-sent-failed-label"
|
|
108
|
+
}, labels.failed);
|
|
109
|
+
return /*#__PURE__*/_react.default.createElement("span", null, resendLink, resendingLabel, resendSuccessLabel, resendFailedLabel);
|
|
110
|
+
}
|
|
111
|
+
}]);
|
|
151
112
|
return Resend;
|
|
152
|
-
}(
|
|
153
|
-
|
|
154
|
-
var EmailSentConfirmation = function (_React$Component3) {
|
|
113
|
+
}(_react.default.Component);
|
|
114
|
+
var EmailSentConfirmation = /*#__PURE__*/function (_React$Component3) {
|
|
155
115
|
_inherits(EmailSentConfirmation, _React$Component3);
|
|
156
|
-
|
|
116
|
+
var _super3 = _createSuper(EmailSentConfirmation);
|
|
157
117
|
function EmailSentConfirmation() {
|
|
158
118
|
_classCallCheck(this, EmailSentConfirmation);
|
|
159
|
-
|
|
160
|
-
return _possibleConstructorReturn(this, _React$Component3.apply(this, arguments));
|
|
119
|
+
return _super3.apply(this, arguments);
|
|
161
120
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
return _react2.default.createElement(
|
|
178
|
-
_success_pane2.default,
|
|
179
|
-
{
|
|
121
|
+
_createClass(EmailSentConfirmation, [{
|
|
122
|
+
key: "render",
|
|
123
|
+
value: function render() {
|
|
124
|
+
var _this2 = this;
|
|
125
|
+
var lock = this.props.lock;
|
|
126
|
+
var closeHandler = l.ui.closable(lock) ? this.handleClose.bind(this) : undefined;
|
|
127
|
+
var labels = {
|
|
128
|
+
failed: i18n.str(lock, 'failedLabel'),
|
|
129
|
+
resend: i18n.str(lock, 'resendLabel'),
|
|
130
|
+
resending: i18n.str(lock, 'resendingLabel'),
|
|
131
|
+
retry: i18n.str(lock, 'retryLabel'),
|
|
132
|
+
sent: i18n.str(lock, 'sentLabel')
|
|
133
|
+
};
|
|
134
|
+
return /*#__PURE__*/_react.default.createElement(_success_pane.default, {
|
|
180
135
|
lock: lock,
|
|
181
136
|
backHandler: function backHandler() {
|
|
182
|
-
return
|
|
137
|
+
return _this2.handleBack();
|
|
183
138
|
},
|
|
184
139
|
closeHandler: closeHandler
|
|
185
|
-
},
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
)
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
};
|
|
202
|
-
|
|
140
|
+
}, /*#__PURE__*/_react.default.createElement("p", null, i18n.html(lock, ['success', 'magicLink'], c.email(lock))), /*#__PURE__*/_react.default.createElement(Resend, {
|
|
141
|
+
labels: labels,
|
|
142
|
+
lock: lock
|
|
143
|
+
}));
|
|
144
|
+
}
|
|
145
|
+
}, {
|
|
146
|
+
key: "handleBack",
|
|
147
|
+
value: function handleBack() {
|
|
148
|
+
(0, _actions2.restart)(l.id(this.props.lock));
|
|
149
|
+
}
|
|
150
|
+
}, {
|
|
151
|
+
key: "handleClose",
|
|
152
|
+
value: function handleClose() {
|
|
153
|
+
(0, _actions.closeLock)(l.id(this.props.lock));
|
|
154
|
+
}
|
|
155
|
+
}]);
|
|
203
156
|
return EmailSentConfirmation;
|
|
204
|
-
}(
|
|
205
|
-
|
|
157
|
+
}(_react.default.Component);
|
|
206
158
|
exports.default = EmailSentConfirmation;
|
|
207
159
|
function renderEmailSentConfirmation(lock) {
|
|
208
160
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
209
|
-
|
|
210
161
|
props.key = 'auxiliarypane';
|
|
211
162
|
props.lock = lock;
|
|
212
|
-
|
|
213
|
-
return m.passwordlessStarted(lock) ? _react2.default.createElement(EmailSentConfirmation, props) : null;
|
|
163
|
+
return m.passwordlessStarted(lock) ? /*#__PURE__*/_react.default.createElement(EmailSentConfirmation, props) : null;
|
|
214
164
|
}
|
|
@@ -1,73 +1,61 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
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
|
+
});
|
|
4
7
|
exports.initPasswordless = initPasswordless;
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
8
|
+
exports.isEmail = isEmail;
|
|
9
|
+
exports.isSendLink = isSendLink;
|
|
10
|
+
exports.mustAcceptTerms = mustAcceptTerms;
|
|
11
|
+
exports.passwordlessConnection = passwordlessConnection;
|
|
12
|
+
exports.passwordlessStarted = passwordlessStarted;
|
|
10
13
|
exports.resend = resend;
|
|
11
14
|
exports.resendAvailable = resendAvailable;
|
|
15
|
+
exports.resendFailed = resendFailed;
|
|
16
|
+
exports.resendOngoing = resendOngoing;
|
|
17
|
+
exports.resendSuccess = resendSuccess;
|
|
12
18
|
exports.restartPasswordless = restartPasswordless;
|
|
13
19
|
exports.send = send;
|
|
14
|
-
exports.isSendLink = isSendLink;
|
|
15
20
|
exports.setPasswordlessStarted = setPasswordlessStarted;
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.isEmail = isEmail;
|
|
21
|
+
exports.setResendFailed = setResendFailed;
|
|
22
|
+
exports.setResendSuccess = setResendSuccess;
|
|
19
23
|
exports.showTerms = showTerms;
|
|
20
|
-
exports.mustAcceptTerms = mustAcceptTerms;
|
|
21
24
|
exports.termsAccepted = termsAccepted;
|
|
22
25
|
exports.toggleTermsAcceptance = toggleTermsAcceptance;
|
|
23
|
-
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
var l = _interopRequireWildcard(_index);
|
|
31
|
-
|
|
32
|
-
var _index2 = require('../../field/index');
|
|
33
|
-
|
|
34
|
-
var _phone_number = require('../../field/phone_number');
|
|
35
|
-
|
|
36
|
-
var _data_utils = require('../../utils/data_utils');
|
|
37
|
-
|
|
38
|
-
var _web_api = require('../../core/web_api');
|
|
39
|
-
|
|
40
|
-
var _web_api2 = _interopRequireDefault(_web_api);
|
|
41
|
-
|
|
42
|
-
var _sync = require('../../sync');
|
|
43
|
-
|
|
44
|
-
var _sync2 = _interopRequireDefault(_sync);
|
|
45
|
-
|
|
46
|
-
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; } }
|
|
47
|
-
|
|
26
|
+
var _immutable = _interopRequireWildcard(require("immutable"));
|
|
27
|
+
var l = _interopRequireWildcard(require("../../core/index"));
|
|
28
|
+
var _index2 = require("../../field/index");
|
|
29
|
+
var _phone_number = require("../../field/phone_number");
|
|
30
|
+
var _data_utils = require("../../utils/data_utils");
|
|
31
|
+
var _web_api = _interopRequireDefault(require("../../core/web_api"));
|
|
32
|
+
var _sync = _interopRequireDefault(require("../../sync"));
|
|
48
33
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
49
|
-
|
|
34
|
+
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); }
|
|
35
|
+
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; }
|
|
50
36
|
var _dataFns = (0, _data_utils.dataFns)(['passwordless']),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
37
|
+
get = _dataFns.get,
|
|
38
|
+
initNS = _dataFns.initNS,
|
|
39
|
+
tget = _dataFns.tget,
|
|
40
|
+
tremove = _dataFns.tremove,
|
|
41
|
+
tset = _dataFns.tset;
|
|
57
42
|
function initPasswordless(m, opts) {
|
|
58
43
|
// TODO: validate opts
|
|
59
44
|
var send = opts.passwordlessMethod === 'link' ? 'link' : 'code';
|
|
60
45
|
var mustAcceptTerms = !!opts.mustAcceptTerms;
|
|
61
46
|
var showTerms = opts.showTerms === undefined ? true : !!opts.showTerms;
|
|
62
|
-
|
|
63
|
-
|
|
47
|
+
m = initNS(m, (0, _immutable.Map)({
|
|
48
|
+
send: send,
|
|
49
|
+
mustAcceptTerms: mustAcceptTerms,
|
|
50
|
+
showTerms: showTerms
|
|
51
|
+
}));
|
|
64
52
|
if (opts.defaultLocation && typeof opts.defaultLocation === 'string') {
|
|
65
53
|
m = (0, _phone_number.initLocation)(m, opts.defaultLocation.toUpperCase());
|
|
66
54
|
} else {
|
|
67
|
-
m = (0,
|
|
55
|
+
m = (0, _sync.default)(m, 'location', {
|
|
68
56
|
recoverResult: 'US',
|
|
69
57
|
syncFn: function syncFn(m, cb) {
|
|
70
|
-
return
|
|
58
|
+
return _web_api.default.getUserCountry(l.id(m), cb);
|
|
71
59
|
},
|
|
72
60
|
successFn: function successFn(m, result) {
|
|
73
61
|
return (0, _phone_number.initLocation)(m, result);
|
|
@@ -76,32 +64,25 @@ function initPasswordless(m, opts) {
|
|
|
76
64
|
}
|
|
77
65
|
return m;
|
|
78
66
|
}
|
|
79
|
-
|
|
80
67
|
function setResendStatus(m, value) {
|
|
81
68
|
// TODO: check value
|
|
82
69
|
return tset(m, 'resendStatus', value);
|
|
83
70
|
}
|
|
84
|
-
|
|
85
71
|
function setResendSuccess(m) {
|
|
86
72
|
return setResendStatus(m, 'success');
|
|
87
73
|
}
|
|
88
|
-
|
|
89
74
|
function resendSuccess(m) {
|
|
90
75
|
return resendStatus(m) == 'success';
|
|
91
76
|
}
|
|
92
|
-
|
|
93
77
|
function setResendFailed(m) {
|
|
94
78
|
return setResendStatus(m, 'failed');
|
|
95
79
|
}
|
|
96
|
-
|
|
97
80
|
function resendFailed(m) {
|
|
98
81
|
return resendStatus(m) == 'failed';
|
|
99
82
|
}
|
|
100
|
-
|
|
101
83
|
function resendOngoing(m) {
|
|
102
84
|
return resendStatus(m) == 'ongoing';
|
|
103
85
|
}
|
|
104
|
-
|
|
105
86
|
function resend(m) {
|
|
106
87
|
if (resendAvailable(m)) {
|
|
107
88
|
return setResendStatus(m, 'ongoing');
|
|
@@ -109,15 +90,12 @@ function resend(m) {
|
|
|
109
90
|
return m;
|
|
110
91
|
}
|
|
111
92
|
}
|
|
112
|
-
|
|
113
93
|
function resendStatus(m) {
|
|
114
94
|
return tget(m, 'resendStatus', 'waiting');
|
|
115
95
|
}
|
|
116
|
-
|
|
117
96
|
function resendAvailable(m) {
|
|
118
97
|
return resendStatus(m) == 'waiting' || resendStatus(m) == 'failed';
|
|
119
98
|
}
|
|
120
|
-
|
|
121
99
|
function restartPasswordless(m) {
|
|
122
100
|
// TODO: maybe we can take advantage of the transient fields
|
|
123
101
|
m = tremove(m, 'passwordlessStarted');
|
|
@@ -126,44 +104,34 @@ function restartPasswordless(m) {
|
|
|
126
104
|
|
|
127
105
|
return l.clearGlobalError(m);
|
|
128
106
|
}
|
|
129
|
-
|
|
130
107
|
function send(m) {
|
|
131
108
|
return get(m, 'send', isEmail(m) ? 'link' : 'code');
|
|
132
109
|
}
|
|
133
|
-
|
|
134
110
|
function isSendLink(m) {
|
|
135
111
|
return send(m) === 'link';
|
|
136
112
|
}
|
|
137
|
-
|
|
138
113
|
function setPasswordlessStarted(m, value) {
|
|
139
114
|
return tset(m, 'passwordlessStarted', value);
|
|
140
115
|
}
|
|
141
|
-
|
|
142
116
|
function passwordlessStarted(m) {
|
|
143
117
|
return tget(m, 'passwordlessStarted', false);
|
|
144
118
|
}
|
|
145
|
-
|
|
146
119
|
function passwordlessConnection(m) {
|
|
147
120
|
return l.connections(m, 'passwordless', 'email').get(0) || l.connections(m, 'passwordless', 'sms').get(0) || new _immutable.Map();
|
|
148
121
|
}
|
|
149
|
-
|
|
150
122
|
function isEmail(m) {
|
|
151
123
|
var c = passwordlessConnection(m);
|
|
152
124
|
return c.isEmpty() ? undefined : c.get('strategy') === 'email';
|
|
153
125
|
}
|
|
154
|
-
|
|
155
126
|
function showTerms(m) {
|
|
156
127
|
return get(m, 'showTerms', true);
|
|
157
128
|
}
|
|
158
|
-
|
|
159
129
|
function mustAcceptTerms(m) {
|
|
160
130
|
return get(m, 'mustAcceptTerms', false);
|
|
161
131
|
}
|
|
162
|
-
|
|
163
132
|
function termsAccepted(m) {
|
|
164
133
|
return !mustAcceptTerms(m) || tget(m, 'termsAccepted', false);
|
|
165
134
|
}
|
|
166
|
-
|
|
167
135
|
function toggleTermsAcceptance(m) {
|
|
168
136
|
return tset(m, 'termsAccepted', !termsAccepted(m));
|
|
169
137
|
}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
exports
|
|
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.STRATEGIES = void 0;
|
|
8
|
+
exports.authButtonsTheme = authButtonsTheme;
|
|
5
9
|
exports.displayName = displayName;
|
|
6
10
|
exports.socialConnections = socialConnections;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
var l = _interopRequireWildcard(_index);
|
|
12
|
-
|
|
13
|
-
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; } }
|
|
14
|
-
|
|
11
|
+
var l = _interopRequireWildcard(require("../../core/index"));
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
15
14
|
// TODO: Android version also has "unknonwn-social", "evernote" and
|
|
16
15
|
// "evernote-sandbox""evernote" in the list, considers "google-openid"
|
|
17
16
|
// to be enterprise and doesn't contain "salesforce-community". See
|
|
18
17
|
// https://github.com/auth0/Lock.Android/blob/98262cb7110e5d1c8a97e1129faf2621c1d8d111/lock/src/main/java/com/auth0/android/lock/utils/Strategies.java
|
|
19
|
-
var STRATEGIES =
|
|
18
|
+
var STRATEGIES = {
|
|
20
19
|
apple: 'Apple',
|
|
21
20
|
amazon: 'Amazon',
|
|
22
21
|
aol: 'Aol',
|
|
@@ -59,18 +58,16 @@ var STRATEGIES = exports.STRATEGIES = {
|
|
|
59
58
|
weibo: '新浪微博',
|
|
60
59
|
line: 'Line'
|
|
61
60
|
};
|
|
62
|
-
|
|
61
|
+
exports.STRATEGIES = STRATEGIES;
|
|
63
62
|
function displayName(connection) {
|
|
64
63
|
if (['oauth1', 'oauth2'].indexOf(connection.get('strategy')) !== -1) {
|
|
65
64
|
return connection.get('name');
|
|
66
65
|
}
|
|
67
66
|
return STRATEGIES[connection.get('strategy')];
|
|
68
67
|
}
|
|
69
|
-
|
|
70
68
|
function socialConnections(m) {
|
|
71
69
|
return l.connections(m, 'social');
|
|
72
70
|
}
|
|
73
|
-
|
|
74
71
|
function authButtonsTheme(m) {
|
|
75
72
|
return l.ui.authButtonsTheme(m);
|
|
76
73
|
}
|