auth0-lock 14.2.4 → 14.3.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.
@@ -18,7 +18,10 @@ jobs:
18
18
  release:
19
19
  uses: ./.github/workflows/npm-release.yml
20
20
  with:
21
- node-version: 22
21
+ # Pinned to 22.22.1 — 22.22.2 has a regression (nodejs/node#62425) where
22
+ # the bundled npm is missing promise-retry, breaking npm install -g npm@11.
23
+ # Revert to node-version: 22 once the upstream fix is released.
24
+ node-version: 22.22.1
22
25
  require-build: true
23
26
  secrets:
24
27
  github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -56,4 +56,4 @@ jobs:
56
56
  run: npm run test:e2e
57
57
 
58
58
  - name: Upload coverage
59
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # pin@5.5.2
59
+ uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # pin@5.5.3
package/.version CHANGED
@@ -1 +1 @@
1
- v14.2.4
1
+ v14.3.0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Change Log
2
2
 
3
+ ## [v14.3.0](https://github.com/auth0/lock/tree/v14.3.0) (2026-04-06)
4
+ [Full Changelog](https://github.com/auth0/lock/compare/v14.2.5...v14.3.0)
5
+
6
+ **Added**
7
+ - feat(types): ship TypeScript definitions directly from the lock repo, supersedes `@types/auth0-lock` [\#2763](https://github.com/auth0/lock/pull/2763) ([ankita10119](https://github.com/ankita10119))
8
+
9
+ **Changed**
10
+ - chore(deps): upgrade webpack-dev-server to v5, auth0-password-policies to 3.1.0, and fix dev setup [\#2771](https://github.com/auth0/lock/pull/2771) ([ankita10119](https://github.com/ankita10119))
11
+
12
+ **Deprecated**
13
+ - chore: remove deprecated yammer, renren, miicard strategies [\#2747](https://github.com/auth0/lock/pull/2747) ([omarquazi-okta](https://github.com/omarquazi-okta))
14
+
15
+ **Fixed**
16
+ - Fix: TypeError in matchConnection and findADConnectionWithoutDomain for enterprise connections with null/undefined domains (#2749) [\#2758](https://github.com/auth0/lock/pull/2758) ([ankita10119](https://github.com/ankita10119))
17
+
18
+ ## [v14.2.5](https://github.com/auth0/lock/tree/v14.2.5) (2026-03-19)
19
+ [Full Changelog](https://github.com/auth0/lock/compare/v14.2.4...v14.2.5)
20
+
21
+ **Fixed**
22
+ - 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))
23
+ - Fix: TypeError in matchConnection for enterprise connections with no domains [\#2736](https://github.com/auth0/lock/pull/2736) ([ankita10119](https://github.com/ankita10119))
24
+
3
25
  ## [v14.2.4](https://github.com/auth0/lock/tree/v14.2.4) (2026-01-21)
4
26
  [Full Changelog](https://github.com/auth0/lock/compare/v14.2.3...v14.2.4)
5
27
 
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.4/lock.min.js"></script>
34
+ <script src="https://cdn.auth0.com/js/lock/14.3.0/lock.min.js"></script>
35
35
  ```
36
36
 
37
37
  ### Configure Auth0
@@ -0,0 +1,15 @@
1
+ const pkg = require('./package.json');
2
+ const coreJsVersion = pkg.devDependencies['core-js'].replace(/^\^/, '');
3
+
4
+ module.exports = {
5
+ plugins: [
6
+ 'version-inline',
7
+ 'transform-css-import-to-string',
8
+ 'babel-plugin-stylus-compiler',
9
+ '@babel/plugin-proposal-function-bind'
10
+ ],
11
+ presets: [
12
+ ['@babel/preset-env', { useBuiltIns: 'entry', corejs: coreJsVersion }],
13
+ '@babel/preset-react'
14
+ ]
15
+ };
@@ -0,0 +1,66 @@
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 field (key absent)', function () {
16
+ var _require = require('core/index'),
17
+ connections = _require.connections;
18
+
19
+ // Tenant omits the domains field entirely
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
+ expect(function () {
29
+ return (0, _enterprise.matchConnection)(m, 'test@example.com');
30
+ }).not.toThrow();
31
+ expect((0, _enterprise.matchConnection)(m, 'test@example.com')).toBeFalsy();
32
+ });
33
+ it('does not throw when enterprise connection has domains explicitly set to null', function () {
34
+ var _require2 = require('core/index'),
35
+ connections = _require2.connections;
36
+
37
+ // Tenant returns domains: null
38
+ connections.mockReturnValue(_immutable.default.fromJS([{
39
+ name: 'samlp-connection',
40
+ strategy: 'samlp',
41
+ type: 'enterprise',
42
+ domains: null
43
+ }]));
44
+ var m = _immutable.default.fromJS({
45
+ id: '__lock__'
46
+ });
47
+ expect(function () {
48
+ return (0, _enterprise.matchConnection)(m, 'test@example.com');
49
+ }).not.toThrow();
50
+ expect((0, _enterprise.matchConnection)(m, 'test@example.com')).toBeFalsy();
51
+ });
52
+ it('matches a connection when the email domain is in the domains list', function () {
53
+ var _require3 = require('core/index'),
54
+ connections = _require3.connections;
55
+ connections.mockReturnValue(_immutable.default.fromJS([{
56
+ name: 'samlp-connection',
57
+ strategy: 'samlp',
58
+ type: 'enterprise',
59
+ domains: ['example.com']
60
+ }]));
61
+ var m = _immutable.default.fromJS({
62
+ id: '__lock__'
63
+ });
64
+ expect((0, _enterprise.matchConnection)(m, 'user@example.com')).toBeTruthy();
65
+ });
66
+ });
@@ -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) {
@@ -128,7 +128,7 @@ function isADEnabled(m) {
128
128
  function findADConnectionWithoutDomain(m) {
129
129
  var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
130
130
  return l.connections(m, 'enterprise', 'ad', 'auth0-adldap').find(function (x) {
131
- return x.get('domains').isEmpty() && (!name || x.get('name') === name);
131
+ return (x.get('domains') || (0, _immutable.List)()).isEmpty() && (!name || x.get('name') === name);
132
132
  });
133
133
  }
134
134
  function findActiveFlowConnection(m) {
@@ -32,11 +32,9 @@ var STRATEGIES = exports.STRATEGIES = {
32
32
  'google-oauth2': 'Google',
33
33
  instagram: 'Instagram',
34
34
  linkedin: 'LinkedIn',
35
- miicard: 'miiCard',
36
35
  paypal: 'PayPal',
37
36
  'paypal-sandbox': 'PayPal Sandbox',
38
37
  planningcenter: 'Planning Center',
39
- renren: '人人',
40
38
  salesforce: 'Salesforce',
41
39
  'salesforce-community': 'Salesforce Community',
42
40
  'salesforce-sandbox': 'Salesforce (sandbox)',
@@ -53,7 +51,6 @@ var STRATEGIES = exports.STRATEGIES = {
53
51
  windowslive: 'Microsoft',
54
52
  wordpress: 'Wordpress',
55
53
  yahoo: 'Yahoo!',
56
- yammer: 'Yammer',
57
54
  yandex: 'Yandex',
58
55
  weibo: '新浪微博',
59
56
  line: 'Line'
@@ -169,5 +169,5 @@ function trimAuthParams() {
169
169
  return p;
170
170
  }
171
171
  function getVersion() {
172
- return "14.2.4";
172
+ return "14.3.0";
173
173
  }
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _auth0Js = _interopRequireDefault(require("auth0-js"));
8
8
  var _qs = _interopRequireDefault(require("qs"));
9
- var _cordovaAuth0PluginMin = _interopRequireDefault(require("auth0-js/dist/cordova-auth0-plugin.min.js"));
10
9
  var _helper = require("./helper");
11
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
11
  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); }
@@ -18,6 +17,10 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
18
17
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
19
18
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
20
19
  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); }
20
+ // require() used intentionally: cordova-auth0-plugin.min.js is a UMD bundle;
21
+ // webpack 5 cannot statically resolve a default export from module.exports,
22
+ // so import-default syntax would emit a warning.
23
+ var CordovaAuth0Plugin = require('auth0-js/dist/cordova-auth0-plugin.min.js');
21
24
  var Auth0APIClient = /*#__PURE__*/function () {
22
25
  function Auth0APIClient(lockID, clientID, domain, opts) {
23
26
  _classCallCheck(this, Auth0APIClient);
@@ -45,7 +48,7 @@ var Auth0APIClient = /*#__PURE__*/function () {
45
48
  responseMode: opts.responseMode,
46
49
  responseType: opts.responseType,
47
50
  leeway: opts.leeway || 60,
48
- plugins: opts.plugins || [new _cordovaAuth0PluginMin.default()],
51
+ plugins: opts.plugins || (typeof CordovaAuth0Plugin === 'function' ? [new CordovaAuth0Plugin()] : []),
49
52
  overrides: (0, _helper.webAuthOverrides)(opts.overrides),
50
53
  _sendTelemetry: opts._sendTelemetry === false ? false : true,
51
54
  _telemetryInfo: telemetry,