Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

auth0-lock

Package Overview
Dependencies
Maintainers
8
Versions
338
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auth0-lock - npm Package Compare versions

Comparing version 11.12.1 to 11.13.0

lib/i18n/he.js

14

CHANGELOG.md
# Change Log
## [v11.13.0](https://github.com/auth0/lock/tree/v11.13.0) (2019-01-15)
[Full Changelog](https://github.com/auth0/lock/compare/v11.12.1...v11.13.0)
**Added**
- Adding terms for passwordless [\#1424](https://github.com/auth0/lock/pull/1424) ([luisrudge](https://github.com/luisrudge))
**Changed**
- Don't use storage when inside the Universal Login Page (Auth0.js update) [\#1587](https://github.com/auth0/lock/pull/1587) ([luisrudge](https://github.com/luisrudge))
**Fixed**
- Fixed missing scroll issue for sign up [\#1566](https://github.com/auth0/lock/pull/1566) ([degrammer](https://github.com/degrammer))
## [v11.12.1](https://github.com/auth0/lock/tree/v11.12.1) (2018-11-23)

@@ -4,0 +18,0 @@ [Full Changelog](https://github.com/auth0/lock/compare/v11.12.0...v11.12.1)

21

lib/__tests__/connection/passwordless/passwordless.js

@@ -30,3 +30,4 @@ 'use strict';

setResendFailed: jest.fn(),
setResendSuccess: jest.fn()
setResendSuccess: jest.fn(),
toggleTermsAcceptance: jest.fn()
};

@@ -296,7 +297,21 @@ });

});
describe('toggleTermsAcceptance()', function () {
it('calls internalToggleTermsAcceptance()', function () {
actions.toggleTermsAcceptance('id');
var _require11 = require('store/index'),
swap = _require11.swap;
(0, _testUtils.expectMockToMatch)(swap, 1);
swap.mock.calls[0][3]('model');
(0, _testUtils.expectMockToMatch)(require('connection/passwordless/index').toggleTermsAcceptance, 1);
});
});
it('restart calls restartPasswordless', function () {
actions.restart('id');
var _require11 = require('store/index'),
swap = _require11.swap;
var _require12 = require('store/index'),
swap = _require12.swap;

@@ -303,0 +318,0 @@ (0, _testUtils.expectMockToMatch)(swap, 1);

@@ -14,2 +14,3 @@ 'use strict';

exports.restart = restart;
exports.toggleTermsAcceptance = toggleTermsAcceptance;

@@ -176,1 +177,5 @@ var _immutable = require('immutable');

}
function toggleTermsAcceptance(id) {
(0, _index.swap)(_index.updateEntity, 'lock', id, _index4.toggleTermsAcceptance);
}

@@ -19,2 +19,5 @@ 'use strict';

exports.isEmail = isEmail;
exports.mustAcceptTerms = mustAcceptTerms;
exports.termsAccepted = termsAccepted;
exports.toggleTermsAcceptance = toggleTermsAcceptance;

@@ -56,6 +59,6 @@ var _immutable = require('immutable');

// TODO: validate opts
var send = opts.passwordlessMethod === 'link' ? 'link' : 'code';
var mustAcceptTerms = !!opts.mustAcceptTerms;
m = initNS(m, (0, _immutable.Map)({ send: send }));
m = initNS(m, (0, _immutable.Map)({ send: send, mustAcceptTerms: mustAcceptTerms }));
if (opts.defaultLocation && typeof opts.defaultLocation === 'string') {

@@ -74,3 +77,2 @@ m = (0, _phone_number.initLocation)(m, opts.defaultLocation.toUpperCase());

}
return m;

@@ -153,1 +155,13 @@ }

}
function mustAcceptTerms(m) {
return get(m, 'mustAcceptTerms', false);
}
function termsAccepted(m) {
return !mustAcceptTerms(m) || tget(m, 'termsAccepted', false);
}
function toggleTermsAcceptance(m) {
return tset(m, 'termsAccepted', !termsAccepted(m));
}

2

lib/core/web_api/p2_api.js

@@ -34,3 +34,3 @@ 'use strict';

name: 'lock.js',
version: '11.12.1',
version: '11.13.0',
lib_version: _auth0Js2.default.version

@@ -37,0 +37,0 @@ };

@@ -25,2 +25,4 @@ 'use strict';

var _index = require('../../connection/passwordless/index');
var _actions = require('../../connection/passwordless/actions');

@@ -32,8 +34,12 @@

var _index = require('../../connection/social/index');
var _index2 = require('../../connection/social/index');
var _index2 = require('../../core/index');
var _index3 = require('../../core/index');
var l = _interopRequireWildcard(_index2);
var l = _interopRequireWildcard(_index3);
var _sign_up_terms = require('../../connection/database/sign_up_terms');
var _sign_up_terms2 = _interopRequireDefault(_sign_up_terms);
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; } }

@@ -51,3 +57,3 @@

var limit = l.connections(m, 'passwordless', 'email').count() === 0 ? 5 : 3;
return (0, _index.useBigButtons)(m, limit);
return (0, _index2.useBigButtons)(m, limit);
};

@@ -64,3 +70,4 @@

lock: model,
signUp: false
signUp: false,
disabled: !(0, _index.termsAccepted)(model)
}) : null;

@@ -117,2 +124,21 @@

SocialOrEmailLoginScreen.prototype.isSubmitDisabled = function isSubmitDisabled(m) {
return !(0, _index.termsAccepted)(m);
};
SocialOrEmailLoginScreen.prototype.renderTerms = function renderTerms(m, terms) {
var checkHandler = (0, _index.mustAcceptTerms)(m) ? function () {
return (0, _actions.toggleTermsAcceptance)(l.id(m));
} : undefined;
return terms || (0, _index.mustAcceptTerms)(m) ? _react2.default.createElement(
_sign_up_terms2.default,
{
showCheckbox: (0, _index.mustAcceptTerms)(m),
checkHandler: checkHandler,
checked: (0, _index.termsAccepted)(m)
},
terms
) : null;
};
return SocialOrEmailLoginScreen;

@@ -119,0 +145,0 @@ }(_screen2.default);

@@ -37,2 +37,8 @@ 'use strict';

var _index4 = require('../../connection/passwordless/index');
var _sign_up_terms = require('../../connection/database/sign_up_terms');
var _sign_up_terms2 = _interopRequireDefault(_sign_up_terms);
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; } }

@@ -62,3 +68,4 @@

lock: model,
signUp: false
signUp: false,
disabled: !(0, _index4.termsAccepted)(model)
}) : null;

@@ -106,2 +113,21 @@

AskSocialNetworkOrPhoneNumber.prototype.isSubmitDisabled = function isSubmitDisabled(m) {
return !(0, _index4.termsAccepted)(m);
};
AskSocialNetworkOrPhoneNumber.prototype.renderTerms = function renderTerms(m, terms) {
var checkHandler = (0, _index4.mustAcceptTerms)(m) ? function () {
return (0, _actions.toggleTermsAcceptance)(l.id(m));
} : undefined;
return terms || (0, _index4.mustAcceptTerms)(m) ? _react2.default.createElement(
_sign_up_terms2.default,
{
showCheckbox: (0, _index4.mustAcceptTerms)(m),
checkHandler: checkHandler,
checked: (0, _index4.termsAccepted)(m)
},
terms
) : null;
};
return AskSocialNetworkOrPhoneNumber;

@@ -108,0 +134,0 @@ }(_screen2.default);

@@ -119,3 +119,3 @@ 'use strict';

method: 'registerLanguageDictionary',
url: l.languageBaseUrl(m) + '/js/lock/' + '11.12.1' + '/' + language + '.js',
url: l.languageBaseUrl(m) + '/js/lock/' + '11.13.0' + '/' + language + '.js',
check: function check(str) {

@@ -122,0 +122,0 @@ return str && str === language;

@@ -40,3 +40,3 @@ 'use strict';

exports.default = Auth0Lock;
Auth0Lock.version = '11.12.1';
Auth0Lock.version = '11.13.0';

@@ -43,0 +43,0 @@ // TODO: should we have different telemetry for classic/passwordless?

@@ -39,2 +39,2 @@ 'use strict';

Auth0LockPasswordless.version = '11.12.1';
Auth0LockPasswordless.version = '11.13.0';
{
"name": "auth0-lock",
"version": "11.12.1",
"version": "11.13.0",
"description": "Auth0 Lock",

@@ -92,3 +92,3 @@ "author": "Auth0 <support@auth0.com> (http://auth0.com)",

"dependencies": {
"auth0-js": "^9.8.2",
"auth0-js": "^9.9.0",
"auth0-password-policies": "^1.0.2",

@@ -95,0 +95,0 @@ "blueimp-md5": "2.3.1",

@@ -26,3 +26,3 @@ [![NPM version][npm-image]][npm-url]

<!-- Latest patch release (recommended for production) -->
<script src="https://cdn.auth0.com/js/lock/11.12.1/lock.min.js"></script>
<script src="https://cdn.auth0.com/js/lock/11.13.0/lock.min.js"></script>
```

@@ -415,3 +415,3 @@

A `validator` function can also be provided.
A `validator` function can also be provided.

@@ -434,5 +434,16 @@ ```js

}]
}
};
```
If you don't provide a `validator` function a default validator is applied, which requires the text field to contain some value (be non-empty). You can make a field optional by using a validator that always return `true`:
```js
var options = {
additionalSignUpFields: [{
name: "address",
placeholder: "enter your address (optional)",
validator: function() {return true;}
}]
};
```
##### Select field

@@ -439,0 +450,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc