@frontegg/js 6.201.0-alpha.0 → 6.201.0-alpha.2

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.
@@ -212,6 +212,12 @@ export var FronteggApp = /*#__PURE__*/function () {
212
212
 
213
213
  // for feature flags (for entitlements)
214
214
  ContextHolder.setAppName(appName);
215
+
216
+ // pay attention: basename is used from the router base name, then if it's empty it will be the frontegg options basename
217
+ var basename = _options.basename;
218
+ if (basename) {
219
+ ContextHolder.setBasename(basename);
220
+ }
215
221
  }
216
222
 
217
223
  /**
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.201.0-alpha.0
1
+ /** @license Frontegg v6.201.0-alpha.2
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -219,6 +219,12 @@ var FronteggApp = /*#__PURE__*/function () {
219
219
 
220
220
  // for feature flags (for entitlements)
221
221
  FronteggRestApi.ContextHolder.setAppName(appName);
222
+
223
+ // pay attention: basename is used from the router base name, then if it's empty it will be the frontegg options basename
224
+ var basename = _options.basename;
225
+ if (basename) {
226
+ FronteggRestApi.ContextHolder.setBasename(basename);
227
+ }
222
228
  }
223
229
 
224
230
  /**
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.201.0-alpha.0
1
+ /** @license Frontegg v6.201.0-alpha.2
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/node/version.js CHANGED
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _default = {
8
- cdnVersion: '6.201.0-alpha.0'
8
+ cdnVersion: '6.201.0-alpha.2'
9
9
  };
10
10
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@frontegg/js",
3
- "version": "6.201.0-alpha.0",
3
+ "version": "6.201.0-alpha.2",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Frontegg LTD",
7
7
  "dependencies": {
8
8
  "@babel/runtime": "^7.18.6",
9
- "@frontegg/types": "6.201.0-alpha.0"
9
+ "@frontegg/types": "6.201.0-alpha.2"
10
10
  },
11
11
  "browserslist": {
12
12
  "production": [
@@ -549,6 +549,12 @@ var FronteggApp = /*#__PURE__*/function () {
549
549
 
550
550
  // for feature flags (for entitlements)
551
551
  _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__.ContextHolder.setAppName(appName);
552
+
553
+ // pay attention: basename is used from the router base name, then if it's empty it will be the frontegg options basename
554
+ var basename = _options.basename;
555
+ if (basename) {
556
+ _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__.ContextHolder.setBasename(basename);
557
+ }
552
558
  }
553
559
 
554
560
  /**
@@ -1568,7 +1574,7 @@ __webpack_require__.r(__webpack_exports__);
1568
1574
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1569
1575
  /* harmony export */ });
1570
1576
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1571
- cdnVersion: '6.201.0-alpha.0'
1577
+ cdnVersion: '6.201.0-alpha.2'
1572
1578
  });
1573
1579
 
1574
1580
  /***/ }),
@@ -6994,7 +7000,8 @@ function* handleHostedLoginCallback({
6994
7000
  routes: state.auth.routes,
6995
7001
  urlStrategy: state.root.urlStrategy
6996
7002
  }));
6997
- let redirectUrl = `${window.location.origin}${urlStrategy === 'path' ? '' : '#'}${routes.hostedLoginRedirectUrl}`;
7003
+ const basename = (0,_utils__WEBPACK_IMPORTED_MODULE_8__.getBaseNameWithoutSlashSuffix)();
7004
+ let redirectUrl = `${window.location.origin}${urlStrategy === 'path' ? '' : '#'}${basename != null ? basename : ''}${routes.hostedLoginRedirectUrl}`;
6998
7005
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_15__.loadCustomLoginRoutes);
6999
7006
  const customLoginSearchParam = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.select)(state => {
7000
7007
  var _state$auth$customLog2;
@@ -9033,6 +9040,7 @@ function* verifyMFAWebAuthnForLogin({
9033
9040
  __webpack_require__.r(__webpack_exports__);
9034
9041
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9035
9042
  /* harmony export */ "TENANT_ID_PARAM_KEY": () => (/* binding */ TENANT_ID_PARAM_KEY),
9043
+ /* harmony export */ "getBaseNameWithoutSlashSuffix": () => (/* binding */ getBaseNameWithoutSlashSuffix),
9036
9044
  /* harmony export */ "getMfaStepForEnrolledUsers": () => (/* binding */ getMfaStepForEnrolledUsers),
9037
9045
  /* harmony export */ "getMfaStepForNotEnrolledUsers": () => (/* binding */ getMfaStepForNotEnrolledUsers),
9038
9046
  /* harmony export */ "getNumberOfMfaDevices": () => (/* binding */ getNumberOfMfaDevices),
@@ -9182,6 +9190,13 @@ const isOauthCallbackRoute = activeUri => {
9182
9190
  function isEmailPayload(payload) {
9183
9191
  return 'email' in payload;
9184
9192
  }
9193
+ const getBaseNameWithoutSlashSuffix = () => {
9194
+ const basename = _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_0__.ContextHolder.getBasename();
9195
+ if (basename != null && basename.endsWith('/')) {
9196
+ return basename.slice(0, -1);
9197
+ }
9198
+ return basename;
9199
+ };
9185
9200
 
9186
9201
  /***/ }),
9187
9202
 
@@ -25996,7 +26011,7 @@ __webpack_require__.r(__webpack_exports__);
25996
26011
  /* harmony export */ });
25997
26012
  /* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
25998
26013
  /* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
25999
- /** @license Frontegg v6.201.0-alpha.0
26014
+ /** @license Frontegg v6.201.0-alpha.2
26000
26015
  *
26001
26016
  * This source code is licensed under the MIT license found in the
26002
26017
  * LICENSE file in the root directory of this source tree.