auth0-lock 12.0.0-beta.0 → 12.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -1
- package/DEVELOPMENT.md +1 -1
- package/EXAMPLES.md +27 -2
- package/Makefile +2 -2
- package/README.md +9 -8
- package/lib/__tests__/connection/database/login_pane.js +7 -9
- package/lib/__tests__/connection/database/password_reset_confirmation.js +9 -11
- package/lib/__tests__/connection/database/signed_up_confirmation.js +9 -11
- package/lib/__tests__/connection/enterprise/quick_auth_screen.js +8 -10
- package/lib/__tests__/connection/passwordless/email_sent_confirmation.js +9 -11
- package/lib/__tests__/connection/passwordless/passwordless.js +4 -2
- package/lib/__tests__/core/remote_data.js +2 -2
- package/lib/__tests__/core/signed_in_confirmation.js +9 -11
- package/lib/__tests__/engine/passwordless/social_or_email_login_screen.js +105 -0
- package/lib/__tests__/engine/passwordless/social_or_phone_number_login_screen.js +105 -0
- package/lib/__tests__/ui/box/confirmation_pane.js +7 -9
- package/lib/connection/captcha.js +20 -6
- package/lib/connection/database/actions.js +5 -5
- package/lib/connection/database/login_pane.js +1 -1
- package/lib/connection/enterprise/actions.js +2 -2
- package/lib/connection/enterprise/hrd_pane.js +1 -1
- package/lib/connection/enterprise.js +1 -1
- package/lib/connection/passwordless/actions.js +29 -10
- package/lib/connection/social/index.js +1 -1
- package/lib/core/client/index.js +1 -1
- package/lib/core/index.js +10 -6
- package/lib/core/remote_data.js +8 -0
- package/lib/core/tenant/index.js +1 -1
- package/lib/core/web_api/helper.js +1 -1
- package/lib/core/web_api/p2_api.js +6 -0
- package/lib/core/web_api.js +5 -0
- package/lib/core.js +1 -1
- package/lib/engine/classic/sign_up_pane.js +1 -1
- package/lib/engine/passwordless/social_or_email_login_screen.js +11 -1
- package/lib/engine/passwordless/social_or_phone_number_login_screen.js +11 -1
- package/lib/field/captcha/captcha_pane.js +6 -5
- package/lib/i18n/af.js +3 -1
- package/lib/i18n/ar.js +3 -1
- package/lib/i18n/az.js +3 -1
- package/lib/i18n/bg.js +3 -1
- package/lib/i18n/ca.js +3 -1
- package/lib/i18n/cs.js +3 -1
- package/lib/i18n/da.js +3 -1
- package/lib/i18n/de.js +3 -1
- package/lib/i18n/el.js +3 -1
- package/lib/i18n/en.js +3 -1
- package/lib/i18n/es.js +3 -1
- package/lib/i18n/et.js +3 -1
- package/lib/i18n/fa.js +3 -1
- package/lib/i18n/fi.js +3 -1
- package/lib/i18n/fr.js +3 -1
- package/lib/i18n/he.js +3 -1
- package/lib/i18n/hr.js +3 -1
- package/lib/i18n/hu.js +3 -1
- package/lib/i18n/id.js +3 -1
- package/lib/i18n/it.js +3 -1
- package/lib/i18n/ja.js +3 -1
- package/lib/i18n/ko.js +3 -1
- package/lib/i18n/lt.js +3 -1
- package/lib/i18n/lv.js +3 -1
- package/lib/i18n/ms.js +3 -1
- package/lib/i18n/nb.js +3 -1
- package/lib/i18n/nl.js +3 -1
- package/lib/i18n/nn.js +3 -1
- package/lib/i18n/no.js +3 -1
- package/lib/i18n/pl.js +3 -1
- package/lib/i18n/pt-br.js +3 -1
- package/lib/i18n/pt.js +3 -1
- package/lib/i18n/ro.js +3 -1
- package/lib/i18n/ru.js +3 -1
- package/lib/i18n/sk.js +3 -1
- package/lib/i18n/sl.js +3 -1
- package/lib/i18n/sr.js +3 -1
- package/lib/i18n/sv.js +3 -1
- package/lib/i18n/tr.js +3 -1
- package/lib/i18n/ua.js +3 -1
- package/lib/i18n/uk.js +3 -1
- package/lib/i18n/vi.js +3 -1
- package/lib/i18n/zh-tw.js +3 -1
- package/lib/i18n/zh.js +3 -1
- package/lib/i18n.js +1 -1
- package/lib/lock.js +1 -1
- package/lib/passwordless.js +1 -1
- package/lib/ui/input/password/password_strength.js +1 -1
- package/lib/utils/cache.js +1 -1
- package/package.json +2 -2
|
@@ -50,7 +50,7 @@ function logIn(id) {
|
|
|
50
50
|
if (ssoConnection && !(0, _enterprise.isHRDActive)(m)) {
|
|
51
51
|
return logInSSO(id, ssoConnection, params);
|
|
52
52
|
}
|
|
53
|
-
var isCaptchaValid = (0, _captcha.setCaptchaParams)(m, params, fields);
|
|
53
|
+
var isCaptchaValid = (0, _captcha.setCaptchaParams)(m, params, false, fields);
|
|
54
54
|
if (!isCaptchaValid && !ssoConnection) {
|
|
55
55
|
return (0, _captcha.showMissingCaptcha)(m, id);
|
|
56
56
|
}
|
|
@@ -69,7 +69,7 @@ function logInActiveFlow(id, params) {
|
|
|
69
69
|
login_hint: username
|
|
70
70
|
}), function (id, error, fields, next) {
|
|
71
71
|
var wasCaptchaInvalid = error && error.code === 'invalid captcha';
|
|
72
|
-
(0, _captcha.swapCaptcha)(id, wasCaptchaInvalid, next);
|
|
72
|
+
(0, _captcha.swapCaptcha)(id, false, wasCaptchaInvalid, next);
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
75
|
function logInSSO(id, connection, params) {
|
|
@@ -47,7 +47,7 @@ var HRDPane = /*#__PURE__*/function (_React$Component) {
|
|
|
47
47
|
i18n: i18n,
|
|
48
48
|
lock: model,
|
|
49
49
|
onReload: function onReload() {
|
|
50
|
-
return (0, _captcha.swapCaptcha)(l.id(model), false);
|
|
50
|
+
return (0, _captcha.swapCaptcha)(l.id(model), false, false);
|
|
51
51
|
}
|
|
52
52
|
}) : null;
|
|
53
53
|
return /*#__PURE__*/_react.default.createElement("div", null, header, /*#__PURE__*/_react.default.createElement(_username_pane.default, {
|
|
@@ -38,7 +38,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
|
|
|
38
38
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
39
39
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
40
40
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
41
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
41
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
42
42
|
var _dataFns = (0, _data_utils.dataFns)(['enterprise']),
|
|
43
43
|
get = _dataFns.get,
|
|
44
44
|
initNS = _dataFns.initNS,
|
|
@@ -11,7 +11,6 @@ exports.resendEmail = resendEmail;
|
|
|
11
11
|
exports.restart = restart;
|
|
12
12
|
exports.sendSMS = sendSMS;
|
|
13
13
|
exports.toggleTermsAcceptance = toggleTermsAcceptance;
|
|
14
|
-
var _immutable = require("immutable");
|
|
15
14
|
var _index = require("../../store/index");
|
|
16
15
|
var _actions = require("../../core/actions");
|
|
17
16
|
var _web_api = _interopRequireDefault(require("../../core/web_api"));
|
|
@@ -20,6 +19,7 @@ var l = _interopRequireWildcard(require("../../core/index"));
|
|
|
20
19
|
var _index4 = require("./index");
|
|
21
20
|
var _phone_number = require("../../field/phone_number");
|
|
22
21
|
var i18n = _interopRequireWildcard(require("../../i18n"));
|
|
22
|
+
var _captcha = require("../captcha");
|
|
23
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
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; }
|
|
25
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -29,16 +29,24 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
29
29
|
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; }
|
|
30
30
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
31
31
|
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); }
|
|
32
|
-
function getErrorMessage(m, error) {
|
|
32
|
+
function getErrorMessage(m, id, error) {
|
|
33
33
|
var key = error.error;
|
|
34
34
|
if (error.error === 'sms_provider_error' && (error.description || '').indexOf('(Code: 21211)') > -1) {
|
|
35
35
|
key = 'bad.phone_number';
|
|
36
36
|
}
|
|
37
|
+
if (error.code === 'invalid_captcha') {
|
|
38
|
+
var captchaConfig = l.passwordlessCaptcha(m);
|
|
39
|
+
key = captchaConfig.get('provider') === 'recaptcha_v2' || captchaConfig.get('provider') === 'recaptcha_enterprise' ? 'invalid_recaptcha' : 'invalid_captcha';
|
|
40
|
+
}
|
|
37
41
|
return i18n.html(m, ['error', 'passwordless', key]) || i18n.html(m, ['error', 'passwordless', 'lock.fallback']);
|
|
38
42
|
}
|
|
43
|
+
function swapCaptchaAfterError(id, error) {
|
|
44
|
+
var wasCaptchaInvalid = error && error.code === 'invalid_captcha';
|
|
45
|
+
(0, _captcha.swapCaptcha)(id, true, wasCaptchaInvalid);
|
|
46
|
+
}
|
|
39
47
|
function requestPasswordlessEmail(id) {
|
|
40
48
|
(0, _actions.validateAndSubmit)(id, ['email'], function (m) {
|
|
41
|
-
sendEmail(m, requestPasswordlessEmailSuccess, requestPasswordlessEmailError);
|
|
49
|
+
sendEmail(m, id, requestPasswordlessEmailSuccess, requestPasswordlessEmailError);
|
|
42
50
|
});
|
|
43
51
|
}
|
|
44
52
|
function requestPasswordlessEmailSuccess(id) {
|
|
@@ -49,13 +57,14 @@ function requestPasswordlessEmailSuccess(id) {
|
|
|
49
57
|
}
|
|
50
58
|
function requestPasswordlessEmailError(id, error) {
|
|
51
59
|
var m = (0, _index.read)(_index.getEntity, 'lock', id);
|
|
52
|
-
var errorMessage = getErrorMessage(m, error);
|
|
53
|
-
|
|
60
|
+
var errorMessage = getErrorMessage(m, id, error);
|
|
61
|
+
(0, _index.swap)(_index.updateEntity, 'lock', id, l.setSubmitting, false, errorMessage);
|
|
62
|
+
swapCaptchaAfterError(id, error);
|
|
54
63
|
}
|
|
55
64
|
function resendEmail(id) {
|
|
56
65
|
(0, _index.swap)(_index.updateEntity, 'lock', id, _index4.resend);
|
|
57
66
|
var m = (0, _index.read)(_index.getEntity, 'lock', id);
|
|
58
|
-
sendEmail(m, resendEmailSuccess, resendEmailError);
|
|
67
|
+
sendEmail(m, id, resendEmailSuccess, resendEmailError);
|
|
59
68
|
}
|
|
60
69
|
function resendEmailSuccess(id) {
|
|
61
70
|
(0, _index.swap)(_index.updateEntity, 'lock', id, _index4.setResendSuccess);
|
|
@@ -67,7 +76,7 @@ function getPasswordlessConnectionName(m, defaultPasswordlessConnection) {
|
|
|
67
76
|
var connections = l.connections(m, 'passwordless', defaultPasswordlessConnection);
|
|
68
77
|
return connections.size > 0 && l.useCustomPasswordlessConnection(m) ? connections.first().get('name') : defaultPasswordlessConnection;
|
|
69
78
|
}
|
|
70
|
-
function sendEmail(m, successFn, errorFn) {
|
|
79
|
+
function sendEmail(m, id, successFn, errorFn) {
|
|
71
80
|
var params = {
|
|
72
81
|
connection: getPasswordlessConnectionName(m, 'email'),
|
|
73
82
|
email: c.getFieldValue(m, 'email'),
|
|
@@ -76,6 +85,10 @@ function sendEmail(m, successFn, errorFn) {
|
|
|
76
85
|
if ((0, _index4.isSendLink)(m) && !l.auth.params(m).isEmpty()) {
|
|
77
86
|
params.authParams = l.auth.params(m).toJS();
|
|
78
87
|
}
|
|
88
|
+
var isCaptchaValid = (0, _captcha.setCaptchaParams)(m, params, true, []);
|
|
89
|
+
if (!isCaptchaValid) {
|
|
90
|
+
return (0, _captcha.showMissingCaptcha)(m, id, true);
|
|
91
|
+
}
|
|
79
92
|
_web_api.default.startPasswordless(l.id(m), params, function (error) {
|
|
80
93
|
if (error) {
|
|
81
94
|
setTimeout(function () {
|
|
@@ -93,6 +106,10 @@ function sendSMS(id) {
|
|
|
93
106
|
phoneNumber: (0, _phone_number.phoneNumberWithDiallingCode)(m),
|
|
94
107
|
send: (0, _index4.send)(m)
|
|
95
108
|
};
|
|
109
|
+
var isCaptchaValid = (0, _captcha.setCaptchaParams)(m, params, true, []);
|
|
110
|
+
if (!isCaptchaValid) {
|
|
111
|
+
return (0, _captcha.showMissingCaptcha)(m, id, true);
|
|
112
|
+
}
|
|
96
113
|
_web_api.default.startPasswordless(id, params, function (error) {
|
|
97
114
|
if (error) {
|
|
98
115
|
setTimeout(function () {
|
|
@@ -113,9 +130,10 @@ function sendSMSSuccess(id) {
|
|
|
113
130
|
}
|
|
114
131
|
function sendSMSError(id, error) {
|
|
115
132
|
var m = (0, _index.read)(_index.getEntity, 'lock', id);
|
|
116
|
-
var errorMessage = getErrorMessage(m, error);
|
|
133
|
+
var errorMessage = getErrorMessage(m, id, error);
|
|
117
134
|
l.emitAuthorizationErrorEvent(m, error);
|
|
118
|
-
|
|
135
|
+
(0, _index.swap)(_index.updateEntity, 'lock', id, l.setSubmitting, false, errorMessage);
|
|
136
|
+
swapCaptchaAfterError(id, error);
|
|
119
137
|
}
|
|
120
138
|
function logIn(id) {
|
|
121
139
|
var m = (0, _index.read)(_index.getEntity, 'lock', id);
|
|
@@ -135,7 +153,7 @@ function logIn(id) {
|
|
|
135
153
|
var errorMessage;
|
|
136
154
|
if (error) {
|
|
137
155
|
var _m = (0, _index.read)(_index.getEntity, 'lock', id);
|
|
138
|
-
errorMessage = getErrorMessage(_m, error);
|
|
156
|
+
errorMessage = getErrorMessage(_m, id, error);
|
|
139
157
|
if (error.logToConsole) {
|
|
140
158
|
console.error(error.description);
|
|
141
159
|
}
|
|
@@ -148,6 +166,7 @@ function logIn(id) {
|
|
|
148
166
|
}
|
|
149
167
|
function restart(id) {
|
|
150
168
|
(0, _index.swap)(_index.updateEntity, 'lock', id, _index4.restartPasswordless);
|
|
169
|
+
(0, _captcha.swapCaptcha)(id, true, false);
|
|
151
170
|
}
|
|
152
171
|
function toggleTermsAcceptance(id) {
|
|
153
172
|
(0, _index.swap)(_index.updateEntity, 'lock', id, _index4.toggleTermsAcceptance);
|
package/lib/core/client/index.js
CHANGED
|
@@ -21,7 +21,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
|
|
|
21
21
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
22
22
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
23
23
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
24
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
24
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
25
25
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
26
26
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
27
27
|
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; }
|
package/lib/core/index.js
CHANGED
|
@@ -42,6 +42,7 @@ exports.languageBaseUrl = languageBaseUrl;
|
|
|
42
42
|
exports.loggedIn = loggedIn;
|
|
43
43
|
exports.loginErrorMessage = loginErrorMessage;
|
|
44
44
|
exports.overrideOptions = overrideOptions;
|
|
45
|
+
exports.passwordlessCaptcha = passwordlessCaptcha;
|
|
45
46
|
exports.prefill = prefill;
|
|
46
47
|
exports.render = render;
|
|
47
48
|
exports.rendering = rendering;
|
|
@@ -53,6 +54,7 @@ exports.setGlobalError = setGlobalError;
|
|
|
53
54
|
exports.setGlobalInfo = setGlobalInfo;
|
|
54
55
|
exports.setGlobalSuccess = setGlobalSuccess;
|
|
55
56
|
exports.setLoggedIn = setLoggedIn;
|
|
57
|
+
exports.setPasswordlessCaptcha = setPasswordlessCaptcha;
|
|
56
58
|
exports.setResolvedConnection = setResolvedConnection;
|
|
57
59
|
exports.setSubmitting = setSubmitting;
|
|
58
60
|
exports.setSupressSubmitOverlay = setSupressSubmitOverlay;
|
|
@@ -488,14 +490,16 @@ function setCaptcha(m, value, wasInvalid) {
|
|
|
488
490
|
m = captchaField.reset(m, wasInvalid);
|
|
489
491
|
return set(m, 'captcha', _immutable.default.fromJS(value));
|
|
490
492
|
}
|
|
493
|
+
function setPasswordlessCaptcha(m, value, wasInvalid) {
|
|
494
|
+
m = captchaField.reset(m, wasInvalid);
|
|
495
|
+
return set(m, 'passwordlessCaptcha', _immutable.default.fromJS(value));
|
|
496
|
+
}
|
|
491
497
|
function captcha(m) {
|
|
492
|
-
//some tests send an string as model.
|
|
493
|
-
// https://github.com/auth0/lock/blob/82f56187698528699478bd429858cf91e387763c/src/__tests__/engine/classic/sign_up_pane.test.jsx#L28
|
|
494
|
-
if (_typeof(m) !== 'object') {
|
|
495
|
-
return;
|
|
496
|
-
}
|
|
497
498
|
return get(m, 'captcha');
|
|
498
499
|
}
|
|
500
|
+
function passwordlessCaptcha(m) {
|
|
501
|
+
return get(m, 'passwordlessCaptcha');
|
|
502
|
+
}
|
|
499
503
|
function prefill(m) {
|
|
500
504
|
return get(m, 'prefill', {});
|
|
501
505
|
}
|
|
@@ -651,7 +655,7 @@ function loginErrorMessage(m, error, type) {
|
|
|
651
655
|
}
|
|
652
656
|
if (code === 'invalid_captcha') {
|
|
653
657
|
var currentCaptcha = get(m, 'captcha');
|
|
654
|
-
if (currentCaptcha && currentCaptcha.get('provider') === 'recaptcha_v2') {
|
|
658
|
+
if (currentCaptcha && (currentCaptcha.get('provider') === 'recaptcha_v2' || currentCaptcha.get('provider') === 'recaptcha_enterprise')) {
|
|
655
659
|
code = 'invalid_recaptcha';
|
|
656
660
|
}
|
|
657
661
|
}
|
package/lib/core/remote_data.js
CHANGED
|
@@ -78,5 +78,13 @@ function syncRemoteData(m) {
|
|
|
78
78
|
},
|
|
79
79
|
successFn: _index2.setCaptcha
|
|
80
80
|
});
|
|
81
|
+
m = (0, _sync.default)(m, 'passwordlessCaptcha', {
|
|
82
|
+
syncFn: function syncFn(m, cb) {
|
|
83
|
+
_web_api.default.getPasswordlessChallenge(m.get('id'), function (err, r) {
|
|
84
|
+
cb(null, r);
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
successFn: _index2.setPasswordlessCaptcha
|
|
88
|
+
});
|
|
81
89
|
return m;
|
|
82
90
|
}
|
package/lib/core/tenant/index.js
CHANGED
|
@@ -20,7 +20,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
|
|
|
20
20
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
21
21
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
22
22
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
23
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
23
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
24
24
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25
25
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
26
26
|
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; }
|
|
@@ -194,6 +194,12 @@ var Auth0APIClient = /*#__PURE__*/function () {
|
|
|
194
194
|
var _this$client$client2;
|
|
195
195
|
return (_this$client$client2 = this.client.client).getChallenge.apply(_this$client$client2, arguments);
|
|
196
196
|
}
|
|
197
|
+
}, {
|
|
198
|
+
key: "getPasswordlessChallenge",
|
|
199
|
+
value: function getPasswordlessChallenge() {
|
|
200
|
+
var _this$client$client$p;
|
|
201
|
+
return (_this$client$client$p = this.client.client.passwordless).getChallenge.apply(_this$client$client$p, arguments);
|
|
202
|
+
}
|
|
197
203
|
}, {
|
|
198
204
|
key: "getUserCountry",
|
|
199
205
|
value: function getUserCountry(cb) {
|
package/lib/core/web_api.js
CHANGED
|
@@ -84,6 +84,11 @@ var Auth0WebAPI = /*#__PURE__*/function () {
|
|
|
84
84
|
value: function getChallenge(lockID, callback) {
|
|
85
85
|
return this.clients[lockID].getChallenge(callback);
|
|
86
86
|
}
|
|
87
|
+
}, {
|
|
88
|
+
key: "getPasswordlessChallenge",
|
|
89
|
+
value: function getPasswordlessChallenge(lockID, callback) {
|
|
90
|
+
return this.clients[lockID].getPasswordlessChallenge(callback);
|
|
91
|
+
}
|
|
87
92
|
}, {
|
|
88
93
|
key: "getSSOData",
|
|
89
94
|
value: function getSSOData(lockID) {
|