Socket
Socket
Sign inDemoInstall

auth0-lock

Package Overview
Dependencies
Maintainers
39
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.26.1 to 11.26.2

lib/__tests__/connection/enterprise/actions.js

46

lib/connection/enterprise/actions.js
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
// TODO: enterprise connections should not depend on database
// connections. However, we now allow a username input to contain also
// an email and this information is in the database module. We should
// make this information flow from the UI (like we do for the startHRD
// function). Including this dependency here allows us to do that
// incrementally.
exports.startHRD = startHRD;

@@ -30,8 +41,2 @@ exports.cancelHRD = cancelHRD;

// TODO: enterprise connections should not depend on database
// connections. However, we now allow a username input to contain also
// an email and this information is in the database module. We should
// make this information flow from the UI (like we do for the startHRD
// function). Including this dependency here allows us to do that
// incrementally.
function cancelHRD(id) {

@@ -45,2 +50,7 @@ (0, _index.swap)(_index.updateEntity, 'lock', id, function (m) {

function getConnectionScopesFrom(m, connection) {
var connectionScopes = l.auth.connectionScopes(m);
return connectionScopes.get(connection.get('name'));
}
function logIn(id) {

@@ -50,11 +60,17 @@ var m = (0, _index.read)(_index.getEntity, 'lock', id);

var ssoConnection = (0, _enterprise.matchConnection)(m, email);
var enterpriseConnection = (0, _enterprise.enterpriseActiveFlowConnection)(m);
var connectionScopes = getConnectionScopesFrom(m, ssoConnection || enterpriseConnection);
var params = {
connection_scope: connectionScopes ? connectionScopes.toJS() : undefined
};
if (ssoConnection && !(0, _enterprise.isHRDActive)(m)) {
return logInSSO(id, ssoConnection);
return logInSSO(id, ssoConnection, params);
}
logInActiveFlow(id);
logInActiveFlow(id, params);
}
function logInActiveFlow(id) {
function logInActiveFlow(id, params) {
var m = (0, _index.read)(_index.getEntity, 'lock', id);

@@ -68,3 +84,3 @@ var usernameField = (0, _enterprise.isHRDActive)(m) || !(0, _index4.databaseLogInWithEmail)(m) ? 'username' : 'email';

(0, _actions.logIn)(id, ['password', usernameField], {
(0, _actions.logIn)(id, ['password', usernameField], _extends({}, params, {
connection: connection ? connection.get('name') : null,

@@ -74,8 +90,9 @@ username: username,

login_hint: username
});
}));
}
function logInSSO(id, connection) {
function logInSSO(id, connection, params) {
var m = (0, _index.read)(_index.getEntity, 'lock', id);
var field = (0, _index4.databaseLogInWithEmail)(m) ? 'email' : 'username';
l.emitEvent(m, 'sso login', {

@@ -86,6 +103,7 @@ lockID: id,

});
(0, _actions.logIn)(id, [field], {
(0, _actions.logIn)(id, [field], _extends({}, params, {
connection: connection.get('name'),
login_hint: (0, _index2.getFieldValue)(m, field)
});
}));
}

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

function getVersion() {
return '11.26.1';
return '11.26.2';
}

@@ -89,2 +89,6 @@ 'use strict';

return set(m, 'strings', defaultDictionary.mergeDeep(overrided));
},
recoverResult: m,
errorFn: function errorFn(m, error) {
l.warn(m, error.message + ' Falling back to default dictionary.');
}

@@ -120,3 +124,3 @@ });

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

@@ -123,0 +127,0 @@ return str && str === language;

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

exports.default = Auth0Lock;
Auth0Lock.version = '11.26.1';
Auth0Lock.version = '11.26.2';

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

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

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

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

@@ -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.26.1/lock.min.js"></script>
<script src="https://cdn.auth0.com/js/lock/11.26.2/lock.min.js"></script>
```

@@ -332,3 +332,3 @@

- **sso {Boolean}**: Determines whether Single Sign-On is enabled or not in **Lock**. The Auth0 SSO session will be created regardless of this option if SSO is enabled for your application or tenant.
- **connectionScopes {Object}**: Allows you to set scopes to be sent to the oauth2/social connection for authentication.
- **connectionScopes {Object}**: Allows you to set scopes to be sent to the oauth2/social/enterprise connection for authentication.

@@ -335,0 +335,0 @@ #### Database options

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

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