auth0-lock 11.32.1 → 11.32.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Change Log
2
2
 
3
+ ## [v11.32.2](https://github.com/auth0/lock/tree/v11.32.2) (2022-02-08)
4
+ [Full Changelog](https://github.com/auth0/lock/compare/v11.32.1...v11.32.2)
5
+
6
+ **Changed**
7
+ - align german loginWithLabel translation with Apple Guidelines [\#2097](https://github.com/auth0/lock/pull/2097) ([Steffen911](https://github.com/Steffen911))
8
+
9
+ **Fixed**
10
+ - [SDK-3087] Captcha for single enterprise AD connections [\#2096](https://github.com/auth0/lock/pull/2096) ([stevehobbsdev](https://github.com/stevehobbsdev))
11
+
12
+ **Security**
13
+ - [Snyk] Upgrade qs from 6.10.2 to 6.10.3 [\#2095](https://github.com/auth0/lock/pull/2095) ([snyk-bot](https://github.com/snyk-bot))
14
+ - Bump cached-path-relative from 1.0.2 to 1.1.0 [\#2091](https://github.com/auth0/lock/pull/2091) ([dependabot[bot]](https://github.com/apps/dependabot))
15
+
3
16
  ## [v11.32.1](https://github.com/auth0/lock/tree/v11.32.1) (2022-01-27)
4
17
  [Full Changelog](https://github.com/auth0/lock/compare/v11.32.0...v11.32.1)
5
18
 
package/README.md CHANGED
@@ -25,7 +25,7 @@ From CDN
25
25
 
26
26
  ```html
27
27
  <!-- Latest patch release (recommended for production) -->
28
- <script src="https://cdn.auth0.com/js/lock/11.32.1/lock.min.js"></script>
28
+ <script src="https://cdn.auth0.com/js/lock/11.32.2/lock.min.js"></script>
29
29
  ```
30
30
 
31
31
  From [npm](https://npmjs.org)
@@ -139,7 +139,7 @@ describe('Login with connection scopes', function () {
139
139
  username: 'test',
140
140
  password: 'test',
141
141
  login_hint: 'test'
142
- });
142
+ }, expect.any(Function));
143
143
  });
144
144
  });
145
145
  });
@@ -0,0 +1,55 @@
1
+ 'use strict';
2
+
3
+ var _react = require('react');
4
+
5
+ var _react2 = _interopRequireDefault(_react);
6
+
7
+ var _testUtils = require('testUtils');
8
+
9
+ var _immutable = require('immutable');
10
+
11
+ var _immutable2 = _interopRequireDefault(_immutable);
12
+
13
+ var _i18n = require('../../../i18n');
14
+
15
+ var i18n = _interopRequireWildcard(_i18n);
16
+
17
+ var _hrd_pane = require('../../../connection/enterprise/hrd_pane');
18
+
19
+ var _hrd_pane2 = _interopRequireDefault(_hrd_pane);
20
+
21
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
22
+
23
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
+
25
+ var lock = _immutable2.default.fromJS({ id: '__lock-id__' });
26
+
27
+ jest.mock('core/index');
28
+
29
+ describe('HRDPane', function () {
30
+ var defaultProps = {
31
+ model: lock,
32
+ header: _react2.default.createElement('header', null),
33
+ i18n: i18n,
34
+ passwordInputPlaceholder: 'password',
35
+ usernameInputPlaceholder: 'username'
36
+ };
37
+
38
+ beforeEach(function () {
39
+ jest.resetAllMocks();
40
+ });
41
+
42
+ it('renders correctly', function () {
43
+ (0, _testUtils.expectShallowComponent)(_react2.default.createElement(_hrd_pane2.default, defaultProps)).toMatchSnapshot();
44
+ });
45
+
46
+ it('renders the captcha if required', function () {
47
+ require('core/index').captcha.mockReturnValue({
48
+ get: function get() {
49
+ return true;
50
+ }
51
+ });
52
+
53
+ (0, _testUtils.expectShallowComponent)(_react2.default.createElement(_hrd_pane2.default, defaultProps)).toMatchSnapshot();
54
+ });
55
+ });
@@ -93,7 +93,10 @@ function logInActiveFlow(id, params) {
93
93
  username: username,
94
94
  password: (0, _index2.getFieldValue)(m, 'password'),
95
95
  login_hint: username
96
- }));
96
+ }), function (id, error, fields, next) {
97
+ var wasCaptchaInvalid = error && error.code === 'invalid captcha';
98
+ (0, _captcha.swapCaptcha)(id, wasCaptchaInvalid, next);
99
+ });
97
100
  }
98
101
 
99
102
  function logInSSO(id, connection, params) {
@@ -18,6 +18,12 @@ var _password_pane = require('../../field/password/password_pane');
18
18
 
19
19
  var _password_pane2 = _interopRequireDefault(_password_pane);
20
20
 
21
+ var _captcha_pane = require('../../field/captcha/captcha_pane');
22
+
23
+ var _captcha_pane2 = _interopRequireDefault(_captcha_pane);
24
+
25
+ var _captcha = require('../captcha');
26
+
21
27
  var _index = require('../../core/index');
22
28
 
23
29
  var l = _interopRequireWildcard(_index);
@@ -50,6 +56,10 @@ var HRDPane = function (_React$Component) {
50
56
  usernameInputPlaceholder = _props.usernameInputPlaceholder;
51
57
 
52
58
 
59
+ var captchaPane = l.captcha(model) && l.captcha(model).get('required') ? _react2.default.createElement(_captcha_pane2.default, { i18n: i18n, lock: model, onReload: function onReload() {
60
+ return (0, _captcha.swapCaptcha)(l.id(model), false);
61
+ } }) : null;
62
+
53
63
  return _react2.default.createElement(
54
64
  'div',
55
65
  null,
@@ -61,7 +71,8 @@ var HRDPane = function (_React$Component) {
61
71
  validateFormat: false,
62
72
  strictValidation: false
63
73
  }),
64
- _react2.default.createElement(_password_pane2.default, { i18n: i18n, lock: model, placeholder: passwordInputPlaceholder })
74
+ _react2.default.createElement(_password_pane2.default, { i18n: i18n, lock: model, placeholder: passwordInputPlaceholder }),
75
+ captchaPane
65
76
  );
66
77
  };
67
78
 
@@ -176,5 +176,5 @@ function trimAuthParams() {
176
176
  }
177
177
 
178
178
  function getVersion() {
179
- return '11.32.1';
179
+ return '11.32.2';
180
180
  }
package/lib/i18n/de.js CHANGED
@@ -77,7 +77,7 @@ exports.default = {
77
77
  loginAtLabel: 'Anmelden bei %s',
78
78
  loginLabel: 'Anmelden',
79
79
  loginSubmitLabel: 'Anmelden',
80
- loginWithLabel: 'Anmelden mit %s',
80
+ loginWithLabel: 'Mit %s anmelden',
81
81
  notYourAccountAction: 'Falsches Konto?',
82
82
  passwordInputPlaceholder: 'Ihr Passwort',
83
83
  passwordStrength: {
package/lib/i18n.js CHANGED
@@ -125,7 +125,7 @@ function assertLanguage(m, language, base) {
125
125
  function syncLang(m, language, _cb) {
126
126
  (0, _cdn_utils.load)({
127
127
  method: 'registerLanguageDictionary',
128
- url: l.languageBaseUrl(m) + '/js/lock/' + '11.32.1' + '/' + language + '.js',
128
+ url: l.languageBaseUrl(m) + '/js/lock/' + '11.32.2' + '/' + language + '.js',
129
129
  check: function check(str) {
130
130
  return str && str === language;
131
131
  },
package/lib/lock.js CHANGED
@@ -42,7 +42,7 @@ var Auth0Lock = function (_Core) {
42
42
 
43
43
 
44
44
  exports.default = Auth0Lock;
45
- Auth0Lock.version = '11.32.1';
45
+ Auth0Lock.version = '11.32.2';
46
46
 
47
47
  // TODO: should we have different telemetry for classic/passwordless?
48
48
  // TODO: should we set telemetry info before each request?
@@ -41,4 +41,4 @@ var Auth0LockPasswordless = function (_Core) {
41
41
  exports.default = Auth0LockPasswordless;
42
42
 
43
43
 
44
- Auth0LockPasswordless.version = '11.32.1';
44
+ Auth0LockPasswordless.version = '11.32.2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auth0-lock",
3
- "version": "11.32.1",
3
+ "version": "11.32.2",
4
4
  "description": "Auth0 Lock",
5
5
  "author": "Auth0 <support@auth0.com> (http://auth0.com)",
6
6
  "license": "MIT",
@@ -115,7 +115,7 @@
115
115
  "node-fetch": "^2.6.7",
116
116
  "password-sheriff": "^1.1.1",
117
117
  "prop-types": "^15.8.0",
118
- "qs": "^6.10.2",
118
+ "qs": "^6.10.3",
119
119
  "react": "^15.6.2",
120
120
  "react-dom": "^15.6.2",
121
121
  "react-transition-group": "^2.2.1",