@frontegg/js 6.201.0-alpha.1 → 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,8 @@ 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
215
217
  var basename = _options.basename;
216
218
  if (basename) {
217
219
  ContextHolder.setBasename(basename);
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.201.0-alpha.1
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,8 @@ 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
222
224
  var basename = _options.basename;
223
225
  if (basename) {
224
226
  FronteggRestApi.ContextHolder.setBasename(basename);
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.201.0-alpha.1
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.1'
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.1",
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.1"
9
+ "@frontegg/types": "6.201.0-alpha.2"
10
10
  },
11
11
  "browserslist": {
12
12
  "production": [
@@ -549,6 +549,8 @@ 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
552
554
  var basename = _options.basename;
553
555
  if (basename) {
554
556
  _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__.ContextHolder.setBasename(basename);
@@ -1572,7 +1574,7 @@ __webpack_require__.r(__webpack_exports__);
1572
1574
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1573
1575
  /* harmony export */ });
1574
1576
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1575
- cdnVersion: '6.201.0-alpha.1'
1577
+ cdnVersion: '6.201.0-alpha.2'
1576
1578
  });
1577
1579
 
1578
1580
  /***/ }),
@@ -6998,7 +7000,8 @@ function* handleHostedLoginCallback({
6998
7000
  routes: state.auth.routes,
6999
7001
  urlStrategy: state.root.urlStrategy
7000
7002
  }));
7001
- 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}`;
7002
7005
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_CustomLoginState_saga__WEBPACK_IMPORTED_MODULE_15__.loadCustomLoginRoutes);
7003
7006
  const customLoginSearchParam = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.select)(state => {
7004
7007
  var _state$auth$customLog2;
@@ -9037,6 +9040,7 @@ function* verifyMFAWebAuthnForLogin({
9037
9040
  __webpack_require__.r(__webpack_exports__);
9038
9041
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9039
9042
  /* harmony export */ "TENANT_ID_PARAM_KEY": () => (/* binding */ TENANT_ID_PARAM_KEY),
9043
+ /* harmony export */ "getBaseNameWithoutSlashSuffix": () => (/* binding */ getBaseNameWithoutSlashSuffix),
9040
9044
  /* harmony export */ "getMfaStepForEnrolledUsers": () => (/* binding */ getMfaStepForEnrolledUsers),
9041
9045
  /* harmony export */ "getMfaStepForNotEnrolledUsers": () => (/* binding */ getMfaStepForNotEnrolledUsers),
9042
9046
  /* harmony export */ "getNumberOfMfaDevices": () => (/* binding */ getNumberOfMfaDevices),
@@ -9186,6 +9190,13 @@ const isOauthCallbackRoute = activeUri => {
9186
9190
  function isEmailPayload(payload) {
9187
9191
  return 'email' in payload;
9188
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
+ };
9189
9200
 
9190
9201
  /***/ }),
9191
9202
 
@@ -26000,7 +26011,7 @@ __webpack_require__.r(__webpack_exports__);
26000
26011
  /* harmony export */ });
26001
26012
  /* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
26002
26013
  /* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
26003
- /** @license Frontegg v6.201.0-alpha.1
26014
+ /** @license Frontegg v6.201.0-alpha.2
26004
26015
  *
26005
26016
  * This source code is licensed under the MIT license found in the
26006
26017
  * LICENSE file in the root directory of this source tree.