function Auth0Lock(clientID, domain, options) { _classCallCheck(this, Auth0Lock); var _this = _possibleConstructorReturn(this, _Core.call(this, clientID, domain, options, _classic2.default)); injectStyles(); return _this; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function closeLock(id) { var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var callback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {}; // Do nothing when the Lock can't be closed, unless closing is forced. var m = (0, _index.read)(_index.getEntity, "lock", id); if (!l.ui.closable(m) && !force || !l.rendering(m)) { return; } l.emitEvent(m, "hide"); // If it is a modal, stop rendering an reset after a second, // otherwise just reset. if (l.ui.appendContainer(m)) { (0, _index.swap)(_index.updateEntity, "lock", id, l.stopRendering); setTimeout(function () { (0, _index.swap)(_index.updateEntity, "lock", id, function (m) { m = (0, _index3.hideInvalidFields)(m); m = l.reset(m); m = (0, _index3.clearFields)(m); return m; }); m = (0, _index.read)(_index.getEntity, "lock", id); callback(m); }, 1000); } else { (0, _index.swap)(_index.updateEntity, "lock", id, function (m) { m = (0, _index3.hideInvalidFields)(m); m = l.reset(m); m = (0, _index3.clearFields)(m); return m; }); callback(m); } }
n/a
function handleAuthCallback() { var ms = (0, _index.read)(_index.getCollection, "lock"); var keepHash = ms.filter(function (m) { return !l.hashCleanup(m); }).size > 0; var callback = function callback(error, authResult) { var parsed = !!(error || authResult); if (parsed && !keepHash) { global.location.hash = ""; } }; resumeAuth(global.location.hash, callback); }
n/a
function logIn(id, fields) { var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var logInErrorHandler = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : function (_id, error, _fields, next ) { return next(); }; validateAndSubmit(id, fields, function (m) { _web_api2.default.logIn(id, params, l.auth.params(m).toJS(), function (error, result) { if (error) { setTimeout(function () { return logInError(id, fields, error, logInErrorHandler); }, 250); } else { logInSuccess(id, result); } }); }); }
...
var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var logInErrorHandler = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : function (_id, error,
_fields, next) {
return next();
};
validateAndSubmit(id, fields, function (m) {
_web_api2.default.logIn(id, params, l.auth.params(m).toJS(), function (error, result
) {
if (error) {
setTimeout(function () {
return logInError(id, fields, error, logInErrorHandler);
}, 250);
} else {
logInSuccess(id, result);
}
...
function logInSuccess(id, result) { var m = (0, _index.read)(_index.getEntity, "lock", id); if (!l.ui.autoclose(m)) { (0, _index.swap)(_index.updateEntity, "lock", id, function (m) { m = l.setSubmitting(m, false); return l.setLoggedIn(m, true); }); l.emitAuthenticatedEvent(m, result); } else { closeLock(id, false, function (m1) { return l.emitAuthenticatedEvent(m1, result); }); } }
n/a
function openLock(id, opts) { var m = (0, _index.read)(_index.getEntity, "lock", id); if (!m) { throw new Error("The Lock can't be opened again after it has been destroyed"); } if (l.rendering(m)) { return false; } if (opts.flashMessage) { if (!opts.flashMessage.type || ['error', 'success'].indexOf(opts.flashMessage.type) === -1) { return l.emitUnrecoverableErrorEvent(m, "'flashMessage' must provide a valid type ['error','success']"); } if (!opts.flashMessage.text) { return l.emitUnrecoverableErrorEvent(m, "'flashMessage' must provide a text"); } } l.emitEvent(m, "show"); (0, _index.swap)(_index.updateEntity, "lock", id, function (m) { m = l.overrideOptions(m, opts); m = l.filterConnections(m); m = l.runHook(m, "willShow", opts); return l.render(m); }); return true; }
n/a
function pinLoadingPane(id) { var lock = (0, _index.read)(_index.getEntity, "lock", id); if (!lock.get("isLoadingPanePinned")) { (0, _index.swap)(_index.updateEntity, "lock", id, function (m) { return m.set("isLoadingPanePinned", true); }); } }
n/a
function removeLock(id) { (0, _index.swap)(_index.updateEntity, "lock", id, l.stopRendering); (0, _index.swap)(_index.removeEntity, "lock", id); }
n/a
function resumeAuth(hash, callback) { var ms = (0, _index.read)(_index.getCollection, "lock"); ms.forEach(function (m) { return l.auth.redirect(m) && parseHash(m, hash, callback); }); }
...
If you set the [auth.autoParseHash](#authentication-options) option to `false`, you'll need to call this method to complete
the authentication flow. This method is useful when you're using a client-side router that uses a `#` to handle urls (angular2
with `useHash` or react-router with `hashHistory`).
- **hash {String}**: The hash fragment received from the redirect.
- **callback {Function}**: Will be invoked after the parse is done. Has an error (if any) as the first argument and the authentication
result as the second one. If there is no hash available, both arguments will be `null`.
#### Example
```js
lock.resumeAuth(hash, function(error, authResult) {
if (error) {
alert("Could not parse hash");
}
console.log(authResult.accessToken);
});
```
...
function setupLock(id, clientID, domain, options, hookRunner, emitEventFn) { var m = l.setup(id, clientID, domain, options, hookRunner, emitEventFn); m = (0, _remote_data.syncRemoteData)(m); (0, _preload_utils.img)(l.ui.logo(m) || _container.defaultProps.logo); _web_api2.default.setupClient(id, clientID, domain, l.withAuthOptions(m, _extends({}, options, { popupOptions: l.ui.popupOptions(m) }))); m = l.runHook(m, "didInitialize", options); (0, _index.swap)(_index.setEntity, "lock", id, m); return m; }
n/a
function unpinLoadingPane(id) { (0, _index.swap)(_index.updateEntity, "lock", id, function (m) { return m.set("isLoadingPanePinned", false); }); }
n/a
function updateLock(id, f) { return (0, _index.swap)(_index.updateEntity, "lock", id, f); }
n/a
function validateAndSubmit(id) { var fields = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var f = arguments[2]; (0, _index.swap)(_index.updateEntity, "lock", id, function (m) { var allFieldsValid = fields.reduce(function (r, x) { return r && (0, _index3.isFieldValid)(m, x); }, true); return allFieldsValid ? l.setSubmitting(m, true) : fields.reduce(function (r, x) { return (0, _index3.showInvalidField)(r, x); }, m); }); var m = (0, _index.read)(_index.getEntity, "lock", id); if (l.submitting(m)) { f(m); } }
n/a
function VcodeScreen() { _classCallCheck(this, VcodeScreen); return _possibleConstructorReturn(this, _Screen.call(this, "vcode")); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function atom(state) { return new Atom(state); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function AuthButton(props) { var disabled = props.disabled, isBig = props.isBig, label = props.label, onClick = props.onClick, strategy = props.strategy, icon = props.icon, primaryColor = props.primaryColor, foregroundColor = props.foregroundColor; var className = "auth0-lock-social-button"; if (isBig) className += " auth0-lock-social-big-button"; var backgroundStyle = primaryColor ? { backgroundColor: primaryColor } : {}; var foregroundStyle = foregroundColor ? { color: foregroundColor } : {}; var iconStyle = icon ? { backgroundImage: "url('" + icon + "')" } : {}; return _react2.default.createElement( "button", { className: className, "data-provider": strategy, disabled: disabled, onClick: onClick, style: backgroundStyle, type: "button" }, _react2.default.createElement("div", { className: "auth0-lock-social-button-icon", style: iconStyle }), _react2.default.createElement( "div", { className: "auth0-lock-social-button-text", style: foregroundStyle }, label ) ); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
debouncedRequestAvatar = function () { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } function handler() { clearTimeout(t); f.apply(undefined, args); } clearTimeout(t); t = setTimeout(handler, delay); }
n/a
function requestAvatar(id, src) { if (cache[src]) { return update(id, src, cache[src].url, cache[src].displayName, true); } var provider = l.ui.avatarProvider((0, _index.read)(_index.getEntity, "lock", id)).toJS(); (0, _index.swap)(_index.updateEntity, "lock", id, function (m) { m = tset(m, "syncStatus", "loading"); m = tset(m, "src", src); return m; }); var url = void 0, displayName = void 0; provider.url(src, function (error, str) { if (error) return handleError(id, src); preload.img(str, function (error, img) { if (error) return handleError(id, src); url = img.src; if (displayName !== undefined) handleSuccess(id, src, url, displayName); }); }); provider.displayName(src, function (error, str) { if (error) return handleError(id); displayName = str; if (url !== undefined) handleSuccess(id, src, url, displayName); }); }
n/a
function remove() { return renderer.remove.apply(renderer, arguments); }
...
set: setFn(baseNSKeyPath),
remove: removeFn(baseNSKeyPath),
tget: getFn(transientNSKeyPath),
tset: setFn(transientNSKeyPath),
tremove: removeFn(transientNSKeyPath),
reset: function reset(m) {
return m.map(function (x) {
return _immutable.Map.isMap(x) ? x.remove("transient") : x;
});
},
init: function init(id, m) {
return new _immutable.Map({ id: id }).setIn(baseNSKeyPath, m);
},
initNS: function initNS(m, ns) {
return m.setIn(baseNSKeyPath, ns);
...
function render() { return renderer.render.apply(renderer, arguments); }
...
return handler.apply(undefined, [l.id(m)].concat(args));
} : handler;
};
var avatar = l.ui.avatar(m) && m.getIn(["avatar", "transient", "syncStatus"]) ===
x22;ok" || null;
if (l.rendering(m)) {
var screen = _this.engine.render(m);
var title = avatar ? i18n.str(m, "welcome", m.getIn(["avatar", "transient", "displayName"
;])) : screen.getTitle(m);
var disableSubmitButton = screen.isSubmitDisabled(m);
var i18nProp = {
group: function group(keyPath) {
...
function BackButton(_ref3) { var onClick = _ref3.onClick; return _react2.default.createElement(IconButton, { name: 'back', svg: svgs["back"], onClick: onClick }); }
n/a
function CloseButton(_ref2) { var onClick = _ref2.onClick; return _react2.default.createElement(IconButton, { name: 'close', svg: svgs["close"], onClick: onClick }); }
n/a
function Cache(fetchFn) { _classCallCheck(this, Cache); this.cache = {}; this.cbs = {}; this.fetchFn = fetchFn; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function load(attrs) { var cb = attrs.cb, check = attrs.check, method = attrs.method, url = attrs.url; if (!cbs[method]) { cbs[method] = []; global.Auth0[method] = function () { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } cbs[method] = cbs[method].filter(function (x) { if (x.check.apply(x, args)) { setTimeout(function () { return x.cb.apply(x, [null].concat(args)); }, 0); return false; } else { return true; } }); }; } cbs[method].push({ cb: cb, check: check, url: url }); var count = cbs[method].reduce(function (r, x) { return r + (x.url === url ? 1 : 0); }, 0); if (count > 1) return; var script = global.document.createElement('script'); script.src = url; global.document.getElementsByTagName('head')[0].appendChild(script); var handleError = function handleError(url) { cbs[method] = cbs[method].filter(function (x) { if (x.url === url) { setTimeout(function () { return x.cb({}); }, 0); return false; } else { return true; } }); }; var timeoutID = setTimeout(function () { return handleError(url); }, 5000); script.addEventListener('load', function () { return clearTimeout(timeoutID); }); script.addEventListener('error', function () { clearTimeout(timeoutID); handleError(url); }); }
n/a
function preload(_ref) { var method = _ref.method, cb = _ref.cb; global.Auth0[method] = cb; }
...
popup = _authOpt.popup,
sso = _authOpt.sso;
var autoLogin = options.autoLogin;
delete options.autoLogin;
var popupHandler = autoLogin && popup ? this.client.popup.preload() : null
;
this.client.signup(options, function (err, result) {
return cb(err, result, popupHandler);
});
};
Auth0LegacyAPIClient.prototype.resetPassword = function resetPassword(options, cb) {
...
function CheckboxInput() { _classCallCheck(this, CheckboxInput); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function Chrome(props) { _classCallCheck(this, Chrome); var _this2 = _possibleConstructorReturn(this, _React$Component2.call(this, props)); _this2.state = { moving: false, reverse: false }; return _this2; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function hasOnlyClassicConnections(m) { var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; for (var _len = arguments.length, strategies = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { strategies[_key - 2] = arguments[_key]; } return l.hasOnlyConnections.apply(l, [m, type].concat(strategies)) && !l.hasSomeConnections(m, "passwordless"); }
n/a
function isSSOEnabled(m) { return matchesEnterpriseConnection(m, (0, _index4.databaseUsernameValue)(m)); }
n/a
function matchesEnterpriseConnection(m, usernameValue) { return (0, _enterprise.isEnterpriseDomain)(m, usernameValue); }
n/a
function useBigSocialButtons(m) { return (0, _index5.useBigButtons)(m, hasOnlyClassicConnections(m, "social") ? 5 : 3); }
n/a
function usernameStyle(m) { return (0, _index4.authWithUsername)(m) && !isADEnabled(m) ? "username" : "email"; }
n/a
function ConfirmationPane(_ref) { var backHandler = _ref.backHandler, children = _ref.children, closeHandler = _ref.closeHandler, svg = _ref.svg; return _react2.default.createElement( 'div', { className: 'auth0-lock-confirmation' }, closeHandler && _react2.default.createElement(_button.CloseButton, { onClick: closeHandler }), backHandler && _react2.default.createElement(_button.BackButton, { onClick: backHandler }), _react2.default.createElement( 'div', { className: 'auth0-lock-confirmation-content' }, _react2.default.createElement('span', { dangerouslySetInnerHTML: { __html: svg } }), children ) ); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function Container(props) { _classCallCheck(this, Container); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.state = { isOpen: false }; return _this; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function Base(clientID, domain) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var engine = arguments[3]; _classCallCheck(this, Base); if (typeof clientID != "string") { throw new Error("A `clientID` string must be provided as first argument."); } if (typeof domain != "string") { throw new Error("A `domain` string must be provided as second argument."); } if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) != "object") { throw new Error("When provided, the third argument must be an `options` object."); } var _this = _possibleConstructorReturn(this, _EventEmitter.call(this)); _this.validEvents = ['show', 'hide', 'unrecoverable_error', 'authenticated', 'authorization_error', 'hash_parsed', 'signin ready ', 'signup ready']; _this.id = idu.incremental(); _this.engine = engine; var hookRunner = _this.runHook.bind(_this); var emitEventFn = _this.emit.bind(_this); (0, _sync.go)(_this.id); var m = (0, _actions.setupLock)(_this.id, clientID, domain, options, hookRunner, emitEventFn); _this.on('newListener', function (type) { if (_this.validEvents.indexOf(type) === -1) { l.emitUnrecoverableErrorEvent(m, 'Invalid event "' + type + '".'); } }); if (l.auth.autoParseHash(m) && !Base.hasScheduledAuthCallback) { Base.hasScheduledAuthCallback = true; setTimeout(_actions.handleAuthCallback, 0); } (0, _index.observe)("render", _this.id, function (m) { var partialApplyId = function partialApplyId(screen, handlerName) { var handler = screen[handlerName](m); return handler ? function () { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return handler.apply(undefined, [l.id(m)].concat(args)); } : handler; }; var avatar = l.ui.avatar(m) && m.getIn(["avatar", "transient", "syncStatus"]) === "ok" || null; if (l.rendering(m)) { var screen = _this.engine.render(m); var title = avatar ? i18n.str(m, "welcome", m.getIn(["avatar", "transient", "displayName"])) : screen.getTitle(m); var disableSubmitButton = screen.isSubmitDisabled(m); var i18nProp = { group: function group(keyPath) { return i18n.group(m, keyPath); }, html: function html(keyPath) { for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } return i18n.html.apply(i18n, [m, keyPath].concat(args)); }, str: function str(keyPath) { for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { args[_key3 - 1] = arguments[_key3]; } return i18n.str.apply(i18n, [m, keyPath].concat(args)); } }; var getScreenTitle = function getScreenTitle(m) { // if it is the first screen and the flag is enabled, it should hide the title return l.ui.hideMainScreenTitle(m) && screen.isFirstScreen(m) ? null : title; }; var props = { avatar: avatar && m.getIn(["avatar", "transient", "url"]), auxiliaryPane: screen.renderAuxiliaryPane(m), autofocus: l.ui.autofocus(m), backHandler: partialApplyId(screen, "backHandler"), badgeLink: "https://auth0.com/?utm_source=lock&utm_campaign=badge&utm_medium=widget", closeHandler: l.ui.closable(m) ? function () { for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { args[_key4] = arguments[_key4]; } return _actions.closeLock.apply(undefined, [l.id(m)].concat(args)); } : undefined, contentComponent: screen.render(), contentProps: { i18n: i18nProp, model: m }, disableSubmitButton: disableSubmitButton, error: l.globalError(m), isMobile: l.ui.mobile(m), isModal: l.ui.appe ...
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function CustomInput(_ref) { var iconUrl = _ref.iconUrl, model = _ref.model, name = _ref.name, placeholder = _ref.placeholder, type = _ref.type, validator = _ref.validator; var props = { iconUrl: iconUrl, isValid: !(0, _index.isFieldVisiblyInvalid)(model, name), name: name, placeholder: placeholder }; switch (type) { case "select": return _react2.default.createElement(_select_input2.default, _extends({}, props, { label: (0, _index.getFieldLabel)(model, name), onClick: function onClick() { return (0, _actions.startOptionSelection)(l.id(model), name, iconUrl); } })); case "checkbox": return _react2.default.createElement(_checkbox_input2.default, _extends({ onChange: function onChange(e) { return (0, _actions.changeField)(l.id(model), name, '' + e.target.checked, validator); }, checked: (0, _index.getFieldValue)(model, name) }, props)); default: return _react2.default.createElement(_text_input2.default, _extends({ invalidHint: (0, _index.getFieldInvalidHint)(model, name), onChange: function onChange(e) { return (0, _actions.changeField)(l.id(model), name, e.target.value, validator); }, value: (0, _index.getFieldValue)(model, name) }, props)); } }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function fetchSSOData(id, withAD, cb) { cache.get(id, withAD, cb); }
n/a
function dataFns(baseNSKeyPath) { function keyPath(nsKeyPath, keyOrKeyPath) { return nsKeyPath.concat((typeof keyOrKeyPath === "undefined" ? "undefined" : _typeof(keyOrKeyPath)) === "object" ? keyOrKeyPath : [keyOrKeyPath]); } function getFn(nsKeyPath) { return function (m, keyOrKeyPath) { var notSetValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; return m.getIn(keyPath(nsKeyPath, keyOrKeyPath), notSetValue); }; } function setFn(nsKeyPath) { return function (m, keyOrKeyPath, value) { return m.setIn(keyPath(nsKeyPath, keyOrKeyPath), value); }; } function removeFn(nsKeyPath) { return function (m, keyOrKeyPath) { return m.removeIn(keyPath(nsKeyPath, keyOrKeyPath)); }; } var transientNSKeyPath = baseNSKeyPath.concat(["transient"]); return { get: getFn(baseNSKeyPath), set: setFn(baseNSKeyPath), remove: removeFn(baseNSKeyPath), tget: getFn(transientNSKeyPath), tset: setFn(transientNSKeyPath), tremove: removeFn(transientNSKeyPath), reset: function reset(m) { return m.map(function (x) { return _immutable.Map.isMap(x) ? x.remove("transient") : x; }); }, init: function init(id, m) { return new _immutable.Map({ id: id }).setIn(baseNSKeyPath, m); }, initNS: function initNS(m, ns) { return m.setIn(baseNSKeyPath, ns); } }; }
n/a
function emailDomain(str) { var result = regExp.exec((0, _trim2.default)(str.toLowerCase())); return result ? result.slice(-2)[0] : ""; }
n/a
function emailLocalPart(str) { var domain = emailDomain(str); return domain ? str.slice(0, -1 - domain.length) : str; }
n/a
function isEmail(str) { var result = regExp.exec((0, _trim2.default)(str.toLowerCase())); return !!result && result[0] !== null; }
n/a
function setEmail(m, str) { return (0, _index.setField)(m, "email", str, function (str) { var validHRDEMail = (0, _enterprise.isHRDEmailValid)(m, str); return { valid: validateEmail(str) && validHRDEMail, hint: !validHRDEMail ? i18n.html(m, ["error", "login", "hrd.not_matching_email"]) : undefined }; }); }
n/a
function validateEmail(str) { return isEmail(str); }
n/a
function EmailInput(props) { _classCallCheck(this, EmailInput); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.state = {}; return _this; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function EmailPane() { _classCallCheck(this, EmailPane); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function EmailSentConfirmation() { _classCallCheck(this, EmailSentConfirmation); return _possibleConstructorReturn(this, _React$Component3.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function renderEmailSentConfirmation(lock) { var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; props.key = "auxiliarypane"; props.lock = lock; return m.passwordlessStarted(lock) ? _react2.default.createElement(EmailSentConfirmation, props) : null; }
n/a
function corpNetworkConnection(m) { // Information about connection is stored in to flat properties connection and strategy. // If connection is present, strategy will always be present as defined by the server. var name = m.getIn(["sso", "connection"]); var strategy = m.getIn(["sso", "strategy"]); return name && strategy && _immutable2.default.Map({ name: name, strategy: strategy }); }
n/a
function defaultEnterpriseConnection(m) { var name = defaultEnterpriseConnectionName(m); return name && findADConnectionWithoutDomain(m, name); }
n/a
function defaultEnterpriseConnectionName(m) { return get(m, "defaultConnectionName"); }
n/a
function enterpriseActiveFlowConnection(m) { if (isHRDActive(m)) { // HRD is active when an email matched or there is only one // connection and it is enterprise var email = tget(m, "hrdEmail", ""); return matchConnection(m, email) || findActiveFlowConnection(m); } else { return defaultEnterpriseConnection(m) || findADConnectionWithoutDomain(m); } }
n/a
function enterpriseDomain(m) { return isSingleHRDConnection(m) ? l.connections(m, "enterprise").getIn([0, "domains", 0]) : (0, _email.emailDomain)(tget(m, "hrdEmail ")); }
n/a
function findADConnectionWithoutDomain(m) { var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; return l.connections(m, "enterprise", "ad", "auth0-adldap").find(function (x) { return x.get("domains").isEmpty() && (!name || x.get("name") === name); }); }
n/a
function initEnterprise(m, opts) { return initNS(m, _immutable2.default.fromJS(processOptions(opts))); }
n/a
function isADEnabled(m) { return l.hasSomeConnections(m, "enterprise", "ad", "auth0-adldap"); }
n/a
function isEnterpriseDomain(m, email) { var strategies = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; return !!matchConnection(m, email, strategies); }
n/a
function isHRDActive(m) { return tget(m, "hrd", isSingleHRDConnection(m)); }
n/a
function isHRDDomain(m, email) { return isEnterpriseDomain(m, email, ["ad", "auth0-adldap"]); }
n/a
function isHRDEmailValid(m, str) { if ((0, _email.isEmail)(str) && !l.hasSomeConnections(m, "database") && !findADConnectionWithoutDomain(m) && !(0, _classic.matchesEnterpriseConnection )(m, str)) { return false; } return true; }
n/a
function isInCorpNetwork(m) { return corpNetworkConnection(m) !== undefined; }
n/a
function isSingleHRDConnection(m) { return isADEnabled(m) && l.connections(m).count() === 1; }
n/a
function matchConnection(m, email) { var strategies = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; var target = (0, _email.emailDomain)(email); if (!target) return false; return l.connections.apply(l, [m, "enterprise"].concat(strategies)).find(function (x) { return x.get("domains").contains(target); }); }
n/a
function quickAuthConnection(m) { return !isADEnabled(m) && l.hasOneConnection(m, "enterprise") ? l.connections(m, "enterprise").get(0) : null; }
n/a
function toggleHRD(m, email) { if (email) { var username = l.defaultADUsernameFromEmailPrefix(m) ? (0, _email.emailLocalPart)(email) : email; m = (0, _username.setUsername)(m, username, "username", false); m = tset(m, "hrdEmail", email); } else { m = tremove(m, "hrdEmail"); } return tset(m, "hrd", !!email); }
n/a
function ErrorScreen() { _classCallCheck(this, ErrorScreen); return _possibleConstructorReturn(this, _Screen.call(this, "error")); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function debounce(f, delay) { var t = void 0; return function () { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } function handler() { clearTimeout(t); f.apply(undefined, args); } clearTimeout(t); t = setTimeout(handler, delay); }; }
...
provider.displayName(src, function (error, str) {
if (error) return handleError(id);
displayName = str;
if (url !== undefined) handleSuccess(id, src, url, displayName);
});
}
var debouncedRequestAvatar = exports.debouncedRequestAvatar = f.debounce(requestAvatar
, 300);
function handleSuccess(id, src, url, displayName) {
cache[src] = { url: url, displayName: displayName };
update(id, src, url, displayName);
}
function update(id, src, url, displayName) {
...
function GlobalMessage() { _classCallCheck(this, GlobalMessage); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function displayName(email, cb) { email = normalize(email); if (!(0, _email.validateEmail)(email)) return cb({}); var url = 'https://secure.gravatar.com/' + md5(email) + '.json'; _jsonp_utils2.default.get(url, function (error, result) { if (!error && result && result.entry && result.entry[0]) { cb(null, result.entry[0].displayName); } else { cb({}); } }); }
...
preload.img(str, function (error, img) {
if (error) return handleError(id, src);
url = img.src;
if (displayName !== undefined) handleSuccess(id, src, url, displayName);
});
});
provider.displayName(src, function (error, str) {
if (error) return handleError(id);
displayName = str;
if (url !== undefined) handleSuccess(id, src, url, displayName);
});
}
var debouncedRequestAvatar = exports.debouncedRequestAvatar = f.debounce(requestAvatar, 300);
...
function url(email, cb) { email = normalize(email); if (!(0, _email.validateEmail)(email)) return cb({}); cb(null, 'https://secure.gravatar.com/avatar/' + md5(email) + '?d=404&s=160'); }
...
m = tset(m, "src", src);
return m;
});
var url = void 0,
displayName = void 0;
provider.url(src, function (error, str) {
if (error) return handleError(id, src);
preload.img(str, function (error, img) {
if (error) return handleError(id, src);
url = img.src;
if (displayName !== undefined) handleSuccess(id, src, url, displayName);
});
...
function Header() { _classCallCheck(this, Header); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function loginCallback(redirect, cb) { return redirect ? function (error) { return cb(normalizeError(error)); } : function (error, result) { return cb(normalizeError(error), result); }; }
n/a
function normalizeAuthParams(_ref) { var connection_scope = _ref.connection_scope, popup = _ref.popup, popupOptions = _ref.popupOptions, authParams = _objectWithoutProperties(_ref, ["connection_scope", "popup", "popupOptions"]); return authParams; }
n/a
function normalizeError(error) { if (!error) { return error; } // TODO: clean this mess, the first checks are for social/popup, // then we have some stuff for passwordless and the latter is for // db. // TODO: the following checks were copied from https://github.com/auth0/lock/blob/0a5abf1957c9bb746b0710b274d0feed9b399958/index .js#L1263-L1288 // Some of the checks are missing because I couldn't reproduce them and I'm // affraid they'll break existent functionality if add them. // We need a better errror handling story in auth0.js. if (error.status === "User closed the popup window") { // { // status: "User closed the popup window", // name: undefined, // code: undefined, // details: { // description: "server error", // code: undefined // } // } return { code: "lock.popup_closed", error: "lock.popup_closed", description: "Popup window closed." }; } if (error.code === "unauthorized") { // Custom rule error // // { // "code": "unauthorized", // "details": { // "code": "unauthorized", // "error_description": "user is blocked", // "error": "unauthorized" // }, // "name": "unauthorized", // "status": 401 // } // Default "user is blocked" rule error // // { // "code": "unauthorized", // "details": { // "code": "unauthorized", // "error_description": "user is blocked", // "error": "unauthorized" // }, // "name": "unauthorized", // "status": 401 // } // Social cancel permissions. // // { // code: "unauthorized", // details: { // code: "unauthorized" // error: "unauthorized" // error_description: "access_denied" // }, // name: "unauthorized" // status: 401 // } // Social cancel permissions or unknown error if (!error.description || error.description === "access_denied") { return { code: "lock.unauthorized", error: "lock.unauthorized", description: error.description || "Permissions were not granted." }; } // Special case for custom rule error if (error.description === "user is blocked") { return { code: "blocked_user", error: "blocked_user", description: error.description }; } // Custom Rule error return { code: "rule_error", error: "rule_error", description: error.description }; } var result = { error: error.code ? error.code : error.statusCode || error.error, description: error.description || error.code }; // result is used for passwordless and error for database. return result.error === undefined && result.description === undefined ? error : result; }
n/a
function HRDPane() { _classCallCheck(this, HRDPane); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function HRDScreen() { _classCallCheck(this, HRDScreen); return _possibleConstructorReturn(this, _Screen.call(this, "hrd")); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function group(m, keyPath) { return get(m, ["strings"].concat(keyPath), (0, _immutable.Map)()).toJS(); }
...
var title = avatar ? i18n.str(m, "welcome", m.getIn(["avatar", "transient", "displayName
"])) : screen.getTitle(m);
var disableSubmitButton = screen.isSubmitDisabled(m);
var i18nProp = {
group: function group(keyPath) {
return i18n.group(m, keyPath);
},
html: function html(keyPath) {
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
return i18n.html.apply(i18n, [m, keyPath].concat(args));
...
function html(m, keyPath) { for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { args[_key2 - 2] = arguments[_key2]; } var html = str.apply(undefined, [m, keyPath].concat(args)); return html ? _react2.default.createElement("span", { dangerouslySetInnerHTML: { __html: html } }) : null; }
...
primaryColor: l.ui.primaryColor(m),
screenName: screen.name,
showBadge: l.showBadge(m) === true,
success: l.globalSuccess(m),
submitButtonLabel: l.ui.labeledSubmitButton(m) ? screen.submitButtonLabel(m) : null,
submitHandler: partialApplyId(screen, "submitHandler"),
tabs: screen.renderTabs(m),
terms: screen.renderTerms(m, i18nProp.html("signUpTerms")),
title: getScreenTitle(m),
transitionName: screen.name === "loading" ? "fade" : "horizontal-fade"
};
(0, _box.render)(l.ui.containerID(m), props);
// TODO: hack so we can start testing the beta
if (!_this.oldScreenName || _this.oldScreenName != screen.name) {
...
function initI18n(m) { var language = l.ui.language(m); var overrides = l.ui.dict(m); var defaultDictionary = _immutable2.default.fromJS(_en2.default); var base = languageDictionaries[language] || (0, _immutable.Map)({}); if (base.isEmpty()) { base = overrides; m = (0, _sync2.default)(m, "i18n", { syncFn: function syncFn(_, cb) { return syncLang(m, language, cb); }, successFn: function successFn(m, result) { registerLanguageDictionary(language, result); var overrided = _immutable2.default.fromJS(result).mergeDeep(overrides); assertLanguage(m, overrided.toJS(), _en2.default); return set(m, "strings", defaultDictionary.mergeDeep(overrided)); } }); } else { assertLanguage(m, base.toJS(), _en2.default); } base = defaultDictionary.mergeDeep(base).mergeDeep(overrides); return set(m, "strings", base); }
...
hashCleanup: options.hashCleanup === false ? false : true,
allowedConnections: _immutable2.default.fromJS(options.allowedConnections || []),
ui: extractUIOptions(id, options),
defaultADUsernameFromEmailPrefix: options.defaultADUsernameFromEmailPrefix === false ? false : true,
prefill: options.prefill || {}
}));
m = i18n.initI18n(m);
return m;
}
function id(m) {
return m.get("id");
}
...
function str(m, keyPath) { for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { args[_key - 2] = arguments[_key]; } return _util.format.apply(undefined, [get(m, ["strings"].concat(keyPath), "")].concat(args)); }
...
};
var avatar = l.ui.avatar(m) && m.getIn(["avatar", "transient", "syncStatus"]) ===
x22;ok" || null;
if (l.rendering(m)) {
var screen = _this.engine.render(m);
var title = avatar ? i18n.str(m, "welcome", m.getIn(["avatar",
x22;transient", "displayName"])) : screen.getTitle(m);
var disableSubmitButton = screen.isSubmitDisabled(m);
var i18nProp = {
group: function group(keyPath) {
return i18n.group(m, keyPath);
},
...
function incremental() { return start++; }
...
throw new Error("When provided, the third argument must be an `options` object.");
}
var _this = _possibleConstructorReturn(this, _EventEmitter.call(this));
_this.validEvents = ['show', 'hide', 'unrecoverable_error', 'authenticated', 'authorization_error
', 'hash_parsed', 'signin ready', 'signup ready'];
_this.id = idu.incremental();
_this.engine = engine;
var hookRunner = _this.runHook.bind(_this);
var emitEventFn = _this.emit.bind(_this);
(0, _sync.go)(_this.id);
var m = (0, _actions.setupLock)(_this.id, clientID, domain, options, hookRunner, emitEventFn);
...
function random() { return (+new Date() + Math.floor(Math.random() * 10000000)).toString(36); }
...
"use strict";
exports.__esModule = true;
exports.random = random;
exports.incremental = incremental;
function random() {
return (+new Date() + Math.floor(Math.random() * 10000000)).toString(36);
}
var start = 1;
function incremental() {
return start++;
}
...
function allowedConnections(m) { return tget(m, "allowedConnections") || get(m, "allowedConnections"); }
n/a
function clearGlobalError(m) { return tremove(m, "globalError"); }
n/a
function clearGlobalSuccess(m) { return tremove(m, "globalSuccess"); }
n/a
function clientBaseUrl(m) { return get(m, "clientBaseUrl"); }
...
successFn: function successFn(m, result) {
return (0, _settings2.syncTenantSettingsSuccess)(m, l.clientID(m), result);
}
});
} else {
m = (0, _sync2.default)(m, "client", {
syncFn: function syncFn(m, cb) {
return (0, _settings.fetchClientSettings)(l.clientID(m), l.clientBaseUrl(m), cb
);
},
successFn: _settings.syncClientSettingsSuccess
});
}
m = (0, _sync2.default)(m, "sso", {
conditionFn: function conditionFn(m) {
...
function clientID(m) { return get(m, "clientID"); }
...
if (l.useTenantInfo(m)) {
m = (0, _sync2.default)(m, "client", {
syncFn: function syncFn(m, cb) {
return (0, _settings2.fetchTenantSettings)(l.tenantBaseUrl(m), cb);
},
successFn: function successFn(m, result) {
return (0, _settings2.syncTenantSettingsSuccess)(m, l.clientID(m), result);
}
});
} else {
m = (0, _sync2.default)(m, "client", {
syncFn: function syncFn(m, cb) {
return (0, _settings.fetchClientSettings)(l.clientID(m), l.clientBaseUrl(m), cb);
},
...
function connection(m) { var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; for (var _len2 = arguments.length, strategies = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { strategies[_key2 - 2] = arguments[_key2]; } return connections.apply(undefined, [m, type].concat(strategies)).get(0); }
n/a
function connections(m) { for (var _len = arguments.length, strategies = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { strategies[_key - 2] = arguments[_key]; } var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; if (arguments.length === 1) { return tget(m, "connections", (0, _immutable.Map)()).filter(function (v, k) { return k !== "unknown"; }).valueSeq().flatten(true); } var xs = tget(m, ["connections", type], (0, _immutable.List)()); return strategies.length > 0 ? xs.filter(function (x) { return ~strategies.indexOf(x.get("strategy")); }) : xs; }
...
function isEnterpriseDomain(m, email) {
var strategies = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
return !!matchConnection(m, email, strategies);
}
function enterpriseDomain(m) {
return isSingleHRDConnection(m) ? l.connections(m, "enterprise").getIn([0
, "domains", 0]) : (0, _email.emailDomain)(tget(m, "hrdEmail"));
}
function quickAuthConnection(m) {
return !isADEnabled(m) && l.hasOneConnection(m, "enterprise") ? l.connections(m, "enterprise").get
(0) : null;
}
// ad / adldap
...
function countConnections(m) { var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; for (var _len5 = arguments.length, strategies = Array(_len5 > 2 ? _len5 - 2 : 0), _key5 = 2; _key5 < _len5; _key5++) { strategies[_key5 - 2] = arguments[_key5]; } return connections.apply(undefined, [m, type].concat(strategies)).count(); }
...
var showPassword = !sso && (l.hasSomeConnections(model, "database") || !!(0, _enterprise.findADConnectionWithoutDomain
)(model));
var showForgotPasswordLink = showPassword && l.hasSomeConnections(model, "database");
var loginInstructionsKey = social ? "databaseEnterpriseAlternativeLoginInstructions" : "databaseEnterpriseLoginInstructions
";
var usernameInputPlaceholderKey = (0, _index.databaseUsernameStyle)(model) === "any" || l.countConnections(model, "enterprise") > 1 ? "usernameOrEmailInputPlaceholder" : "usernameInputPlaceholder
";
var usernameStyle = (0, _index.databaseUsernameStyle)(model);
var login = (sso || l.hasSomeConnections(model, "database") || l.hasSomeConnections(model, "enterprise"))
x26;& _react2.default.createElement(_login_pane2.default, {
emailInputPlaceholder: i18n.str("emailInputPlaceholder"),
forgotPasswordAction: i18n.str("forgotPasswordAction"),
i18n: i18n,
...
function defaultADUsernameFromEmailPrefix(m) { return get(m, "defaultADUsernameFromEmailPrefix", true); }
...
function isHRDDomain(m, email) {
return isEnterpriseDomain(m, email, ["ad", "auth0-adldap"]);
}
function toggleHRD(m, email) {
if (email) {
var username = l.defaultADUsernameFromEmailPrefix(m) ? (0, _email.emailLocalPart)(email
) : email;
m = (0, _username.setUsername)(m, username, "username", false);
m = tset(m, "hrdEmail", email);
} else {
m = tremove(m, "hrdEmail");
}
...
function domain(m) { return get(m, "domain"); }
n/a
function emitAuthenticatedEvent(m, result) { emitEvent(m, "authenticated", result); }
...
} else {
l.emitHashParsedEvent(m, authResult);
}
if (error) {
l.emitAuthorizationErrorEvent(m, error);
} else if (authResult) {
l.emitAuthenticatedEvent(m, authResult);
}
cb(error, authResult);
});
}
function openLock(id, opts) {
var m = (0, _index.read)(_index.getEntity, "lock", id);
...
function emitAuthorizationErrorEvent(m, error) { emitEvent(m, "authorization_error", error); }
...
if (error) {
l.emitHashParsedEvent(m, error);
} else {
l.emitHashParsedEvent(m, authResult);
}
if (error) {
l.emitAuthorizationErrorEvent(m, error);
} else if (authResult) {
l.emitAuthenticatedEvent(m, authResult);
}
cb(error, authResult);
});
}
...
function emitEvent(m, str) { for (var _len7 = arguments.length, args = Array(_len7 > 2 ? _len7 - 2 : 0), _key7 = 2; _key7 < _len7; _key7++) { args[_key7 - 2] = arguments[_key7]; } setTimeout(function () { var emitEventFn = get(m, "emitEventFn"); var hadListener = emitEventFn.apply(undefined, [str].concat(args)); // Handle uncaught custom error if (str === "unrecoverable_error" && !hadListener) { throw new (Function.prototype.bind.apply(Error, [null].concat(args)))(); } }, 0); }
...
transitionName: screen.name === "loading" ? "fade" : "horizontal-fade"
};
(0, _box.render)(l.ui.containerID(m), props);
// TODO: hack so we can start testing the beta
if (!_this.oldScreenName || _this.oldScreenName != screen.name) {
if (screen.name === "main.login") {
l.emitEvent(m, "signin ready");
} else if (screen.name === "main.signUp") {
l.emitEvent(m, "signup ready");
}
}
_this.oldScreenName = screen.name;
} else {
(0, _box.remove)(l.ui.containerID(m));
...
function emitHashParsedEvent(m, parsedHash) { emitEvent(m, "hash_parsed", parsedHash); }
...
return l.auth.redirect(m) && parseHash(m, hash, callback);
});
}
function parseHash(m, hash, cb) {
_web_api2.default.parseHash(l.id(m), hash, function (error, authResult) {
if (error) {
l.emitHashParsedEvent(m, error);
} else {
l.emitHashParsedEvent(m, authResult);
}
if (error) {
l.emitAuthorizationErrorEvent(m, error);
} else if (authResult) {
...
function emitUnrecoverableErrorEvent(m, error) { emitEvent(m, "unrecoverable_error", error); }
...
var emitEventFn = _this.emit.bind(_this);
(0, _sync.go)(_this.id);
var m = (0, _actions.setupLock)(_this.id, clientID, domain, options, hookRunner, emitEventFn);
_this.on('newListener', function (type) {
if (_this.validEvents.indexOf(type) === -1) {
l.emitUnrecoverableErrorEvent(m, 'Invalid event "' + type + '
x22;.');
}
});
if (l.auth.autoParseHash(m) && !Base.hasScheduledAuthCallback) {
Base.hasScheduledAuthCallback = true;
setTimeout(_actions.handleAuthCallback, 0);
}
...
function error(x, str) { var shouldOutput = _immutable.Map.isMap(x) ? !ui.disableWarnings(x) : !x.disableWarnings; if (shouldOutput && console && console.error) { console.error(str); } }
...
}
}
function error(x, str) {
var shouldOutput = _immutable.Map.isMap(x) ? !ui.disableWarnings(x) : !x.disableWarnings;
if (shouldOutput && console && console.error) {
console.error(str);
}
}
function allowedConnections(m) {
return tget(m, "allowedConnections") || get(m, "allowedConnections");
}
...
function extractTenantBaseUrlOption(opts, domain) { if (opts.configurationBaseUrl && typeof opts.configurationBaseUrl === "string") { return (0, _urlJoin2.default)(opts.configurationBaseUrl, 'info-v1.js'); } if (opts.assetsUrl && typeof opts.assetsUrl === "string") { return opts.assetsUrl; } var domainUrl = "https://" + domain; var hostname = (0, _url_utils.parseUrl)(domainUrl).hostname; var DOT_AUTH0_DOT_COM = ".auth0.com"; var AUTH0_US_CDN_URL = "https://cdn.auth0.com"; var parts = hostname.split("."); var tenant_name = parts[0]; var domain; if ((0, _string_utils.endsWith)(hostname, DOT_AUTH0_DOT_COM)) { domain = parts.length > 3 ? "https://cdn." + parts[parts.length - 3] + DOT_AUTH0_DOT_COM : AUTH0_US_CDN_URL; return (0, _urlJoin2.default)(domain, 'tenants', 'v1', tenant_name + '.js'); } else { return (0, _urlJoin2.default)(domainUrl, 'info-v1.js'); } }
n/a
function filterConnections(m) { var allowed = allowedConnections(m); var order = allowed.count() === 0 ? function (_) { return 0; } : function (c) { return allowed.indexOf(c.get("name")); }; return tset(m, "connections", (0, _index2.clientConnections)(m).map(function (cs) { return cs.filter(function (c) { return order(c) >= 0; }).sort(function (c1, c2) { return order(c1) - order(c2); }); })); }
...
}
}
l.emitEvent(m, "show");
(0, _index.swap)(_index.updateEntity, "lock", id, function (m) {
m = l.overrideOptions(m, opts);
m = l.filterConnections(m);
m = l.runHook(m, "willShow", opts);
return l.render(m);
});
return true;
}
...
function findConnection(m, name) { return connections(m).find(function (m1) { return m1.get("name") === name; }); }
n/a
function globalError(m) { return tget(m, "globalError", ""); }
...
}
return _actions.closeLock.apply(undefined, [l.id(m)].concat(args));
} : undefined,
contentComponent: screen.render(),
contentProps: { i18n: i18nProp, model: m },
disableSubmitButton: disableSubmitButton,
error: l.globalError(m),
isMobile: l.ui.mobile(m),
isModal: l.ui.appendContainer(m),
isSubmitting: l.submitting(m),
logo: l.ui.logo(m),
primaryColor: l.ui.primaryColor(m),
screenName: screen.name,
showBadge: l.showBadge(m) === true,
...
function globalSuccess(m) { return tget(m, "globalSuccess", ""); }
...
isMobile: l.ui.mobile(m),
isModal: l.ui.appendContainer(m),
isSubmitting: l.submitting(m),
logo: l.ui.logo(m),
primaryColor: l.ui.primaryColor(m),
screenName: screen.name,
showBadge: l.showBadge(m) === true,
success: l.globalSuccess(m),
submitButtonLabel: l.ui.labeledSubmitButton(m) ? screen.submitButtonLabel(m) : null,
submitHandler: partialApplyId(screen, "submitHandler"),
tabs: screen.renderTabs(m),
terms: screen.renderTerms(m, i18nProp.html("signUpTerms")),
title: getScreenTitle(m),
transitionName: screen.name === "loading" ? "fade" : "horizontal-fade"
};
...
function hasConnection(m, name) { return !!findConnection(m, name); }
...
if ((0, _enterprise.isInCorpNetwork)(m)) {
return new _kerberos_screen2.default();
}
if (l.ui.rememberLastLogin(m)) {
var conn = (0, _index3.lastUsedConnection)(m);
if (conn && (0, _sync.isSuccess)(m, "sso")) {
if (l.hasConnection(m, conn.get("name"))) {
return new _last_login_screen2.default();
}
}
}
}
if ((0, _enterprise.quickAuthConnection)(m)) {
...
function hasOneConnection(m) { var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; var xs = connections(m); return xs.count() === 1 && (!type || xs.getIn([0, "type"]) === type); }
...
}
function enterpriseDomain(m) {
return isSingleHRDConnection(m) ? l.connections(m, "enterprise").getIn([0, "domains", 0]) : (0, _email.emailDomain
)(tget(m, "hrdEmail"));
}
function quickAuthConnection(m) {
return !isADEnabled(m) && l.hasOneConnection(m, "enterprise") ? l
.connections(m, "enterprise").get(0) : null;
}
// ad / adldap
// https://github.com/auth0/Lock.Android/blob/0145b6853a8de0df5e63ef22e4e2bc40be97ad9e/lock/src/main/java/com/auth0/android/lock
/utils/Strategy.java#L67
function isADEnabled(m) {
return l.hasSomeConnections(m, "enterprise", "ad", "auth0-adldap");
...
function hasOnlyConnections(m) { var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; var all = connections(m).count(); for (var _len3 = arguments.length, strategies = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) { strategies[_key3 - 2] = arguments[_key3]; } var filtered = connections.apply(undefined, [m, type].concat(strategies)).count(); return all > 0 && all === filtered; }
n/a
function hasSomeConnections(m) { var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; for (var _len4 = arguments.length, strategies = Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) { strategies[_key4 - 2] = arguments[_key4]; } return countConnections.apply(undefined, [m, type].concat(strategies)) > 0; }
...
return !isADEnabled(m) && l.hasOneConnection(m, "enterprise") ? l.connections(m, "enterprise").get
(0) : null;
}
// ad / adldap
// https://github.com/auth0/Lock.Android/blob/0145b6853a8de0df5e63ef22e4e2bc40be97ad9e/lock/src/main/java/com/auth0/android/lock
/utils/Strategy.java#L67
function isADEnabled(m) {
return l.hasSomeConnections(m, "enterprise", "ad", "auth0-adldap
");
}
function findADConnectionWithoutDomain(m) {
var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
return l.connections(m, "enterprise", "ad", "auth0-adldap").find(function (x) {
return x.get("domains").isEmpty() && (!name || x.get("name") === name);
...
function hasStopped(m) { return get(m, "stopped"); }
...
Classic.prototype.render = function render(m) {
// TODO: remove the detail about the loading pane being pinned,
// sticky screens should be handled at the box module.
if (!(0, _sync.isDone)(m) || m.get("isLoadingPanePinned")) {
return new _loading_screen2.default();
}
if (l.hasStopped(m)) {
return new _error_screen2.default();
}
if ((0, _index4.hasScreen)(m, "login")) {
if (!(0, _quick_auth.hasSkippedQuickAuth)(m) && (0, _index4.hasInitialScreen)(m, "login")) {
if ((0, _enterprise.isInCorpNetwork)(m)) {
...
function hashCleanup(m) { return get(m, "hashCleanup"); }
...
return m;
}
function handleAuthCallback() {
var ms = (0, _index.read)(_index.getCollection, "lock");
var keepHash = ms.filter(function (m) {
return !l.hashCleanup(m);
}).size > 0;
var callback = function callback(error, authResult) {
var parsed = !!(error || authResult);
if (parsed && !keepHash) {
global.location.hash = "";
}
};
...
function id(m) { return m.get("id"); }
...
var partialApplyId = function partialApplyId(screen, handlerName) {
var handler = screen[handlerName](m);
return handler ? function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return handler.apply(undefined, [l.id(m)].concat(args));
} : handler;
};
var avatar = l.ui.avatar(m) && m.getIn(["avatar", "transient", "syncStatus"]) ===
x22;ok" || null;
if (l.rendering(m)) {
var screen = _this.engine.render(m);
...
function languageBaseUrl(m) { return get(m, "languageBaseUrl"); }
...
}
// sync
function syncLang(m, language, _cb) {
(0, _cdn_utils.load)({
method: "registerLanguageDictionary",
url: l.languageBaseUrl(m) + '/js/lock/' + '10.14.0' + '/
x27; + language + '.js',
check: function check(str) {
return str && str === language;
},
cb: function cb(err, _, dictionary) {
_cb(err, dictionary);
}
});
...
function loggedIn(m) { return tget(m, "loggedIn", false); }
...
function renderSignedInConfirmation(lock) {
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
props.closeHandler = _actions.closeLock;
props.key = "auxiliarypane";
props.lock = lock;
return l.loggedIn(lock) ? _react2.default.createElement(SignedInConfirmation, props
) : null;
}
...
function loginErrorMessage(m, error, type) { // NOTE: previous version of lock checked for status codes and, at // some point, if the status code was 401 it defaults to an // "invalid_user_password" error (actually the // "wrongEmailPasswordErrorText" dict entry) instead of checking // explicitly. We should figure out if there was a reason for that. if (error.status === 0) { return i18n.html(m, ["error", "login", "lock.network"]); } // Custom rule error (except blocked_user) if (error.code === "rule_error") { return error.description || i18n.html(m, ["error", "login", "lock.fallback"]); } var INVALID_MAP = { code: "lock.invalid_code", email: "lock.invalid_email_password", username: "lock.invalid_username_password" }; var code = error.error || error.code; if (code === "invalid_user_password" && INVALID_MAP[type]) { code = INVALID_MAP[type]; } if (code === "a0.mfa_registration_required") { code = "lock.mfa_registration_required"; } if (code === "a0.mfa_invalid_code") { code = "lock.mfa_invalid_code"; } return i18n.html(m, ["error", "login", code]) || i18n.html(m, ["error", "login", "lock.fallback"]); }
...
}
}
function logInError(id, fields, error, localHandler) {
localHandler(id, error, fields, function () {
return setTimeout(function () {
var m = (0, _index.read)(_index.getEntity, "lock", id);
var errorMessage = l.loginErrorMessage(m, error, loginType(fields));
if (["blocked_user", "rule_error", "lock.unauthorized"].indexOf(error.code) > -1) {
l.emitAuthorizationErrorEvent(m, error);
}
(0, _index.swap)(_index.updateEntity, "lock", id, l.setSubmitting, false, errorMessage);
}, 0);
...
function oidcConformant(m) { return get(m, "oidcConformant"); }
...
},
successFn: _settings.syncClientSettingsSuccess
});
}
m = (0, _sync2.default)(m, "sso", {
conditionFn: function conditionFn(m) {
return l.auth.sso(m) && !l.oidcConformant(m);
},
waitFn: function waitFn(m) {
return (0, _sync.isSuccess)(m, "client");
},
syncFn: function syncFn(m, cb) {
return (0, _data.fetchSSOData)(l.id(m), (0, _enterprise.isADEnabled)(m), cb);
},
...
function overrideOptions(m, opts) { if (!opts) opts = {}; if (opts.allowedConnections) { m = tset(m, "allowedConnections", _immutable2.default.fromJS(opts.allowedConnections)); } if (opts.socialButtonStyle) { var curated = (0, _index.processSocialOptions)(opts); m = tsetSocial(m, "socialButtonStyle", curated.socialButtonStyle); } if (opts.flashMessage) { var key = "success" === opts.flashMessage.type ? "globalSuccess" : "globalError"; m = tset(m, key, opts.flashMessage.text); } if (opts.auth && opts.auth.params) { m = tset(m, "authParams", _immutable2.default.fromJS(opts.auth.params)); } if (opts.theme) { if (opts.theme.primaryColor) { m = tset(m, ["ui", "primaryColor"], opts.theme.primaryColor); } if (opts.theme.logo) { m = tset(m, ["ui", "logo"], opts.theme.logo); } } if (opts.language || opts.languageDictionary) { if (opts.language) { m = tset(m, ["ui", "language"], opts.language); } if (opts.languageDictionary) { m = tset(m, ["ui", "dict"], opts.languageDictionary); } m = i18n.initI18n(m); } if (typeof opts.rememberLastLogin === "boolean") { m = tset(m, "rememberLastLogin", opts.rememberLastLogin); } return m; }
...
return l.emitUnrecoverableErrorEvent(m, "'flashMessage' must provide a text");
}
}
l.emitEvent(m, "show");
(0, _index.swap)(_index.updateEntity, "lock", id, function (m) {
m = l.overrideOptions(m, opts);
m = l.filterConnections(m);
m = l.runHook(m, "willShow", opts);
return l.render(m);
});
return true;
}
...
function prefill(m) { return get(m, "prefill", {}); }
...
l.warn(m, 'The provided default enterprise connection "' + (0, _enterprise.defaultEnterpriseConnectionName)(m
) + '" is not enabled or does not allow email/password authentication.');
}
return m;
}
var setPrefill = function setPrefill(m) {
var _l$prefill$toJS = l.prefill(m).toJS(),
email = _l$prefill$toJS.email,
username = _l$prefill$toJS.username;
if (typeof email === "string") m = (0, _email.setEmail)(m, email);
if (typeof username === "string") m = (0, _username.setUsername)(m, username, "username", false);
return m;
};
...
function render(m) { return tset(m, "render", true); }
...
return handler.apply(undefined, [l.id(m)].concat(args));
} : handler;
};
var avatar = l.ui.avatar(m) && m.getIn(["avatar", "transient", "syncStatus"]) ===
x22;ok" || null;
if (l.rendering(m)) {
var screen = _this.engine.render(m);
var title = avatar ? i18n.str(m, "welcome", m.getIn(["avatar", "transient", "displayName"
;])) : screen.getTitle(m);
var disableSubmitButton = screen.isSubmitDisabled(m);
var i18nProp = {
group: function group(keyPath) {
...
function rendering(m) { return tget(m, "render", false); }
...
}
return handler.apply(undefined, [l.id(m)].concat(args));
} : handler;
};
var avatar = l.ui.avatar(m) && m.getIn(["avatar", "transient", "syncStatus"]) ===
x22;ok" || null;
if (l.rendering(m)) {
var screen = _this.engine.render(m);
var title = avatar ? i18n.str(m, "welcome", m.getIn(["avatar", "transient", "displayName"
;])) : screen.getTitle(m);
var disableSubmitButton = screen.isSubmitDisabled(m);
...
function reset(m) { return m.map(function (x) { return _immutable.Map.isMap(x) ? x.remove("transient") : x; }); }
...
// otherwise just reset.
if (l.ui.appendContainer(m)) {
(0, _index.swap)(_index.updateEntity, "lock", id, l.stopRendering);
setTimeout(function () {
(0, _index.swap)(_index.updateEntity, "lock", id, function (m) {
m = (0, _index3.hideInvalidFields)(m);
m = l.reset(m);
m = (0, _index3.clearFields)(m);
return m;
});
m = (0, _index.read)(_index.getEntity, "lock", id);
callback(m);
}, 1000);
} else {
...
function runHook(m, str) { for (var _len6 = arguments.length, args = Array(_len6 > 2 ? _len6 - 2 : 0), _key6 = 2; _key6 < _len6; _key6++) { args[_key6 - 2] = arguments[_key6]; } return get(m, "hookRunner").apply(undefined, [str, m].concat(args)); }
...
(0, _preload_utils.img)(l.ui.logo(m) || _container.defaultProps.logo);
_web_api2.default.setupClient(id, clientID, domain, l.withAuthOptions(m, _extends({}, options, {
popupOptions: l.ui.popupOptions(m)
})));
m = l.runHook(m, "didInitialize", options);
(0, _index.swap)(_index.setEntity, "lock", id, m);
return m;
}
function handleAuthCallback() {
...
function setGlobalError(m, str) { return tset(m, "globalError", str); }
n/a
function setGlobalSuccess(m, str) { return tset(m, "globalSuccess", str); }
n/a
function setLoggedIn(m, value) { return tset(m, "loggedIn", value); }
...
function logInSuccess(id, result) {
var m = (0, _index.read)(_index.getEntity, "lock", id);
if (!l.ui.autoclose(m)) {
(0, _index.swap)(_index.updateEntity, "lock", id, function (m) {
m = l.setSubmitting(m, false);
return l.setLoggedIn(m, true);
});
l.emitAuthenticatedEvent(m, result);
} else {
closeLock(id, false, function (m1) {
return l.emitAuthenticatedEvent(m1, result);
});
}
...
function setSubmitting(m, value) { var error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ""; m = tset(m, "submitting", value); m = clearGlobalSuccess(m); m = error && !value ? setGlobalError(m, error) : clearGlobalError(m); return m; }
...
var fields = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var f = arguments[2];
(0, _index.swap)(_index.updateEntity, "lock", id, function (m) {
var allFieldsValid = fields.reduce(function (r, x) {
return r && (0, _index3.isFieldValid)(m, x);
}, true);
return allFieldsValid ? l.setSubmitting(m, true) : fields.reduce(function (r, x) {
return (0, _index3.showInvalidField)(r, x);
}, m);
});
var m = (0, _index.read)(_index.getEntity, "lock", id);
if (l.submitting(m)) {
f(m);
...
function setup(id, clientID, domain, options, hookRunner, emitEventFn) { var m = init(id, _immutable2.default.fromJS({ clientBaseUrl: extractClientBaseUrlOption(options, domain), tenantBaseUrl: extractTenantBaseUrlOption(options, domain), languageBaseUrl: extractLanguageBaseUrlOption(options, domain), auth: extractAuthOptions(options), clientID: clientID, domain: domain, emitEventFn: emitEventFn, hookRunner: hookRunner, useTenantInfo: options.__useTenantInfo || false, oidcConformant: options.oidcConformant || false, hashCleanup: options.hashCleanup === false ? false : true, allowedConnections: _immutable2.default.fromJS(options.allowedConnections || []), ui: extractUIOptions(id, options), defaultADUsernameFromEmailPrefix: options.defaultADUsernameFromEmailPrefix === false ? false : true, prefill: options.prefill || {} })); m = i18n.initI18n(m); return m; }
...
var _index3 = require('../field/index');
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; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function setupLock(id, clientID, domain, options, hookRunner, emitEventFn) {
var m = l.setup(id, clientID, domain, options, hookRunner, emitEventFn);
m = (0, _remote_data.syncRemoteData)(m);
(0, _preload_utils.img)(l.ui.logo(m) || _container.defaultProps.logo);
_web_api2.default.setupClient(id, clientID, domain, l.withAuthOptions(m, _extends({}, options, {
popupOptions: l.ui.popupOptions(m)
...
function showBadge(m) { return (0, _index2.hasFreeSubscription)(m) || false; }
...
error: l.globalError(m),
isMobile: l.ui.mobile(m),
isModal: l.ui.appendContainer(m),
isSubmitting: l.submitting(m),
logo: l.ui.logo(m),
primaryColor: l.ui.primaryColor(m),
screenName: screen.name,
showBadge: l.showBadge(m) === true,
success: l.globalSuccess(m),
submitButtonLabel: l.ui.labeledSubmitButton(m) ? screen.submitButtonLabel(m) : null,
submitHandler: partialApplyId(screen, "submitHandler"),
tabs: screen.renderTabs(m),
terms: screen.renderTerms(m, i18nProp.html("signUpTerms")),
title: getScreenTitle(m),
transitionName: screen.name === "loading" ? "fade" : "horizontal-fade"
...
function stop(m, error) { if (error) { setTimeout(function () { return emitEvent(m, "unrecoverable_error", error); }, 17); } return set(m, "stopped", true); }
...
var result = setStatus(m, key, "error");
// TODO: this should be configurable for each sync
if (key !== "sso") {
var stopError = new Error("An error occurred when fetching data.");
stopError.code = "sync";
stopError.origin = error;
result = l.stop(result, stopError);
}
return result;
}
...
function stopRendering(m) { return tremove(m, "render"); }
n/a
function submitting(m) { return tget(m, "submitting", false); }
...
} : undefined,
contentComponent: screen.render(),
contentProps: { i18n: i18nProp, model: m },
disableSubmitButton: disableSubmitButton,
error: l.globalError(m),
isMobile: l.ui.mobile(m),
isModal: l.ui.appendContainer(m),
isSubmitting: l.submitting(m),
logo: l.ui.logo(m),
primaryColor: l.ui.primaryColor(m),
screenName: screen.name,
showBadge: l.showBadge(m) === true,
success: l.globalSuccess(m),
submitButtonLabel: l.ui.labeledSubmitButton(m) ? screen.submitButtonLabel(m) : null,
submitHandler: partialApplyId(screen, "submitHandler"),
...
function tenantBaseUrl(m) { return get(m, "tenantBaseUrl"); }
...
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function syncRemoteData(m) {
if (l.useTenantInfo(m)) {
m = (0, _sync2.default)(m, "client", {
syncFn: function syncFn(m, cb) {
return (0, _settings2.fetchTenantSettings)(l.tenantBaseUrl(m), cb);
},
successFn: function successFn(m, result) {
return (0, _settings2.syncTenantSettingsSuccess)(m, l.clientID(m), result);
}
});
} else {
m = (0, _sync2.default)(m, "client", {
...
function useTenantInfo(m) { return get(m, "useTenantInfo"); }
...
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; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function syncRemoteData(m) {
if (l.useTenantInfo(m)) {
m = (0, _sync2.default)(m, "client", {
syncFn: function syncFn(m, cb) {
return (0, _settings2.fetchTenantSettings)(l.tenantBaseUrl(m), cb);
},
successFn: function successFn(m, result) {
return (0, _settings2.syncTenantSettingsSuccess)(m, l.clientID(m), result);
}
...
function warn(x, str) { var shouldOutput = _immutable.Map.isMap(x) ? !ui.disableWarnings(x) : !x.disableWarnings; if (shouldOutput && console && console.warn) { console.warn(str); } }
...
}
function assertLanguage(m, language, base) {
var path = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "";
Object.keys(base).forEach(function (key) {
if (!language.hasOwnProperty(key)) {
l.warn(m, 'language does not have property ' + path + key);
} else {
if (_typeof(base[key]) === 'object') {
assertLanguage(m, language[key], base[key], '' + path + key + '.');
}
}
});
}
...
function withAuthOptions(m, opts) { return _immutable2.default.fromJS(opts).merge(get(m, "auth")).toJS(); }
...
function setupLock(id, clientID, domain, options, hookRunner, emitEventFn) {
var m = l.setup(id, clientID, domain, options, hookRunner, emitEventFn);
m = (0, _remote_data.syncRemoteData)(m);
(0, _preload_utils.img)(l.ui.logo(m) || _container.defaultProps.logo);
_web_api2.default.setupClient(id, clientID, domain, l.withAuthOptions(m, _extends({},
options, {
popupOptions: l.ui.popupOptions(m)
})));
m = l.runHook(m, "didInitialize", options);
(0, _index.swap)(_index.setEntity, "lock", id, m);
...
function InputWrap() { _classCallCheck(this, InputWrap); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function KerberosScreen() { _classCallCheck(this, KerberosScreen); return _possibleConstructorReturn(this, _Screen.call(this, "kerberos")); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function LastLoginScreen() { _classCallCheck(this, LastLoginScreen); return _possibleConstructorReturn(this, _Screen.call(this, "lastLogin")); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function Auth0LegacyAPIClient(clientID, domain, opts) { _classCallCheck(this, Auth0LegacyAPIClient); this.client = null; this.authOpt = null; this.domain = domain; this.clientID = clientID; this.tokenIssuer = opts.overrides && opts.overrides.__token_issuer || 'https://' + domain + '/'; var default_telemetry = { name: 'lock.js', version: '10.14.0', lib_version: _auth0Js2.default.version }; this.client = new _auth0Js2.default.WebAuth({ clientID: clientID, domain: domain, redirectUri: opts.redirectUrl, responseMode: opts.responseMode, responseType: opts.responseType, plugins: [new _cordova2.default()], _sendTelemetry: opts._sendTelemetry === false ? false : true, _telemetryInfo: opts._telemetryInfo || default_telemetry, __tenant: opts.overrides && opts.overrides.__tenant, __token_issuer: opts.overrides && opts.overrides.__token_issuer, _disableDeprecationWarnings: true }); this.authOpt = { popup: !opts.redirect, popupOptions: opts.popupOptions, sso: opts.sso, nonce: opts.nonce, state: opts.state }; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function FiltrableList(props) { _classCallCheck(this, FiltrableList); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.state = { filteredItems: props.items, highlighted: props.defaultItem }; return _this; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function LoadingScreen() { _classCallCheck(this, LoadingScreen); return _possibleConstructorReturn(this, _Screen.call(this, "loading")); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function LocationInput(props) { _classCallCheck(this, LocationInput); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.state = {}; return _this; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function Login() { _classCallCheck(this, Login); return _possibleConstructorReturn(this, _Screen.call(this, "main.login")); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function LoginPane() { _classCallCheck(this, LoginPane); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function LoginSignUpTabs() { _classCallCheck(this, LoginSignUpTabs); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function isSmallScreen() { return window.matchMedia && !window.matchMedia("(min-width: 380px)").matches; }
n/a
function getMFACodeValidation(m) { return DEFAULT_VALIDATION.mfa_code; }
n/a
function setMFACode(m, str) { return (0, _index.setField)(m, "mfa_code", str, validateMFACode); }
n/a
function MFACodeInput(props) { _classCallCheck(this, MFACodeInput); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.state = {}; return _this; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function MFACodePane() { _classCallCheck(this, MFACodePane); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function MFALoginScreen() { _classCallCheck(this, MFALoginScreen); return _possibleConstructorReturn(this, _Screen.call(this, "mfa.mfaCode")); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function MFAPane() { _classCallCheck(this, MFAPane); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function Slider(props) { _classCallCheck(this, Slider); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.state = { children: { current: props.children } }; return _this; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
default = function (_ref) { var icon = _ref.icon, iconUrl = _ref.iconUrl, model = _ref.model, name = _ref.name, items = _ref.items; return _react2.default.createElement(_list2.default, { icon: icon, iconUrl: iconUrl, items: items, onSelect: function onSelect(x) { return (0, _actions.selectOption)(model.get("id"), name, x); }, onCancel: function onCancel() { return (0, _actions.cancelOptionSelection)(model.get("id")); } }); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function Auth0APIClient(lockID, clientID, domain, opts) { _classCallCheck(this, Auth0APIClient); this.lockID = lockID; this.client = null; this.authOpt = null; var default_telemetry = { name: 'lock.js', version: '10.14.0', lib_version: _auth0Js2.default.version }; this.client = new _auth0Js2.default.WebAuth({ clientID: clientID, domain: domain, audience: opts.audience, redirectUri: opts.redirectUrl, responseMode: opts.responseMode, responseType: opts.responseType, leeway: opts.leeway || 1, plugins: [new _cordova2.default()], _sendTelemetry: opts._sendTelemetry === false ? false : true, _telemetryInfo: opts._telemetryInfo || default_telemetry, __tenant: opts.overrides && opts.overrides.__tenant, __token_issuer: opts.overrides && opts.overrides.__token_issuer }); this.authOpt = { popup: !opts.redirect, popupOptions: opts.popupOptions, sso: opts.sso, nonce: opts.nonce, state: opts.state }; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function PaneSeparator() { return _react2.default.createElement("div", { className: "auth0-lock-pane-separator" }); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function setPassword(m, password, policy) { return (0, _index.setField)(m, "password", password, validatePassword, policy); }
n/a
function validatePassword(password, policy) { return (0, _passwordSheriff2.default)(policy).check(password); }
n/a
function PasswordInput(props) { _classCallCheck(this, PasswordInput); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.state = {}; return _this; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function PasswordPane() { _classCallCheck(this, PasswordPane); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function PasswordResetConfirmation() { _classCallCheck(this, PasswordResetConfirmation); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function renderPasswordResetConfirmation(m) { var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; props.closeHandler = _actions.closeLock; props.key = "auxiliarypane"; props.lock = m; return m.get("passwordResetted") ? _react2.default.createElement(PasswordResetConfirmation, props) : null; }
n/a
function Auth0LockPasswordless(clientID, domain, options) { _classCallCheck(this, Auth0LockPasswordless); return _possibleConstructorReturn(this, _Core.call(this, clientID, domain, options, _passwordless2.default)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function humanLocation(m) { var location = (0, _index.getField)(m, "location"); return location.get("diallingCode") + ' ' + location.get("country"); }
n/a
function humanPhoneNumberWithDiallingCode(m) { var location = (0, _index.getField)(m, "location"); var code = location.get("diallingCode", ""); var number = (0, _index.getFieldValue)(m, "phoneNumber", ""); return code ? code + ' ' + number : number; }
n/a
function initLocation(m, isoCode) { var location = findLocation(isoCode) || findLocation("US"); return (0, _index.registerOptionField)(m, "location", locationOptions, location.get("value")); }
n/a
function phoneNumberWithDiallingCode(m) { return humanPhoneNumberWithDiallingCode(m).replace(/[\s-]+/g, ''); }
n/a
function setPhoneNumber(m, str) { return (0, _index.setField)(m, "phoneNumber", str, validatePhoneNumber); }
n/a
function validatePhoneNumber(str) { var regExp = /^[0-9]([0-9 -])*[0-9]$/; return regExp.test(str); }
n/a
function PhoneNumberInput(props) { _classCallCheck(this, PhoneNumberInput); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.state = {}; return _this; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function PhoneNumberPane() { _classCallCheck(this, PhoneNumberPane); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function img(src) { var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {}; var img = document.createElement("img"); img.addEventListener("load", function () { cb(null, img); }); img.addEventListener("error", function (event) { cb(event); }); img.src = src; return img; }
...
var url = void 0,
displayName = void 0;
provider.url(src, function (error, str) {
if (error) return handleError(id, src);
preload.img(str, function (error, img) {
if (error) return handleError(id, src);
url = img.src;
if (displayName !== undefined) handleSuccess(id, src, url, displayName);
});
});
provider.displayName(src, function (error, str) {
...
function hasSkippedQuickAuth(m) { return tget(m, "skipped", false); }
n/a
function skipQuickAuth(m, b) { return tset(m, "skipped", b); }
n/a
function QuickAuthPane(props) { var alternativeLabel = props.alternativeLabel, alternativeClickHandler = props.alternativeClickHandler, buttonLabel = props.buttonLabel, buttonClickHandler = props.buttonClickHandler, header = props.header, strategy = props.strategy, buttonIcon = props.buttonIcon, primaryColor = props.primaryColor, foregroundColor = props.foregroundColor; var alternative = alternativeLabel ? _react2.default.createElement( 'p', { className: 'auth0-lock-alternative' }, _react2.default.createElement( 'a', { className: 'auth0-lock-alternative-link', href: '#', onClick: function onClick(e) { e.preventDefault();alternativeClickHandler(e); } }, alternativeLabel ) ) : null; return _react2.default.createElement( 'div', { className: 'auth0-lock-last-login-pane' }, header, _react2.default.createElement(_auth_button2.default, { label: buttonLabel, onClick: function onClick(e) { e.preventDefault();buttonClickHandler(e); }, strategy: strategy, primaryColor: primaryColor, foregroundColor: foregroundColor, icon: buttonIcon }), alternative, _react2.default.createElement( 'div', { className: 'auth0-loading-container' }, _react2.default.createElement('div', { className: 'auth0-loading' }) ) ); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function QuickAuthScreen() { _classCallCheck(this, QuickAuthScreen); return _possibleConstructorReturn(this, _Screen.call(this, "enterpriseQuickAuth")); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function syncRemoteData(m) { if (l.useTenantInfo(m)) { m = (0, _sync2.default)(m, "client", { syncFn: function syncFn(m, cb) { return (0, _settings2.fetchTenantSettings)(l.tenantBaseUrl(m), cb); }, successFn: function successFn(m, result) { return (0, _settings2.syncTenantSettingsSuccess)(m, l.clientID(m), result); } }); } else { m = (0, _sync2.default)(m, "client", { syncFn: function syncFn(m, cb) { return (0, _settings.fetchClientSettings)(l.clientID(m), l.clientBaseUrl(m), cb); }, successFn: _settings.syncClientSettingsSuccess }); } m = (0, _sync2.default)(m, "sso", { conditionFn: function conditionFn(m) { return l.auth.sso(m) && !l.oidcConformant(m); }, waitFn: function waitFn(m) { return (0, _sync.isSuccess)(m, "client"); }, syncFn: function syncFn(m, cb) { return (0, _data.fetchSSOData)(l.id(m), (0, _enterprise.isADEnabled)(m), cb); }, successFn: function successFn(m, result) { return m.mergeIn(["sso"], _immutable2.default.fromJS(result)); }, errorFn: function errorFn(m, error) { // location.origin is not supported in all browsers var origin = location.protocol + "//" + location.hostname; if (location.port) { origin += ":" + location.port; } var appSettingsUrl = 'https://manage.auth0.com/#/applications/' + l.clientID(m) + '/settings'; l.warn(m, 'There was an error fetching the SSO data. This could simply mean that there was a problem with the network. But , if a "Origin" error has been logged before this warning, please add "' + origin + '" to the "Allowed Origins (CORS)" list in the Auth0 dashboard: ' + appSettingsUrl); } }); return m; }
n/a
function ResetPassword() { _classCallCheck(this, ResetPassword); return _possibleConstructorReturn(this, _Screen.call(this, "forgotPassword")); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function ResetPasswordPane() { _classCallCheck(this, ResetPasswordPane); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function Screen(name) { _classCallCheck(this, Screen); this.name = name; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function SelectInput(props) { _classCallCheck(this, SelectInput); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.state = {}; return _this; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function fetchClientSettings(clientID, clientBaseUrl, cb) { (0, _cdn_utils.load)({ method: "setClient", url: (0, _urlJoin2.default)(clientBaseUrl, 'client', clientID + '.js?t' + +new Date()), check: function check(o) { return o && o.id === clientID; }, cb: cb }); }
n/a
function syncClientSettingsSuccess(m, result) { m = (0, _index2.initClient)(m, result); m = l.filterConnections(m); m = l.runHook(m, "didReceiveClientSettings"); return m; }
n/a
function SignUpPane() { _classCallCheck(this, SignUpPane); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function SignUp() { _classCallCheck(this, SignUp); return _possibleConstructorReturn(this, _Screen.call(this, "main.signUp")); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function SignUpTerms(_ref) { var checkHandler = _ref.checkHandler, checked = _ref.checked, children = _ref.children; return checkHandler ? _react2.default.createElement( "span", { className: "auth0-lock-sign-up-terms-agreement" }, _react2.default.createElement( "label", null, _react2.default.createElement("input", { type: "checkbox", onChange: checkHandler, checked: checked }), children ) ) : children; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function SignedInConfirmation() { _classCallCheck(this, SignedInConfirmation); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function renderSignedInConfirmation(lock) { var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; props.closeHandler = _actions.closeLock; props.key = "auxiliarypane"; props.lock = lock; return l.loggedIn(lock) ? _react2.default.createElement(SignedInConfirmation, props) : null; }
n/a
function SignedUpConfirmation() { _classCallCheck(this, SignedUpConfirmation); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function renderSignedUpConfirmation(m) { var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; props.closeHandler = _actions.closeLock; props.key = "auxiliarypane"; props.lock = m; return m.get("signedUp") && !(0, _index2.shouldAutoLogin)(m) ? _react2.default.createElement(SignedUpConfirmation, props) : null ; }
n/a
default = function (_ref) { var children = _ref.children; return _react2.default.createElement( 'div', { className: 'auth0-sso-notice-container' }, _react2.default.createElement('span', { dangerouslySetInnerHTML: { __html: _password_input.icon } }), ' ', " ", _react2.default.createElement( 'span', { className: 'auth0-sso-notice' }, children ) ); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function SocialButtonsPane() { _classCallCheck(this, SocialButtonsPane); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function SocialOrEmailLoginScreen() { _classCallCheck(this, SocialOrEmailLoginScreen); return _possibleConstructorReturn(this, _Screen.call(this, "socialOrEmail")); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function AskSocialNetworkOrPhoneNumber() { _classCallCheck(this, AskSocialNetworkOrPhoneNumber); return _possibleConstructorReturn(this, _Screen.call(this, "socialOrPhoneNumber")); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function endsWith(str, search) { return str.indexOf(search, str.length - search.length) !== -1; }
n/a
function matches(search, str) { return str.toLowerCase().indexOf(search.toLowerCase()) > -1; }
...
_this.state = { filteredItems: props.items, highlighted: props.defaultItem };
return _this;
}
FiltrableList.prototype.filter = function filter(str) {
var filteredItems = this.props.items.filter(function (x) {
return su.matches(str, x.get("label"));
});
var highlighted = filteredItems.size === 1 && filteredItems.get(0) || filteredItems.includes(this.state.highlighted)
x26;& this.state.highlighted || null;
return {
filteredItems: filteredItems,
highlighted: highlighted
...
function startsWith(str, search) { return str.indexOf(search) === 0; }
n/a
function SuccessPane(props) { return _react2.default.createElement(_confirmation_pane2.default, _extends({ svg: svg }, props)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
default = function (m, key, opts) { if (get(m, key) !== undefined) return m; var status = opts.waitFn ? "waiting" : !opts.conditionFn || opts.conditionFn(m) ? "pending" : "no"; return set(m, key, (0, _immutable.Map)({ conditionFn: opts.conditionFn, errorFn: opts.errorFn, recoverResult: opts.recoverResult, syncStatus: status, successFn: opts.successFn, syncFn: opts.syncFn, timeout: opts.timeout || 6000, waitFn: opts.waitFn })); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function go(id) { (0, _index2.observe)("sync", id, function (m) { setTimeout(function () { return (0, _index2.swap)(_index2.updateEntity, "lock", id, process, id); }, 0); }); }
n/a
function hasError(m) { var excludeKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var keys = findKeys(removeKeys(get(m, [], (0, _immutable.Map)()), excludeKeys)); return keys.length > 0 && keys.reduce(function (r, k) { return r || getStatus(m, k) === "error"; }, false); }
n/a
function isDone(m) { var keys = findKeys(get(m, [], (0, _immutable.Map)())); return keys.length > 0 && keys.reduce(function (r, k) { return r && !isLoading(m, k); }, true); }
n/a
function isSuccess(m, key) { return getStatus(m, key) === "ok"; }
n/a
function TextInput(props) { _classCallCheck(this, TextInput); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.state = {}; return _this; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function parseUrl(str) { var parser = global.document.createElement("a"); parser.href = str; return parser; }
n/a
function getUsernameValidation(m) { var usernameValidation = (0, _database.databaseConnection)(m).getIn(['validation', 'username']); return usernameValidation ? usernameValidation.toJS() : null; }
n/a
function setUsername(m, str) { var usernameStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "username"; var validateUsernameFormat = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; var usernameValidation = validateUsernameFormat ? getUsernameValidation(m) : null; var validator = function validator(value) { switch (usernameStyle) { case "email": return (0, _email.validateEmail)(value); case "username": return validateUsername(value, validateUsernameFormat, usernameValidation); default: return usernameLooksLikeEmail(value) ? (0, _email.validateEmail)(value) : validateUsername(value, validateUsernameFormat , usernameValidation); } }; return (0, _index.setField)(m, "username", str, validator); }
n/a
function usernameLooksLikeEmail(str) { return str.indexOf("@") > -1; }
n/a
function UsernameInput(props) { _classCallCheck(this, UsernameInput); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.state = {}; return _this; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function UsernamePane() { _classCallCheck(this, UsernamePane); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function setVcode(m, str) { return (0, _index.setField)(m, "vcode", str); }
n/a
function VcodeInput(props) { _classCallCheck(this, VcodeInput); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.state = {}; return _this; }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...
function VcodePane() { _classCallCheck(this, VcodePane); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); }
...
opts.redirect = false;
opts.sso = false;
}
// when it is used on on the hosted login page, it should use the legacy mode
// (usernamepassword/login) in order to continue the transaction after authentication
if (hostedLoginPage || !opts.oidcConformant) {
this.clients[lockID] = new _legacy_api2.default(clientID, domain, opts);
} else {
this.clients[lockID] = new _p2_api2.default(lockID, clientID, domain, opts);
}
};
Auth0WebAPI.prototype.logIn = function logIn(lockID, options, authParams, cb) {
this.clients[lockID].logIn(options, authParams, cb);
...