auth0-lock 14.2.3 → 14.2.5
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/.version +1 -1
- package/CHANGELOG.md +15 -3
- package/README.md +1 -1
- package/lib/__tests__/connection/enterprise/hrd_screen.js +53 -0
- package/lib/__tests__/connection/enterprise/matchConnection.js +34 -0
- package/lib/connection/enterprise/hrd_screen.js +1 -1
- package/lib/connection/enterprise.js +1 -1
- package/lib/core/actions.js +1 -1
- package/lib/core/web_api/helper.js +1 -1
- package/lib/core/web_api/p2_api.js +1 -1
- package/lib/i18n.js +1 -1
- package/lib/lock.js +1 -1
- package/lib/passwordless.js +1 -1
- package/lib/ui/input/select_input.js +2 -2
- package/package.json +1 -1
package/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
v14.2.
|
|
1
|
+
v14.2.5
|
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [v14.2.5](https://github.com/auth0/lock/tree/v14.2.5) (2026-03-19)
|
|
4
|
+
[Full Changelog](https://github.com/auth0/lock/compare/v14.2.4...v14.2.5)
|
|
5
|
+
|
|
6
|
+
**Fixed**
|
|
7
|
+
- Fix: TypeError when CordovaAuth0Plugin is not a constructor (auth0-js 9.30.1+) [\#2742](https://github.com/auth0/lock/pull/2742) ([ankita10119](https://github.com/ankita10119))
|
|
8
|
+
- Fix: TypeError in matchConnection for enterprise connections with no domains [\#2736](https://github.com/auth0/lock/pull/2736) ([ankita10119](https://github.com/ankita10119))
|
|
9
|
+
|
|
10
|
+
## [v14.2.4](https://github.com/auth0/lock/tree/v14.2.4) (2026-01-21)
|
|
11
|
+
[Full Changelog](https://github.com/auth0/lock/compare/v14.2.3...v14.2.4)
|
|
12
|
+
|
|
13
|
+
**Fixed**
|
|
14
|
+
- fix: update className and InputWrap name in SelectInput component (#2534) [\#2719](https://github.com/auth0/lock/pull/2719) ([ankita10119](https://github.com/ankita10119))
|
|
15
|
+
- fix: handle undefined and empty domain values in HRD screen (#2526) [\#2720](https://github.com/auth0/lock/pull/2720) ([ankita10119](https://github.com/ankita10119))
|
|
16
|
+
- fix: add 'too_many_attempts' to error codes in logInError function [\#2718](https://github.com/auth0/lock/pull/2718) ([ankita10119](https://github.com/ankita10119))
|
|
17
|
+
|
|
3
18
|
## [v14.2.3](https://github.com/auth0/lock/tree/v14.2.3) (2026-01-12)
|
|
4
19
|
[Full Changelog](https://github.com/auth0/lock/compare/v14.2.2...v14.2.3)
|
|
5
20
|
|
|
6
21
|
**Added**
|
|
7
22
|
- feat: add too_many_attempts error to passwordless [\#2700](https://github.com/auth0/lock/pull/2700) ([avamachado-okta](https://github.com/avamachado-okta))
|
|
8
23
|
|
|
9
|
-
**Changed**
|
|
10
|
-
- Update: Upgrade Node.js from 18 to 22 [\#2711](https://github.com/auth0/lock/pull/2711) ([ankita10119](https://github.com/ankita10119))
|
|
11
|
-
|
|
12
24
|
## [v14.2.2](https://github.com/auth0/lock/tree/v14.2.2) (2025-12-16)
|
|
13
25
|
[Full Changelog](https://github.com/auth0/lock/compare/v14.2.1...v14.2.2)
|
|
14
26
|
|
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ From CDN
|
|
|
31
31
|
|
|
32
32
|
```html
|
|
33
33
|
<!-- Latest patch release (recommended for production) -->
|
|
34
|
-
<script src="https://cdn.auth0.com/js/lock/14.2.
|
|
34
|
+
<script src="https://cdn.auth0.com/js/lock/14.2.5/lock.min.js"></script>
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
### Configure Auth0
|
|
@@ -65,4 +65,57 @@ describe('HRDScreen Component', function () {
|
|
|
65
65
|
i18n: i18nProp
|
|
66
66
|
})).toMatchSnapshot();
|
|
67
67
|
});
|
|
68
|
+
it('renders correctly when enterprise domain is undefined', function () {
|
|
69
|
+
require('connection/enterprise').enterpriseDomain.mockImplementation(function () {
|
|
70
|
+
return undefined;
|
|
71
|
+
});
|
|
72
|
+
var Component = getComponent();
|
|
73
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, {
|
|
74
|
+
model: lock,
|
|
75
|
+
i18n: i18nProp
|
|
76
|
+
})).toMatchSnapshot();
|
|
77
|
+
});
|
|
78
|
+
it('does not show "undefined" in message when enterprise domain is undefined', function () {
|
|
79
|
+
require('connection/enterprise').enterpriseDomain.mockImplementation(function () {
|
|
80
|
+
return undefined;
|
|
81
|
+
});
|
|
82
|
+
var _i18nProp = i18nProp,
|
|
83
|
+
str = _i18nProp.str;
|
|
84
|
+
|
|
85
|
+
// Should use the fallback message without domain placeholder
|
|
86
|
+
var expectedMessage = str('enterpriseLoginIntructions');
|
|
87
|
+
expect(expectedMessage).toContain('Login with your corporate credentials.');
|
|
88
|
+
expect(expectedMessage).not.toContain('undefined');
|
|
89
|
+
});
|
|
90
|
+
it('does not show "undefined" in message when enterprise domain is null', function () {
|
|
91
|
+
require('connection/enterprise').enterpriseDomain.mockImplementation(function () {
|
|
92
|
+
return null;
|
|
93
|
+
});
|
|
94
|
+
var _i18nProp2 = i18nProp,
|
|
95
|
+
str = _i18nProp2.str;
|
|
96
|
+
// Should use the fallback message without domain placeholder
|
|
97
|
+
var expectedMessage = str('enterpriseLoginIntructions');
|
|
98
|
+
expect(expectedMessage).toContain('Login with your corporate credentials.');
|
|
99
|
+
expect(expectedMessage).not.toContain('undefined');
|
|
100
|
+
});
|
|
101
|
+
it('uses fallback message when enterprise domain is empty string', function () {
|
|
102
|
+
require('connection/enterprise').enterpriseDomain.mockImplementation(function () {
|
|
103
|
+
return '';
|
|
104
|
+
});
|
|
105
|
+
var Component = getComponent();
|
|
106
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, {
|
|
107
|
+
model: lock,
|
|
108
|
+
i18n: i18nProp
|
|
109
|
+
})).toMatchSnapshot();
|
|
110
|
+
});
|
|
111
|
+
it('uses fallback message when enterprise domain is whitespace only', function () {
|
|
112
|
+
require('connection/enterprise').enterpriseDomain.mockImplementation(function () {
|
|
113
|
+
return ' ';
|
|
114
|
+
});
|
|
115
|
+
var Component = getComponent();
|
|
116
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, {
|
|
117
|
+
model: lock,
|
|
118
|
+
i18n: i18nProp
|
|
119
|
+
})).toMatchSnapshot();
|
|
120
|
+
});
|
|
68
121
|
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _immutable = _interopRequireDefault(require("immutable"));
|
|
4
|
+
var _enterprise = require("../../../connection/enterprise");
|
|
5
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
6
|
+
jest.mock('core/index', function () {
|
|
7
|
+
return {
|
|
8
|
+
connections: jest.fn()
|
|
9
|
+
};
|
|
10
|
+
});
|
|
11
|
+
describe('matchConnection', function () {
|
|
12
|
+
afterEach(function () {
|
|
13
|
+
return jest.resetAllMocks();
|
|
14
|
+
});
|
|
15
|
+
it('does not throw when enterprise connection has no domains configured', function () {
|
|
16
|
+
var _require = require('core/index'),
|
|
17
|
+
connections = _require.connections;
|
|
18
|
+
|
|
19
|
+
// Simulate tenant endpoint returning a connection with no domains field
|
|
20
|
+
connections.mockReturnValue(_immutable.default.fromJS([{
|
|
21
|
+
name: 'samlp-connection',
|
|
22
|
+
strategy: 'samlp',
|
|
23
|
+
type: 'enterprise'
|
|
24
|
+
}]));
|
|
25
|
+
var m = _immutable.default.fromJS({
|
|
26
|
+
id: '__lock__'
|
|
27
|
+
});
|
|
28
|
+
var result;
|
|
29
|
+
expect(function () {
|
|
30
|
+
result = (0, _enterprise.matchConnection)(m, 'test@example.com');
|
|
31
|
+
}).not.toThrow();
|
|
32
|
+
expect(result).toBeFalsy();
|
|
33
|
+
});
|
|
34
|
+
});
|
|
@@ -31,7 +31,7 @@ var Component = function Component(_ref) {
|
|
|
31
31
|
model = _ref.model;
|
|
32
32
|
var domain = (0, _enterprise.enterpriseDomain)(model);
|
|
33
33
|
var headerText;
|
|
34
|
-
if (domain
|
|
34
|
+
if (domain && domain.trim()) {
|
|
35
35
|
headerText = i18n.str('enterpriseActiveLoginInstructions', domain);
|
|
36
36
|
} else {
|
|
37
37
|
headerText = i18n.str('enterpriseLoginIntructions');
|
|
@@ -105,7 +105,7 @@ function matchConnection(m, email) {
|
|
|
105
105
|
var target = (0, _email.emailDomain)(email);
|
|
106
106
|
if (!target) return false;
|
|
107
107
|
return l.connections.apply(l, [m, 'enterprise'].concat(_toConsumableArray(strategies))).find(function (x) {
|
|
108
|
-
return x.get('domains').contains(target);
|
|
108
|
+
return x.get('domains', (0, _immutable.List)()).contains(target);
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
function isEnterpriseDomain(m, email) {
|
package/lib/core/actions.js
CHANGED
|
@@ -238,7 +238,7 @@ function logInError(id, fields, error) {
|
|
|
238
238
|
return setTimeout(function () {
|
|
239
239
|
var m = (0, _index.read)(_index.getEntity, 'lock', id);
|
|
240
240
|
var errorMessage = l.loginErrorMessage(m, error, loginType(fields));
|
|
241
|
-
var errorCodesThatEmitAuthorizationErrorEvent = ['blocked_user', 'rule_error', 'lock.unauthorized', 'invalid_user_password', 'login_required'];
|
|
241
|
+
var errorCodesThatEmitAuthorizationErrorEvent = ['blocked_user', 'rule_error', 'lock.unauthorized', 'invalid_user_password', 'login_required', 'too_many_attempts'];
|
|
242
242
|
if (errorCodesThatEmitAuthorizationErrorEvent.indexOf(errorCode) > -1) {
|
|
243
243
|
l.emitAuthorizationErrorEvent(m, error);
|
|
244
244
|
}
|
|
@@ -45,7 +45,7 @@ var Auth0APIClient = /*#__PURE__*/function () {
|
|
|
45
45
|
responseMode: opts.responseMode,
|
|
46
46
|
responseType: opts.responseType,
|
|
47
47
|
leeway: opts.leeway || 60,
|
|
48
|
-
plugins: opts.plugins || [new _cordovaAuth0PluginMin.default()],
|
|
48
|
+
plugins: opts.plugins || (typeof _cordovaAuth0PluginMin.default === 'function' ? [new _cordovaAuth0PluginMin.default()] : []),
|
|
49
49
|
overrides: (0, _helper.webAuthOverrides)(opts.overrides),
|
|
50
50
|
_sendTelemetry: opts._sendTelemetry === false ? false : true,
|
|
51
51
|
_telemetryInfo: telemetry,
|
package/lib/i18n.js
CHANGED
|
@@ -90,7 +90,7 @@ function assertLanguage(m, language, base) {
|
|
|
90
90
|
function syncLang(m, language, _cb) {
|
|
91
91
|
(0, _cdn_utils.load)({
|
|
92
92
|
method: 'registerLanguageDictionary',
|
|
93
|
-
url: "".concat(l.languageBaseUrl(m), "/js/lock/").concat("14.2.
|
|
93
|
+
url: "".concat(l.languageBaseUrl(m), "/js/lock/").concat("14.2.5", "/").concat(language, ".js"),
|
|
94
94
|
check: function check(str) {
|
|
95
95
|
return str && str === language;
|
|
96
96
|
},
|
package/lib/lock.js
CHANGED
|
@@ -36,7 +36,7 @@ var Auth0Lock = exports.default = /*#__PURE__*/function (_Core) {
|
|
|
36
36
|
_inherits(Auth0Lock, _Core);
|
|
37
37
|
return _createClass(Auth0Lock);
|
|
38
38
|
}(_core.default); // telemetry
|
|
39
|
-
Auth0Lock.version = "14.2.
|
|
39
|
+
Auth0Lock.version = "14.2.5";
|
|
40
40
|
|
|
41
41
|
// TODO: should we have different telemetry for classic/passwordless?
|
|
42
42
|
// TODO: should we set telemetry info before each request?
|
package/lib/passwordless.js
CHANGED
|
@@ -36,4 +36,4 @@ var Auth0LockPasswordless = exports.default = /*#__PURE__*/function (_Core) {
|
|
|
36
36
|
_inherits(Auth0LockPasswordless, _Core);
|
|
37
37
|
return _createClass(Auth0LockPasswordless);
|
|
38
38
|
}(_core.default);
|
|
39
|
-
Auth0LockPasswordless.version = "14.2.
|
|
39
|
+
Auth0LockPasswordless.version = "14.2.5";
|
|
@@ -87,12 +87,12 @@ var SelectInput = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
87
87
|
src: iconUrl
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
-
var className =
|
|
90
|
+
var className = "auth0-lock-input auth0-lock-input-".concat(name);
|
|
91
91
|
if (!label) className += ' auth0-lock-input-with-placeholder';
|
|
92
92
|
return /*#__PURE__*/_react.default.createElement(_input_wrap.default, {
|
|
93
93
|
focused: focused,
|
|
94
94
|
isValid: isValid,
|
|
95
|
-
name:
|
|
95
|
+
name: name,
|
|
96
96
|
icon: icon
|
|
97
97
|
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
98
98
|
id: "".concat(lockId, "-").concat(name),
|