auth0-lock 14.2.5 → 15.0.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@e79a6962e0d4c0c17b229090214935d2e33f8354 # pin@6.0.1
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ ./node_modules/.bin/lint-staged
package/.version CHANGED
@@ -1 +1 @@
1
- v14.2.5
1
+ v15.0.0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # Change Log
2
2
 
3
+ ## [v15.0.0](https://github.com/auth0/lock/tree/v15.0.0) (2026-06-05)
4
+ [Full Changelog](https://github.com/auth0/lock/compare/v14.3.0...v15.0.0)
5
+
6
+ ### Highlights
7
+
8
+ This release upgrades `auth0-js` to [v10.0.0](https://github.com/auth0/auth0.js/releases/tag/v10.0.0), which resolves [CVE-2026-42280](https://www.cve.org/CVERecord?id=CVE-2026-42280) — a security vulnerability in token validation for browser-based applications.
9
+
10
+ **⚠️ Breaking Changes**
11
+
12
+ - feat!: upgrade auth0-js from v9 to v10 [\#2810](https://github.com/auth0/lock/pull/2810) ([cschetan77](https://github.com/cschetan77))
13
+
14
+ **HS256 is no longer supported.** Applications configured with HS256 as the JWT Signature Algorithm will see `parseHash()` return an `invalid_token` error. HS256 requires the client secret to be present in the browser to verify tokens, which is a security vulnerability. Applications using RS256 are not affected.
15
+
16
+ **Migration:** Switch to RS256 before upgrading:
17
+ > Auth0 Dashboard → Applications → [Your App] → Settings → Advanced Settings → OAuth → JsonWebToken Signature Algorithm → **RS256**
18
+
19
+ **Changed**
20
+
21
+ - fix(deps): remove `trim` dependency [\#2783](https://github.com/auth0/lock/pull/2783) ([gameroman](https://github.com/gameroman))
22
+
23
+ The third-party `trim` package has been removed. All string trimming now uses the native `String.prototype.trim()` method, which has been available in all supported browsers and Node.js versions for many years. This removes one dependency from the shipped package with no change in behaviour.
24
+
25
+ ## [v14.3.0](https://github.com/auth0/lock/tree/v14.3.0) (2026-04-06)
26
+ [Full Changelog](https://github.com/auth0/lock/compare/v14.2.5...v14.3.0)
27
+
28
+ **Added**
29
+ - 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))
30
+
31
+ **Changed**
32
+ - 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))
33
+
34
+ **Deprecated**
35
+ - chore: remove deprecated yammer, renren, miicard strategies [\#2747](https://github.com/auth0/lock/pull/2747) ([omarquazi-okta](https://github.com/omarquazi-okta))
36
+
37
+ **Fixed**
38
+ - 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))
39
+
3
40
  ## [v14.2.5](https://github.com/auth0/lock/tree/v14.2.5) (2026-03-19)
4
41
  [Full Changelog](https://github.com/auth0/lock/compare/v14.2.4...v14.2.5)
5
42
 
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.5/lock.min.js"></script>
34
+ <script src="https://cdn.auth0.com/js/lock/15.0.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
+ };
@@ -12,11 +12,11 @@ describe('matchConnection', function () {
12
12
  afterEach(function () {
13
13
  return jest.resetAllMocks();
14
14
  });
15
- it('does not throw when enterprise connection has no domains configured', function () {
15
+ it('does not throw when enterprise connection has no domains field (key absent)', function () {
16
16
  var _require = require('core/index'),
17
17
  connections = _require.connections;
18
18
 
19
- // Simulate tenant endpoint returning a connection with no domains field
19
+ // Tenant omits the domains field entirely
20
20
  connections.mockReturnValue(_immutable.default.fromJS([{
21
21
  name: 'samlp-connection',
22
22
  strategy: 'samlp',
@@ -25,10 +25,42 @@ describe('matchConnection', function () {
25
25
  var m = _immutable.default.fromJS({
26
26
  id: '__lock__'
27
27
  });
28
- var result;
29
28
  expect(function () {
30
- result = (0, _enterprise.matchConnection)(m, 'test@example.com');
29
+ return (0, _enterprise.matchConnection)(m, 'test@example.com');
31
30
  }).not.toThrow();
32
- expect(result).toBeFalsy();
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();
33
65
  });
34
66
  });
@@ -6,13 +6,12 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.displayName = displayName;
7
7
  exports.url = url;
8
8
  var _blueimpMd = _interopRequireDefault(require("blueimp-md5"));
9
- var _trim = _interopRequireDefault(require("trim"));
10
9
  var _jsonp_utils = _interopRequireDefault(require("../utils/jsonp_utils"));
11
10
  var _email = require("../field/email");
12
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
12
  var md5 = _blueimpMd.default.md5 || _blueimpMd.default;
14
13
  function normalize(str) {
15
- return typeof str === 'string' ? (0, _trim.default)(str.toLowerCase()) : '';
14
+ return typeof str === 'string' ? str.toLowerCase().trim() : '';
16
15
  }
17
16
  function displayName(email, cb) {
18
17
  email = normalize(email);
@@ -38,7 +38,6 @@ var l = _interopRequireWildcard(require("../../core/index"));
38
38
  var _index2 = require("../../field/index");
39
39
  var _data_utils = require("../../utils/data_utils");
40
40
  var _sync = _interopRequireDefault(require("../../sync"));
41
- var _trim = _interopRequireDefault(require("trim"));
42
41
  var _tenant = require("../../core/tenant");
43
42
  var _enterprise = require("../../connection/enterprise");
44
43
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -66,7 +65,7 @@ function assertMaybeEnum(opts, name, a) {
66
65
  return valid;
67
66
  }
68
67
  function assertMaybeString(opts, name) {
69
- var valid = opts[name] === undefined || typeof opts[name] === 'string' && (0, _trim.default)(opts[name]).length > 0;
68
+ var valid = opts[name] === undefined || typeof opts[name] === 'string' && opts[name].trim().length > 0;
70
69
  if (!valid) l.warn(opts, "The `".concat(name, "` option will be ignored, because it is not a non-empty string."));
71
70
  return valid;
72
71
  }
@@ -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', (0, _immutable.List)()).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'
package/lib/core/index.js CHANGED
@@ -81,7 +81,6 @@ var _media_utils = require("../utils/media_utils");
81
81
  var _string_utils = require("../utils/string_utils");
82
82
  var _url_utils = require("../utils/url_utils");
83
83
  var i18n = _interopRequireWildcard(require("../i18n"));
84
- var _trim = _interopRequireDefault(require("trim"));
85
84
  var gp = _interopRequireWildcard(require("../avatar/gravatar_provider"));
86
85
  var _data_utils = require("../utils/data_utils");
87
86
  var _index = require("./client/index");
@@ -243,7 +242,7 @@ function extractUIOptions(id, options) {
243
242
  closable: closable,
244
243
  hideMainScreenTitle: !!hideMainScreenTitle,
245
244
  labeledSubmitButton: undefined === labeledSubmitButton ? true : !!labeledSubmitButton,
246
- language: undefined === options.language ? 'en' : (0, _trim.default)(options.language || '').toLowerCase(),
245
+ language: undefined === options.language ? 'en' : (options.language || '').trim().toLowerCase(),
247
246
  dict: _typeof(options.languageDictionary) === 'object' ? options.languageDictionary : {},
248
247
  disableWarnings: options.disableWarnings === undefined ? false : !!options.disableWarnings,
249
248
  mobile: undefined === options.mobile ? false : !!options.mobile,
@@ -169,5 +169,5 @@ function trimAuthParams() {
169
169
  return p;
170
170
  }
171
171
  function getVersion() {
172
- return "14.2.5";
172
+ return "15.0.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 || (typeof _cordovaAuth0PluginMin.default === 'function' ? [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,