auth0-lock 12.5.1 → 13.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/CODEOWNERS +1 -1
- package/.github/workflows/semgrep.yml +1 -10
- package/.github/workflows/snyk.yml +1 -10
- package/.version +1 -1
- package/CHANGELOG.md +19 -0
- package/Makefile +16 -4
- package/README.md +1 -1
- package/lib/__tests__/engine/classic/sign_up_pane.js +6 -4
- package/lib/__tests__/field/captcha/third_party_captcha.js +10 -1
- package/lib/connection/captcha.js +13 -1
- package/lib/connection/database/actions.js +6 -6
- package/lib/connection/passwordless/index.js +10 -1
- package/lib/connection/social/index.js +1 -0
- package/lib/core/index.js +9 -0
- package/lib/core/remote_data.js +0 -16
- package/lib/core/web_api/helper.js +1 -1
- package/lib/core/web_api/p2_api.js +8 -2
- package/lib/core/web_api.js +5 -0
- package/lib/core.js +1 -1
- package/lib/engine/classic/sign_up_pane.js +3 -2
- package/lib/field/captcha/third_party_captcha.js +12 -0
- package/lib/i18n.js +1 -1
- package/lib/lock.js +1 -1
- package/lib/passwordless.js +1 -1
- package/package.json +3 -3
|
@@ -74,11 +74,12 @@ var SignUpPane = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
74
74
|
value: x.get('value')
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
|
-
var captchaPane = l.
|
|
77
|
+
var captchaPane = l.signupCaptcha(model) && l.signupCaptcha(model).get('required') && ((0, _enterprise.isHRDDomain)(model, (0, _index.databaseUsernameValue)(model)) || !sso) ? /*#__PURE__*/_react.default.createElement(_captcha_pane.default, {
|
|
78
78
|
i18n: i18n,
|
|
79
79
|
lock: model,
|
|
80
|
+
flow: _captcha.Flow.SIGNUP,
|
|
80
81
|
onReload: function onReload() {
|
|
81
|
-
return (0, _captcha.swapCaptcha)(l.id(model), _captcha.Flow.
|
|
82
|
+
return (0, _captcha.swapCaptcha)(l.id(model), _captcha.Flow.SIGNUP, false);
|
|
82
83
|
}
|
|
83
84
|
}) : null;
|
|
84
85
|
var passwordPane = !onlyEmail && /*#__PURE__*/_react.default.createElement(_password_pane.default, {
|
|
@@ -84,6 +84,13 @@ var providerDomPrefix = function providerDomPrefix(provider) {
|
|
|
84
84
|
return 'auth0-v2';
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
|
+
var providerComponentId = function providerComponentId(provider) {
|
|
88
|
+
if (provider === HCAPTCHA_PROVIDER) {
|
|
89
|
+
return 'h-captcha';
|
|
90
|
+
} else {
|
|
91
|
+
return '';
|
|
92
|
+
}
|
|
93
|
+
};
|
|
87
94
|
var loadScript = function loadScript(url, attributes) {
|
|
88
95
|
var script = document.createElement('script');
|
|
89
96
|
for (var attr in attributes) {
|
|
@@ -321,15 +328,20 @@ var ThirdPartyCaptcha = exports.ThirdPartyCaptcha = /*#__PURE__*/function (_Reac
|
|
|
321
328
|
className: this.props.isValid ? "auth0-lock-".concat(providerDomPrefix(this.props.provider), "-block") : "auth0-lock-".concat(providerDomPrefix(this.props.provider), "-block auth0-lock-").concat(providerDomPrefix(this.props.provider), "-block-error")
|
|
322
329
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
323
330
|
className: "auth0-lock-".concat(providerDomPrefix(this.props.provider) === 'recaptcha' ? 'recaptchav2' : providerDomPrefix(this.props.provider)),
|
|
331
|
+
id: providerComponentId(this.props.provider),
|
|
324
332
|
ref: this.ref
|
|
325
333
|
}));
|
|
326
334
|
}
|
|
327
335
|
}, {
|
|
328
336
|
key: "componentDidUpdate",
|
|
329
337
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
338
|
+
var hCaptchaComponent = document.getElementById("h-captcha");
|
|
330
339
|
if (prevProps.value !== this.props.value && this.props.value === '') {
|
|
331
340
|
this.reset();
|
|
332
341
|
}
|
|
342
|
+
if (this.props.provider === HCAPTCHA_PROVIDER && hCaptchaComponent && window[this.props.provider]) {
|
|
343
|
+
window[this.props.provider].render('h-captcha', this.getRenderParams());
|
|
344
|
+
}
|
|
333
345
|
}
|
|
334
346
|
}], [{
|
|
335
347
|
key: "getDerivedStateFromProps",
|
package/lib/i18n.js
CHANGED
|
@@ -91,7 +91,7 @@ function assertLanguage(m, language, base) {
|
|
|
91
91
|
function syncLang(m, language, _cb) {
|
|
92
92
|
(0, _cdn_utils.load)({
|
|
93
93
|
method: 'registerLanguageDictionary',
|
|
94
|
-
url: "".concat(l.languageBaseUrl(m), "/js/lock/").concat("
|
|
94
|
+
url: "".concat(l.languageBaseUrl(m), "/js/lock/").concat("13.1.0", "/").concat(language, ".js"),
|
|
95
95
|
check: function check(str) {
|
|
96
96
|
return str && str === language;
|
|
97
97
|
},
|
package/lib/lock.js
CHANGED
|
@@ -37,7 +37,7 @@ var Auth0Lock = exports.default = /*#__PURE__*/function (_Core) {
|
|
|
37
37
|
_inherits(Auth0Lock, _Core);
|
|
38
38
|
return _createClass(Auth0Lock);
|
|
39
39
|
}(_core.default); // telemetry
|
|
40
|
-
Auth0Lock.version = "
|
|
40
|
+
Auth0Lock.version = "13.1.0";
|
|
41
41
|
|
|
42
42
|
// TODO: should we have different telemetry for classic/passwordless?
|
|
43
43
|
// TODO: should we set telemetry info before each request?
|
package/lib/passwordless.js
CHANGED
|
@@ -37,4 +37,4 @@ var Auth0LockPasswordless = exports.default = /*#__PURE__*/function (_Core) {
|
|
|
37
37
|
_inherits(Auth0LockPasswordless, _Core);
|
|
38
38
|
return _createClass(Auth0LockPasswordless);
|
|
39
39
|
}(_core.default);
|
|
40
|
-
Auth0LockPasswordless.version = "
|
|
40
|
+
Auth0LockPasswordless.version = "13.1.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auth0-lock",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.1.0",
|
|
4
4
|
"description": "Auth0 Lock",
|
|
5
5
|
"author": "Auth0 <support@auth0.com> (http://auth0.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -121,11 +121,11 @@
|
|
|
121
121
|
"webpack-dev-server": "^4.11.1"
|
|
122
122
|
},
|
|
123
123
|
"dependencies": {
|
|
124
|
-
"auth0-js": "^9.
|
|
124
|
+
"auth0-js": "^9.27.0",
|
|
125
125
|
"auth0-password-policies": "^1.0.2",
|
|
126
126
|
"blueimp-md5": "^2.19.0",
|
|
127
127
|
"classnames": "^2.3.2",
|
|
128
|
-
"dompurify": "^2.
|
|
128
|
+
"dompurify": "^2.5.4",
|
|
129
129
|
"immutable": "^3.7.6",
|
|
130
130
|
"jsonp": "^0.2.1",
|
|
131
131
|
"password-sheriff": "^1.1.1",
|