auth0-lock 14.2.0 → 14.2.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/.github/workflows/codeql.yml +1 -1
- package/.github/workflows/npm-release.yml +1 -1
- package/.github/workflows/snyk.yml +1 -1
- package/.github/workflows/test.yml +1 -1
- package/.version +1 -1
- package/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/customJsdomEnvironment.js +9 -0
- package/lib/__tests__/core/index.js +2 -4
- package/lib/__tests__/core/web_api.js +10 -31
- package/lib/__tests__/testUtils.js +30 -4
- package/lib/__tests__/ui/box/container.js +56 -0
- package/lib/core/web_api/helper.js +1 -1
- package/lib/i18n.js +1 -1
- package/lib/lock.js +1 -1
- package/lib/passwordless.js +1 -1
- package/lib/ui/box/container.js +46 -37
- package/package.json +6 -7
|
@@ -37,7 +37,7 @@ jobs:
|
|
|
37
37
|
run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection.
|
|
38
38
|
|
|
39
39
|
- name: Checkout
|
|
40
|
-
uses: actions/checkout@
|
|
40
|
+
uses: actions/checkout@v6
|
|
41
41
|
|
|
42
42
|
- name: Initialize CodeQL
|
|
43
43
|
uses: github/codeql-action/init@v4
|
|
@@ -29,7 +29,7 @@ jobs:
|
|
|
29
29
|
- if: github.actor == 'dependabot[bot]' || github.event_name == 'merge_group'
|
|
30
30
|
run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection.
|
|
31
31
|
|
|
32
|
-
- uses: actions/checkout@
|
|
32
|
+
- uses: actions/checkout@v6
|
|
33
33
|
with:
|
|
34
34
|
ref: ${{ github.event.pull_request.head.sha || github.ref }}
|
|
35
35
|
|
package/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
v14.2.
|
|
1
|
+
v14.2.1
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [v14.2.1](https://github.com/auth0/lock/tree/v14.2.1) (2025-12-03)
|
|
4
|
+
[Full Changelog](https://github.com/auth0/lock/compare/v14.2.0...v14.2.1)
|
|
5
|
+
|
|
6
|
+
**Fixed**
|
|
7
|
+
- Fix: connectionResolver receives incorrect field value when switching between Login and Sign-up tabs [\#2697](https://github.com/auth0/lock/pull/2697) ([ankita10119](https://github.com/ankita10119))
|
|
8
|
+
|
|
3
9
|
## [v14.2.0](https://github.com/auth0/lock/tree/v14.2.0) (2025-10-21)
|
|
4
10
|
[Full Changelog](https://github.com/auth0/lock/compare/v14.1.0...v14.2.0)
|
|
5
11
|
|
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.1/lock.min.js"></script>
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
### Configure Auth0
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const JSDOMEnvironment = require('jest-environment-jsdom').default;
|
|
2
|
+
|
|
3
|
+
module.exports = class CustomJsdomEnvironment extends JSDOMEnvironment {
|
|
4
|
+
async setup() {
|
|
5
|
+
await super.setup();
|
|
6
|
+
// Expose jsdom instance globally so tests can call jsdom.reconfigure()
|
|
7
|
+
this.global.jsdom = this.dom;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
@@ -54,10 +54,8 @@ describe('setup', function () {
|
|
|
54
54
|
var model = mock.calls[0][1].toJS();
|
|
55
55
|
expect(model.auth.redirectUrl).toBe('https://test.com/path/');
|
|
56
56
|
});
|
|
57
|
-
it
|
|
58
|
-
|
|
59
|
-
url: 'https://test.com/path/#not-this-part'
|
|
60
|
-
});
|
|
57
|
+
it('default redirectUrl should work when `window.location.origin` is not available', function () {
|
|
58
|
+
(0, _testUtils.setURL)('https://test.com/path/#not-this-part');
|
|
61
59
|
var options = {};
|
|
62
60
|
setup('id', 'clientID', 'domain', options, 'hookRunner', 'emitEventFn');
|
|
63
61
|
var _mockInit2 = mockInit,
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _web_api = _interopRequireDefault(require("../../core/web_api"));
|
|
4
|
+
var _testUtils = require("../testUtils");
|
|
4
5
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
5
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
6
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
9
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
10
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
6
|
describe('Auth0WebApi', function () {
|
|
12
7
|
var originalWindow;
|
|
8
|
+
var originalLocation;
|
|
13
9
|
var LOCK_ID = 'lock-id';
|
|
14
10
|
var CLIENT_ID = 'client-id';
|
|
15
11
|
var DEFAULT_DOMAIN = 'test.com';
|
|
@@ -18,17 +14,16 @@ describe('Auth0WebApi', function () {
|
|
|
18
14
|
};
|
|
19
15
|
beforeEach(function () {
|
|
20
16
|
originalWindow = window.window;
|
|
17
|
+
originalLocation = window.location;
|
|
21
18
|
});
|
|
22
19
|
afterEach(function () {
|
|
23
20
|
window.window = originalWindow;
|
|
21
|
+
delete window.location;
|
|
22
|
+
window.location = originalLocation;
|
|
24
23
|
});
|
|
25
24
|
describe('setupClient', function () {
|
|
26
25
|
it('sets the correct options when is on the hosted login page', function () {
|
|
27
|
-
|
|
28
|
-
window.location = _objectSpread(_objectSpread({}, originalWindow.location), {}, {
|
|
29
|
-
host: DEFAULT_DOMAIN,
|
|
30
|
-
search: ''
|
|
31
|
-
});
|
|
26
|
+
(0, _testUtils.setURL)("https://".concat(DEFAULT_DOMAIN, "/"));
|
|
32
27
|
_web_api.default.setupClient(LOCK_ID, CLIENT_ID, DEFAULT_DOMAIN, {
|
|
33
28
|
redirect: true
|
|
34
29
|
});
|
|
@@ -41,40 +36,24 @@ describe('Auth0WebApi', function () {
|
|
|
41
36
|
}));
|
|
42
37
|
});
|
|
43
38
|
it('sets redirect: true when on the same origin as the specified domain', function () {
|
|
44
|
-
|
|
45
|
-
window.location = _objectSpread(_objectSpread({}, originalWindow.location), {}, {
|
|
46
|
-
host: DEFAULT_DOMAIN,
|
|
47
|
-
search: ''
|
|
48
|
-
});
|
|
39
|
+
(0, _testUtils.setURL)("https://".concat(DEFAULT_DOMAIN, "/"));
|
|
49
40
|
_web_api.default.setupClient(LOCK_ID, CLIENT_ID, DEFAULT_DOMAIN, {});
|
|
50
41
|
expect(client().authOpt.popup).toBe(false);
|
|
51
42
|
});
|
|
52
43
|
it('sets redirect: false when on a different origin as the specified domain', function () {
|
|
53
|
-
|
|
54
|
-
window.location = _objectSpread(_objectSpread({}, originalWindow.location), {}, {
|
|
55
|
-
host: 'test-other.com',
|
|
56
|
-
search: ''
|
|
57
|
-
});
|
|
44
|
+
(0, _testUtils.setURL)('https://test-other.com/');
|
|
58
45
|
_web_api.default.setupClient(LOCK_ID, CLIENT_ID, DEFAULT_DOMAIN, {});
|
|
59
46
|
expect(client().authOpt.popup).toBe(true);
|
|
60
47
|
});
|
|
61
48
|
it('forces popup and sso mode for cordova, only when not running in the hosted environment', function () {
|
|
62
|
-
|
|
63
|
-
window.location = _objectSpread(_objectSpread({}, originalWindow.location), {}, {
|
|
64
|
-
host: DEFAULT_DOMAIN,
|
|
65
|
-
search: ''
|
|
66
|
-
});
|
|
49
|
+
(0, _testUtils.setURL)("https://".concat(DEFAULT_DOMAIN, "/"));
|
|
67
50
|
window.cordova = true;
|
|
68
51
|
_web_api.default.setupClient(LOCK_ID, CLIENT_ID, DEFAULT_DOMAIN, {});
|
|
69
52
|
expect(client().authOpt.popup).toBe(false);
|
|
70
53
|
expect(client().authOpt.sso).toBeUndefined();
|
|
71
54
|
});
|
|
72
55
|
it('forces popup and sso mode for electron, only when not running in the hosted environment', function () {
|
|
73
|
-
|
|
74
|
-
window.location = _objectSpread(_objectSpread({}, originalWindow.location), {}, {
|
|
75
|
-
host: DEFAULT_DOMAIN,
|
|
76
|
-
search: ''
|
|
77
|
-
});
|
|
56
|
+
(0, _testUtils.setURL)("https://".concat(DEFAULT_DOMAIN, "/"));
|
|
78
57
|
window.electron = true;
|
|
79
58
|
_web_api.default.setupClient(LOCK_ID, CLIENT_ID, DEFAULT_DOMAIN, {});
|
|
80
59
|
expect(client().authOpt.popup).toBe(false);
|
|
@@ -61,11 +61,37 @@ var extractPropsFromWrapper = exports.extractPropsFromWrapper = function extract
|
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
// Newer (> Jest v22) versions don't allow modification of location.href
|
|
64
|
-
//
|
|
65
|
-
// https://www.npmjs.com/package/jest-environment-jsdom-global
|
|
64
|
+
// Try jsdom.reconfigure() first (via custom environment), then fall back to property mocking
|
|
66
65
|
var setURL = exports.setURL = function setURL(url) {
|
|
67
|
-
jsdom.reconfigure(
|
|
68
|
-
|
|
66
|
+
// Approach 1: Use jsdom.reconfigure() if available (cleanest)
|
|
67
|
+
if (global.jsdom && typeof global.jsdom.reconfigure === 'function') {
|
|
68
|
+
global.jsdom.reconfigure({
|
|
69
|
+
url: url
|
|
70
|
+
});
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Approach 2: Fallback - Mock location properties with Object.defineProperty
|
|
75
|
+
var parsedUrl = new URL(url);
|
|
76
|
+
delete window.location;
|
|
77
|
+
Object.defineProperty(window, 'location', {
|
|
78
|
+
value: {
|
|
79
|
+
href: parsedUrl.href,
|
|
80
|
+
origin: parsedUrl.origin,
|
|
81
|
+
protocol: parsedUrl.protocol,
|
|
82
|
+
host: parsedUrl.host,
|
|
83
|
+
hostname: parsedUrl.hostname,
|
|
84
|
+
port: parsedUrl.port,
|
|
85
|
+
pathname: parsedUrl.pathname,
|
|
86
|
+
search: parsedUrl.search,
|
|
87
|
+
hash: parsedUrl.hash,
|
|
88
|
+
// Add toString for debugging
|
|
89
|
+
toString: function toString() {
|
|
90
|
+
return parsedUrl.href;
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
writable: true,
|
|
94
|
+
configurable: true
|
|
69
95
|
});
|
|
70
96
|
};
|
|
71
97
|
var expectMockToMatch = exports.expectMockToMatch = function expectMockToMatch(_ref2, numberOfCalls) {
|
|
@@ -13,6 +13,11 @@ jest.mock('store/index', function () {
|
|
|
13
13
|
jest.mock('ui/box/chrome', function () {
|
|
14
14
|
return (0, _testUtils.mockComponent)('chrome');
|
|
15
15
|
});
|
|
16
|
+
jest.mock('connection/database/index', function () {
|
|
17
|
+
return {
|
|
18
|
+
databaseUsernameValue: jest.fn()
|
|
19
|
+
};
|
|
20
|
+
});
|
|
16
21
|
var mockEvent = {
|
|
17
22
|
preventDefault: function preventDefault() {}
|
|
18
23
|
};
|
|
@@ -77,14 +82,23 @@ describe('Container', function () {
|
|
|
77
82
|
describe('with a custom `connectionResolver`', function () {
|
|
78
83
|
var connectionResolverMock;
|
|
79
84
|
var setResolvedConnectionMock;
|
|
85
|
+
var databaseUsernameValueMock;
|
|
80
86
|
beforeEach(function () {
|
|
81
87
|
connectionResolverMock = jest.fn();
|
|
82
88
|
setResolvedConnectionMock = jest.fn();
|
|
89
|
+
databaseUsernameValueMock = require('connection/database/index').databaseUsernameValue;
|
|
90
|
+
|
|
91
|
+
// Set default return value for databaseUsernameValue mock
|
|
92
|
+
databaseUsernameValueMock.mockReturnValue('peter_picked@pickledpepper.com');
|
|
83
93
|
require('core/index').connectionResolver = function () {
|
|
84
94
|
return connectionResolverMock;
|
|
85
95
|
};
|
|
86
96
|
require('core/index').setResolvedConnection = setResolvedConnectionMock;
|
|
87
97
|
});
|
|
98
|
+
afterEach(function () {
|
|
99
|
+
// Reset mock between tests and restore default return value
|
|
100
|
+
databaseUsernameValueMock.mockReset().mockReturnValue('peter_picked@pickledpepper.com');
|
|
101
|
+
});
|
|
88
102
|
it('calls `connectionResolver` onSubmit', function () {
|
|
89
103
|
var c = getContainer();
|
|
90
104
|
c.handleSubmit(mockEvent);
|
|
@@ -111,6 +125,48 @@ describe('Container', function () {
|
|
|
111
125
|
expect(mock.calls.length).toBe(1);
|
|
112
126
|
expect(mock.calls[0]).toMatchSnapshot();
|
|
113
127
|
});
|
|
128
|
+
it('prioritizes email over username on signUp screen', function () {
|
|
129
|
+
databaseUsernameValueMock.mockReturnValue('test@example.com');
|
|
130
|
+
var c = getContainer({
|
|
131
|
+
screenName: 'main.signUp'
|
|
132
|
+
});
|
|
133
|
+
c.handleSubmit(mockEvent);
|
|
134
|
+
|
|
135
|
+
// Should call databaseUsernameValue with emailFirst: true
|
|
136
|
+
expect(databaseUsernameValueMock).toHaveBeenCalledWith(expect.anything(), {
|
|
137
|
+
emailFirst: true
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
// connectionResolver should receive the email value
|
|
141
|
+
var _connectionResolverMo2 = connectionResolverMock,
|
|
142
|
+
mock = _connectionResolverMo2.mock;
|
|
143
|
+
expect(mock.calls[0][0]).toBe('test@example.com');
|
|
144
|
+
});
|
|
145
|
+
it('prioritizes username over email on login screen', function () {
|
|
146
|
+
databaseUsernameValueMock.mockReturnValue('testuser');
|
|
147
|
+
var c = getContainer({
|
|
148
|
+
screenName: 'main.login'
|
|
149
|
+
});
|
|
150
|
+
c.handleSubmit(mockEvent);
|
|
151
|
+
|
|
152
|
+
// Should call databaseUsernameValue with empty options (default behavior)
|
|
153
|
+
expect(databaseUsernameValueMock).toHaveBeenCalledWith(expect.anything(), {});
|
|
154
|
+
|
|
155
|
+
// connectionResolver should receive the username value
|
|
156
|
+
var _connectionResolverMo3 = connectionResolverMock,
|
|
157
|
+
mock = _connectionResolverMo3.mock;
|
|
158
|
+
expect(mock.calls[0][0]).toBe('testuser');
|
|
159
|
+
});
|
|
160
|
+
it('uses default behavior when screenName is not main.signUp', function () {
|
|
161
|
+
databaseUsernameValueMock.mockReturnValue('defaultvalue');
|
|
162
|
+
var c = getContainer({
|
|
163
|
+
screenName: 'forgotPassword'
|
|
164
|
+
});
|
|
165
|
+
c.handleSubmit(mockEvent);
|
|
166
|
+
|
|
167
|
+
// Should call databaseUsernameValue with empty options (default behavior)
|
|
168
|
+
expect(databaseUsernameValueMock).toHaveBeenCalledWith(expect.anything(), {});
|
|
169
|
+
});
|
|
114
170
|
});
|
|
115
171
|
describe('when suppressSubmitOverlay is true', function () {
|
|
116
172
|
it('it does not display the overlay when submitting', function () {
|
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.1", "/").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.1";
|
|
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.1";
|
package/lib/ui/box/container.js
CHANGED
|
@@ -11,6 +11,7 @@ var _button = require("./button");
|
|
|
11
11
|
var l = _interopRequireWildcard(require("../../core/index"));
|
|
12
12
|
var c = _interopRequireWildcard(require("../../field/index"));
|
|
13
13
|
var _index3 = require("../../store/index");
|
|
14
|
+
var _index4 = require("../../connection/database/index");
|
|
14
15
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
15
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
17
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
@@ -109,7 +110,9 @@ var Container = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
109
110
|
return _createClass(Container, [{
|
|
110
111
|
key: "checkConnectionResolver",
|
|
111
112
|
value: function checkConnectionResolver(done) {
|
|
112
|
-
var
|
|
113
|
+
var _this$props = this.props,
|
|
114
|
+
contentProps = _this$props.contentProps,
|
|
115
|
+
screenName = _this$props.screenName;
|
|
113
116
|
var lock = contentProps.model;
|
|
114
117
|
var connectionResolver = l.connectionResolver(lock);
|
|
115
118
|
if (!connectionResolver) {
|
|
@@ -122,7 +125,13 @@ var Container = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
122
125
|
connections: connections,
|
|
123
126
|
id: id
|
|
124
127
|
};
|
|
125
|
-
|
|
128
|
+
|
|
129
|
+
// On signUp screen, use emailFirst option to prioritize email over username
|
|
130
|
+
// On login screen, use default behavior (username first)
|
|
131
|
+
var isSignUpScreen = screenName === 'main.signUp';
|
|
132
|
+
var userInputValue = (0, _index4.databaseUsernameValue)(lock, isSignUpScreen ? {
|
|
133
|
+
emailFirst: true
|
|
134
|
+
} : {});
|
|
126
135
|
connectionResolver(userInputValue, context, function (resolvedConnection) {
|
|
127
136
|
(0, _index3.swap)(_index3.updateEntity, 'lock', l.id(lock), function (m) {
|
|
128
137
|
return l.setResolvedConnection(m, resolvedConnection);
|
|
@@ -177,9 +186,9 @@ var Container = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
177
186
|
}, {
|
|
178
187
|
key: "handleClose",
|
|
179
188
|
value: function handleClose() {
|
|
180
|
-
var _this$
|
|
181
|
-
closeHandler = _this$
|
|
182
|
-
isSubmitting = _this$
|
|
189
|
+
var _this$props2 = this.props,
|
|
190
|
+
closeHandler = _this$props2.closeHandler,
|
|
191
|
+
isSubmitting = _this$props2.isSubmitting;
|
|
183
192
|
if (!isSubmitting) {
|
|
184
193
|
closeHandler();
|
|
185
194
|
}
|
|
@@ -187,9 +196,9 @@ var Container = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
187
196
|
}, {
|
|
188
197
|
key: "handleEsc",
|
|
189
198
|
value: function handleEsc() {
|
|
190
|
-
var _this$
|
|
191
|
-
closeHandler = _this$
|
|
192
|
-
escHandler = _this$
|
|
199
|
+
var _this$props3 = this.props,
|
|
200
|
+
closeHandler = _this$props3.closeHandler,
|
|
201
|
+
escHandler = _this$props3.escHandler;
|
|
193
202
|
escHandler ? escHandler() : this.handleClose();
|
|
194
203
|
}
|
|
195
204
|
}, {
|
|
@@ -202,35 +211,35 @@ var Container = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
202
211
|
}, {
|
|
203
212
|
key: "render",
|
|
204
213
|
value: function render() {
|
|
205
|
-
var _this$
|
|
206
|
-
autofocus = _this$
|
|
207
|
-
avatar = _this$
|
|
208
|
-
auxiliaryPane = _this$
|
|
209
|
-
backHandler = _this$
|
|
210
|
-
badgeLink = _this$
|
|
211
|
-
closeHandler = _this$
|
|
212
|
-
contentComponent = _this$
|
|
213
|
-
contentProps = _this$
|
|
214
|
-
disableSubmitButton = _this$
|
|
215
|
-
disallowClose = _this$
|
|
216
|
-
error = _this$
|
|
217
|
-
info = _this$
|
|
218
|
-
isMobile = _this$
|
|
219
|
-
isModal = _this$
|
|
220
|
-
isSubmitting = _this$
|
|
221
|
-
logo = _this$
|
|
222
|
-
primaryColor = _this$
|
|
223
|
-
screenName = _this$
|
|
224
|
-
showBadge = _this$
|
|
225
|
-
submitButtonLabel = _this$
|
|
226
|
-
submitHandler = _this$
|
|
227
|
-
success = _this$
|
|
228
|
-
tabs = _this$
|
|
229
|
-
terms = _this$
|
|
230
|
-
title = _this$
|
|
231
|
-
classNames = _this$
|
|
232
|
-
scrollGlobalMessagesIntoView = _this$
|
|
233
|
-
suppressSubmitOverlay = _this$
|
|
214
|
+
var _this$props4 = this.props,
|
|
215
|
+
autofocus = _this$props4.autofocus,
|
|
216
|
+
avatar = _this$props4.avatar,
|
|
217
|
+
auxiliaryPane = _this$props4.auxiliaryPane,
|
|
218
|
+
backHandler = _this$props4.backHandler,
|
|
219
|
+
badgeLink = _this$props4.badgeLink,
|
|
220
|
+
closeHandler = _this$props4.closeHandler,
|
|
221
|
+
contentComponent = _this$props4.contentComponent,
|
|
222
|
+
contentProps = _this$props4.contentProps,
|
|
223
|
+
disableSubmitButton = _this$props4.disableSubmitButton,
|
|
224
|
+
disallowClose = _this$props4.disallowClose,
|
|
225
|
+
error = _this$props4.error,
|
|
226
|
+
info = _this$props4.info,
|
|
227
|
+
isMobile = _this$props4.isMobile,
|
|
228
|
+
isModal = _this$props4.isModal,
|
|
229
|
+
isSubmitting = _this$props4.isSubmitting,
|
|
230
|
+
logo = _this$props4.logo,
|
|
231
|
+
primaryColor = _this$props4.primaryColor,
|
|
232
|
+
screenName = _this$props4.screenName,
|
|
233
|
+
showBadge = _this$props4.showBadge,
|
|
234
|
+
submitButtonLabel = _this$props4.submitButtonLabel,
|
|
235
|
+
submitHandler = _this$props4.submitHandler,
|
|
236
|
+
success = _this$props4.success,
|
|
237
|
+
tabs = _this$props4.tabs,
|
|
238
|
+
terms = _this$props4.terms,
|
|
239
|
+
title = _this$props4.title,
|
|
240
|
+
classNames = _this$props4.classNames,
|
|
241
|
+
scrollGlobalMessagesIntoView = _this$props4.scrollGlobalMessagesIntoView,
|
|
242
|
+
suppressSubmitOverlay = _this$props4.suppressSubmitOverlay;
|
|
234
243
|
var badge = showBadge ? /*#__PURE__*/_react.default.createElement(BottomBadge, {
|
|
235
244
|
link: badgeLink
|
|
236
245
|
}) : null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auth0-lock",
|
|
3
|
-
"version": "14.2.
|
|
3
|
+
"version": "14.2.1",
|
|
4
4
|
"description": "Auth0 Lock",
|
|
5
5
|
"author": "Auth0 <support@auth0.com> (http://auth0.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"i18n:validate": "node -r esm scripts/lang-audit.js"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@auth0/component-cdn-uploader": "^2.
|
|
43
|
+
"@auth0/component-cdn-uploader": "^2.4.2",
|
|
44
44
|
"@babel/core": "^7.0.0",
|
|
45
45
|
"@babel/eslint-parser": "^7.22.9",
|
|
46
46
|
"@babel/plugin-proposal-class-properties": "^7.0.0",
|
|
@@ -94,8 +94,7 @@
|
|
|
94
94
|
"grunt-webpack": "^5.0.0",
|
|
95
95
|
"husky": "^7.0.2",
|
|
96
96
|
"jest": "^29.3.1",
|
|
97
|
-
"jest-environment-jsdom": "^
|
|
98
|
-
"jest-environment-jsdom-global": "^4.0.0",
|
|
97
|
+
"jest-environment-jsdom": "^30.2.0",
|
|
99
98
|
"karma": "^6.4.1",
|
|
100
99
|
"karma-babel-preprocessor": "^8.0.2",
|
|
101
100
|
"karma-browserify": "^8.1.0",
|
|
@@ -119,7 +118,7 @@
|
|
|
119
118
|
"webpack-dev-server": "^4.11.1"
|
|
120
119
|
},
|
|
121
120
|
"dependencies": {
|
|
122
|
-
"auth0-js": "^9.
|
|
121
|
+
"auth0-js": "^9.29.0",
|
|
123
122
|
"auth0-password-policies": "^1.0.2",
|
|
124
123
|
"blueimp-md5": "^2.19.0",
|
|
125
124
|
"classnames": "^2.3.2",
|
|
@@ -135,7 +134,7 @@
|
|
|
135
134
|
"react-transition-group": "^2.2.1",
|
|
136
135
|
"trim": "^1.0.1",
|
|
137
136
|
"url-join": "^1.1.0",
|
|
138
|
-
"validator": "^13.
|
|
137
|
+
"validator": "^13.15.22"
|
|
139
138
|
},
|
|
140
139
|
"ccu": {
|
|
141
140
|
"name": "lock",
|
|
@@ -178,7 +177,7 @@
|
|
|
178
177
|
"lcov",
|
|
179
178
|
"text-summary"
|
|
180
179
|
],
|
|
181
|
-
"testEnvironment": "
|
|
180
|
+
"testEnvironment": "<rootDir>/customJsdomEnvironment.js"
|
|
182
181
|
},
|
|
183
182
|
"lint-staged": {
|
|
184
183
|
"*.{js,jsx}": [
|