auth0-sso-login
Version:
A Library to simplify the auth0 sso login process
40 lines (32 loc) • 1.5 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
// static window interaction, mostly wrapped for enabling easier mocking through unit tests
var windowInteraction = /*#__PURE__*/function () {
function windowInteraction() {
_classCallCheck(this, windowInteraction);
}
_createClass(windowInteraction, null, [{
key: "updateWindow",
value: function updateWindow(url) {
window.location = url;
}
}, {
key: "setTimeout",
value: function setTimeout(func, delay) {
return window.setTimeout(func, delay);
}
}, {
key: "clearTimeout",
value: function clearTimeout(timeoutId) {
window.clearTimeout(timeoutId);
}
}]);
return windowInteraction;
}();
exports["default"] = windowInteraction;