authscape 1.0.306 → 1.0.308

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -4275,7 +4275,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
4275
4275
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
4276
4276
  var setupOEMProps = /*#__PURE__*/function () {
4277
4277
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
4278
- var Component, ctx, pageProps, host, response;
4278
+ var Component, ctx, pageProps, host;
4279
4279
  return _regeneratorRuntime().wrap(function _callee$(_context) {
4280
4280
  while (1) switch (_context.prev = _context.next) {
4281
4281
  case 0:
@@ -4290,29 +4290,16 @@ var setupOEMProps = /*#__PURE__*/function () {
4290
4290
  case 5:
4291
4291
  pageProps = _context.sent;
4292
4292
  case 6:
4293
- if (!(ctx.req != null)) {
4294
- _context.next = 15;
4295
- break;
4296
- }
4297
- host = ctx.req.headers.host;
4298
- if (host.includes("localhost")) {
4299
- pageProps.host = "http://" + ctx.req.headers.host;
4300
- } else {
4301
- pageProps.host = "https://" + ctx.req.headers.host;
4293
+ if (ctx.req != null) {
4294
+ host = ctx.req.headers.host;
4295
+ if (host.includes("localhost")) {
4296
+ pageProps.host = "http://" + ctx.req.headers.host;
4297
+ } else {
4298
+ pageProps.host = "https://" + ctx.req.headers.host;
4299
+ }
4302
4300
  }
4303
-
4304
- // get the companyId
4305
- _context.next = 11;
4306
- return fetch(Component.apiUrl + "/api/WhiteLabel/GetCompanyIdFromDomain?domain=" + pageProps.host);
4307
- case 11:
4308
- response = _context.sent;
4309
- _context.next = 14;
4310
- return response.json();
4311
- case 14:
4312
- pageProps.oemCompanyId = _context.sent;
4313
- case 15:
4314
4301
  return _context.abrupt("return", pageProps);
4315
- case 16:
4302
+ case 8:
4316
4303
  case "end":
4317
4304
  return _context.stop();
4318
4305
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.306",
3
+ "version": "1.0.308",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -19,10 +19,6 @@ export const setupOEMProps = async ({Component, ctx}) => {
19
19
  {
20
20
  pageProps.host = "https://" + ctx.req.headers.host;
21
21
  }
22
-
23
- // get the companyId
24
- const response = await fetch(Component.apiUrl + "/api/WhiteLabel/GetCompanyIdFromDomain?domain=" + pageProps.host);
25
- pageProps.oemCompanyId = await response.json();
26
22
  }
27
23
 
28
24
  return pageProps;