@frontegg/js 6.186.0-alpha.5 → 6.186.0

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
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.186.0-alpha.5
1
+ /** @license Frontegg v6.186.0
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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.186.0-alpha.5
1
+ /** @license Frontegg v6.186.0
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.186.0-alpha.5'
8
+ cdnVersion: '6.186.0'
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.186.0-alpha.5",
3
+ "version": "6.186.0",
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.186.0-alpha.5"
9
+ "@frontegg/types": "6.186.0"
10
10
  },
11
11
  "browserslist": {
12
12
  "production": [
@@ -1452,7 +1452,7 @@ __webpack_require__.r(__webpack_exports__);
1452
1452
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1453
1453
  /* harmony export */ });
1454
1454
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1455
- cdnVersion: '6.186.0-alpha.5'
1455
+ cdnVersion: '6.186.0'
1456
1456
  });
1457
1457
 
1458
1458
  /***/ }),
@@ -3921,6 +3921,7 @@ __webpack_require__.r(__webpack_exports__);
3921
3921
 
3922
3922
 
3923
3923
 
3924
+ const ASSIGNMENT_DEFAULT_ERROR_MESSAGE = 'Assignment action failed. Try again or contact support.';
3924
3925
  function* loadUserApplications() {
3925
3926
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_1__.put)(_reducer__WEBPACK_IMPORTED_MODULE_2__.actions.setApplicationsState({
3926
3927
  loading: true,
@@ -4055,7 +4056,7 @@ function* assignUserToApps({
4055
4056
  callback == null ? void 0 : callback(true);
4056
4057
  } catch (e) {
4057
4058
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_1__.put)(_reducer__WEBPACK_IMPORTED_MODULE_2__.actions.setApplicationsState({
4058
- error: (0,_utils__WEBPACK_IMPORTED_MODULE_4__.errorHandler)(e)
4059
+ error: (0,_utils__WEBPACK_IMPORTED_MODULE_4__.errorHandler)(e, ASSIGNMENT_DEFAULT_ERROR_MESSAGE)
4059
4060
  }));
4060
4061
  callback == null ? void 0 : callback(false);
4061
4062
  }
@@ -4098,7 +4099,7 @@ function* unassignUserFromApps({
4098
4099
  callback == null ? void 0 : callback(true);
4099
4100
  } catch (e) {
4100
4101
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_1__.put)(_reducer__WEBPACK_IMPORTED_MODULE_2__.actions.setApplicationsState({
4101
- error: (0,_utils__WEBPACK_IMPORTED_MODULE_4__.errorHandler)(e)
4102
+ error: (0,_utils__WEBPACK_IMPORTED_MODULE_4__.errorHandler)(e, ASSIGNMENT_DEFAULT_ERROR_MESSAGE)
4102
4103
  }));
4103
4104
  callback == null ? void 0 : callback(false);
4104
4105
  }
@@ -5891,11 +5892,15 @@ function* impersonate(_ref) {
5891
5892
  loading: true
5892
5893
  }));
5893
5894
  try {
5894
- const data = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_1__.call)(_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__.api.impersonate.impersonate, payload);
5895
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_1__.call)(_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__.api.impersonate.impersonate, payload);
5895
5896
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_1__.put)(_reducer__WEBPACK_IMPORTED_MODULE_2__.actions.setImpersonateState({
5896
5897
  step: _interfaces__WEBPACK_IMPORTED_MODULE_4__.ImpersonateStep.success
5897
5898
  }));
5898
5899
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_1__.delay)(1000);
5900
+ /**
5901
+ * We want to avoid cleaning the origin of the redirect URL
5902
+ * because we want to refresh the page and redirect to the same origin on embedded mode
5903
+ */
5899
5904
  yield (0,_LoginState_saga__WEBPACK_IMPORTED_MODULE_5__.afterAuthNavigation)({
5900
5905
  preventRedirectUrlOriginCleaning: true
5901
5906
  });
@@ -7984,6 +7989,9 @@ __webpack_require__.r(__webpack_exports__);
7984
7989
  /**
7985
7990
  * @param url
7986
7991
  * @returns url without the origin if it's the same origin as the current window origin
7992
+ * @deprecated
7993
+ * Don't use this unless you must
7994
+ * In case the url is equal to the window.location.origin, it will return an empty string
7987
7995
  */
7988
7996
  function cleanUrlIfSameOrigin(url) {
7989
7997
  var _window, _window2;
@@ -7997,7 +8005,10 @@ function cleanUrlIfSameOrigin(url) {
7997
8005
  * @param customLoginAuthenticatedUrl custom login authenticated url if exists
7998
8006
  * @returns the authenticated url to redirect to after auth navigation
7999
8007
  */
8000
- function* getUrlForAfterAuthNavigation(customLoginAuthenticatedUrl, preventRedirectUrlOriginCleaning) {
8008
+ function* getUrlForAfterAuthNavigation({
8009
+ customLoginAuthenticatedUrl,
8010
+ preventRedirectUrlOriginCleaning
8011
+ }) {
8001
8012
  const {
8002
8013
  routes,
8003
8014
  includeQueryParam,
@@ -8059,7 +8070,10 @@ function* afterAuthNavigationUtil(resetStateAction, {
8059
8070
  }
8060
8071
  }
8061
8072
  if (!redirectUrl) {
8062
- redirectUrl = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(getUrlForAfterAuthNavigation, customLoginAuthenticatedUrl, preventRedirectUrlOriginCleaning);
8073
+ redirectUrl = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_0__.call)(getUrlForAfterAuthNavigation, {
8074
+ customLoginAuthenticatedUrl,
8075
+ preventRedirectUrlOriginCleaning
8076
+ });
8063
8077
  }
8064
8078
  (_window3 = window) == null ? void 0 : _window3.localStorage.removeItem(_constants__WEBPACK_IMPORTED_MODULE_2__.FRONTEGG_AFTER_AUTH_REDIRECT_URL);
8065
8079
  }
@@ -13283,7 +13297,7 @@ function* validateSSODomainV2({
13283
13297
  }));
13284
13298
  const ssoConfigurations = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.select)(state => state.auth.ssoState.ssoConfigurations);
13285
13299
  try {
13286
- yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__.api.auth.validateSSODomain, ssoConfigId, domainId);
13300
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.call)(_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__.api.auth.validateSSODomainV2, ssoConfigId, domainId);
13287
13301
  const newSsoConfigurations = ssoConfigurations.map(ssoConfig => {
13288
13302
  if (ssoConfig.id === ssoConfigId) {
13289
13303
  return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, ssoConfig, {
@@ -25562,7 +25576,7 @@ __webpack_require__.r(__webpack_exports__);
25562
25576
  /* harmony export */ });
25563
25577
  /* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
25564
25578
  /* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
25565
- /** @license Frontegg v6.186.0-alpha.5
25579
+ /** @license Frontegg v6.186.0
25566
25580
  *
25567
25581
  * This source code is licensed under the MIT license found in the
25568
25582
  * LICENSE file in the root directory of this source tree.
@@ -27517,6 +27531,7 @@ __webpack_require__.r(__webpack_exports__);
27517
27531
  /* harmony export */ "updateTenantApiTokensData": () => (/* binding */ updateTenantApiTokensData),
27518
27532
  /* harmony export */ "updateUserApiTokensData": () => (/* binding */ updateUserApiTokensData),
27519
27533
  /* harmony export */ "validateSSODomain": () => (/* binding */ validateSSODomain),
27534
+ /* harmony export */ "validateSSODomainV2": () => (/* binding */ validateSSODomainV2),
27520
27535
  /* harmony export */ "validateSamlDomain": () => (/* binding */ validateSamlDomain),
27521
27536
  /* harmony export */ "verifyChangePhoneNumber": () => (/* binding */ verifyChangePhoneNumber),
27522
27537
  /* harmony export */ "verifyInviteToken": () => (/* binding */ verifyInviteToken),
@@ -28168,6 +28183,9 @@ async function deleteSSODomain(ssoConfigId, domainId) {
28168
28183
  async function validateSSODomain(ssoConfigId, domainId) {
28169
28184
  return (0,_fetch__WEBPACK_IMPORTED_MODULE_11__.Put)(`${_constants__WEBPACK_IMPORTED_MODULE_12__.urls.team.sso.v1}/configurations/${ssoConfigId}/domains/${domainId}/validate`);
28170
28185
  }
28186
+ async function validateSSODomainV2(ssoConfigId, domainId) {
28187
+ return (0,_fetch__WEBPACK_IMPORTED_MODULE_11__.Put)(`${_constants__WEBPACK_IMPORTED_MODULE_12__.urls.team.sso.v2}/configurations/${ssoConfigId}/domains/${domainId}/validate`);
28188
+ }
28171
28189
  async function getSSODefaultRoles(ssoConfigId) {
28172
28190
  return (0,_fetch__WEBPACK_IMPORTED_MODULE_11__.Get)(`${_constants__WEBPACK_IMPORTED_MODULE_12__.urls.team.sso.v1}/configurations/${ssoConfigId}/roles`);
28173
28191
  }
@@ -29758,7 +29776,7 @@ __webpack_require__.r(__webpack_exports__);
29758
29776
  /* harmony import */ var _entitlements_interfaces__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./entitlements/interfaces */ "../../node_modules/@frontegg/rest-api/entitlements/interfaces.js");
29759
29777
  /* harmony import */ var _security_center_interfaces__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./security-center/interfaces */ "../../node_modules/@frontegg/rest-api/security-center/interfaces.js");
29760
29778
  /* harmony import */ var _applications_interfaces__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./applications/interfaces */ "../../node_modules/@frontegg/rest-api/applications/interfaces.js");
29761
- /** @license Frontegg v3.1.69
29779
+ /** @license Frontegg v3.1.70
29762
29780
  *
29763
29781
  * This source code is licensed under the MIT license found in the
29764
29782
  * LICENSE file in the root directory of this source tree.