@frontegg/js 6.159.0 → 6.160.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.159.0
1
+ /** @license Frontegg v6.160.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.159.0
1
+ /** @license Frontegg v6.160.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.159.0'
8
+ cdnVersion: '6.160.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.159.0",
3
+ "version": "6.160.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.159.0"
9
+ "@frontegg/types": "6.160.0"
10
10
  },
11
11
  "browserslist": {
12
12
  "production": [
@@ -1416,7 +1416,7 @@ __webpack_require__.r(__webpack_exports__);
1416
1416
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1417
1417
  /* harmony export */ });
1418
1418
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1419
- cdnVersion: '6.159.0'
1419
+ cdnVersion: '6.160.0'
1420
1420
  });
1421
1421
 
1422
1422
  /***/ }),
@@ -5775,6 +5775,7 @@ const Matcher = {};
5775
5775
  __webpack_require__.r(__webpack_exports__);
5776
5776
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5777
5777
  /* harmony export */ "AuthStrategyEnum": () => (/* reexport safe */ _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_0__.AuthStrategyEnum),
5778
+ /* harmony export */ "LoginActionTypes": () => (/* binding */ LoginActionTypes),
5778
5779
  /* harmony export */ "LoginFlow": () => (/* binding */ LoginFlow),
5779
5780
  /* harmony export */ "LoginStep": () => (/* binding */ LoginStep),
5780
5781
  /* harmony export */ "QuickLoginStrategy": () => (/* binding */ QuickLoginStrategy)
@@ -5812,6 +5813,12 @@ let QuickLoginStrategy;
5812
5813
  QuickLoginStrategy["Sms"] = "sms";
5813
5814
  })(QuickLoginStrategy || (QuickLoginStrategy = {}));
5814
5815
 
5816
+ let LoginActionTypes;
5817
+ (function (LoginActionTypes) {
5818
+ LoginActionTypes["social-login"] = "social-login";
5819
+ LoginActionTypes["custom-social-login"] = "custom-social-login";
5820
+ LoginActionTypes["direct"] = "direct";
5821
+ })(LoginActionTypes || (LoginActionTypes = {}));
5815
5822
 
5816
5823
  /***/ }),
5817
5824
 
@@ -6464,9 +6471,11 @@ function* refreshOrRequestHostedLoginAuthorizeV2({
6464
6471
  payload: {
6465
6472
  additionalParams,
6466
6473
  shouldRedirectToLogin,
6467
- firstTime
6474
+ firstTime,
6475
+ loginDirectAction
6468
6476
  }
6469
6477
  }) {
6478
+ var _additionalParams;
6470
6479
  if (firstTime) {
6471
6480
  const {
6472
6481
  urlStrategy
@@ -6486,7 +6495,11 @@ function* refreshOrRequestHostedLoginAuthorizeV2({
6486
6495
  } = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.select)(state => ({
6487
6496
  disableSilentRefresh: state.auth.disableSilentRefresh
6488
6497
  }));
6489
- if ((additionalParams == null ? void 0 : additionalParams.prompt) === 'login') {
6498
+ if (loginDirectAction) {
6499
+ additionalParams = additionalParams || {};
6500
+ additionalParams["login_direct_action"] = btoa(JSON.stringify(loginDirectAction));
6501
+ }
6502
+ if (((_additionalParams = additionalParams) == null ? void 0 : _additionalParams.prompt) === 'login') {
6490
6503
  yield requestHostedLoginAuthorize(additionalParams);
6491
6504
  return;
6492
6505
  }
@@ -6916,7 +6929,7 @@ function* preLogin({
6916
6929
  }));
6917
6930
  ssoRedirectUrl += `&redirect_uri=${window.location.origin}${oidcRedirectUrl}`;
6918
6931
  }
6919
- if (_toolkit__WEBPACK_IMPORTED_MODULE_25__["default"].isAvailable()) {
6932
+ if (_toolkit__WEBPACK_IMPORTED_MODULE_25__["default"].isAvailable("loginWithSSO")) {
6920
6933
  _toolkit__WEBPACK_IMPORTED_MODULE_25__["default"].loginWithSSO(email);
6921
6934
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_4__.actions.setLoginState({
6922
6935
  loading: false,
@@ -15511,7 +15524,9 @@ const reducers = {
15511
15524
  };
15512
15525
  const actions = {
15513
15526
  loadSocialLoginsConfiguration: (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createAction)(`${_constants__WEBPACK_IMPORTED_MODULE_2__.authStoreName}/loadSocialLoginsConfiguration`),
15514
- loadSocialLoginsConfigurationV2: (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createAction)(`${_constants__WEBPACK_IMPORTED_MODULE_2__.authStoreName}/loadSocialLoginsConfigurationV2`),
15527
+ loadSocialLoginsConfigurationV2: (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createAction)(`${_constants__WEBPACK_IMPORTED_MODULE_2__.authStoreName}/loadSocialLoginsConfigurationV2`, payload => ({
15528
+ payload
15529
+ })),
15515
15530
  loginViaSocialLogin: (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createAction)(`${_constants__WEBPACK_IMPORTED_MODULE_2__.authStoreName}/loginViaSocialLogin`, payload => ({
15516
15531
  payload
15517
15532
  })),
@@ -15601,8 +15616,9 @@ function* getSocialLoginsConfigurationsV2() {
15601
15616
  }
15602
15617
  return socialLoginsConfigV2;
15603
15618
  }
15604
- function* loadSocialLoginsConfigurationsV2() {
15619
+ function* loadSocialLoginsConfigurationsV2(payload) {
15605
15620
  try {
15621
+ var _payload$callback;
15606
15622
  const context = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.select)(state => state.root.context);
15607
15623
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_3__.actions.setSocialLoginsState({
15608
15624
  loading: true
@@ -15621,13 +15637,17 @@ function* loadSocialLoginsConfigurationsV2() {
15621
15637
  authorizationUrl: authorizationUrl ? `${baseUrl}${authorizationUrl}` : null
15622
15638
  });
15623
15639
  });
15624
- yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_3__.actions.setSocialLoginsState({
15640
+ const newState = {
15625
15641
  socialLoginsConfigV2: socialLoginsConfigWithFullUrl,
15626
15642
  customSocialLoginsConfig,
15627
15643
  loading: false,
15628
15644
  firstLoad: false
15629
- }));
15645
+ };
15646
+ yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_3__.actions.setSocialLoginsState(newState));
15647
+ payload == null ? void 0 : (_payload$callback = payload.callback) == null ? void 0 : _payload$callback.call(payload, newState);
15630
15648
  } catch (e) {
15649
+ var _payload$callback2;
15650
+ payload == null ? void 0 : (_payload$callback2 = payload.callback) == null ? void 0 : _payload$callback2.call(payload, null, e);
15631
15651
  yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_3__.actions.setSocialLoginsState({
15632
15652
  error: (0,_utils__WEBPACK_IMPORTED_MODULE_5__.errorHandler)(e),
15633
15653
  loading: false,
@@ -18074,6 +18094,7 @@ __webpack_require__.r(__webpack_exports__);
18074
18094
  /* harmony export */ "GroupRelations": () => (/* reexport safe */ _GroupsState_interfaces__WEBPACK_IMPORTED_MODULE_20__.GroupRelations),
18075
18095
  /* harmony export */ "GroupsStateKeys": () => (/* reexport safe */ _GroupsState_interfaces__WEBPACK_IMPORTED_MODULE_20__.GroupsStateKeys),
18076
18096
  /* harmony export */ "ImpersonateStep": () => (/* reexport safe */ _ImpersonationState_interfaces__WEBPACK_IMPORTED_MODULE_5__.ImpersonateStep),
18097
+ /* harmony export */ "LoginActionTypes": () => (/* reexport safe */ _LoginState_interfaces__WEBPACK_IMPORTED_MODULE_1__.LoginActionTypes),
18077
18098
  /* harmony export */ "LoginFlow": () => (/* reexport safe */ _LoginState_interfaces__WEBPACK_IMPORTED_MODULE_1__.LoginFlow),
18078
18099
  /* harmony export */ "LoginStep": () => (/* reexport safe */ _LoginState_interfaces__WEBPACK_IMPORTED_MODULE_1__.LoginStep),
18079
18100
  /* harmony export */ "MFAStep": () => (/* reexport safe */ _MfaState_interfaces__WEBPACK_IMPORTED_MODULE_15__.MFAStep),
@@ -21781,8 +21802,12 @@ class FronteggNativeModule {
21781
21802
  isJsInterfaceAvailable() {
21782
21803
  return window.FronteggNativeBridge != null;
21783
21804
  }
21784
- isAvailable() {
21785
- return this.isWebkitAvailable() || this.isJsInterfaceAvailable();
21805
+ isAvailable(method) {
21806
+ if (this.isWebkitAvailable() || this.isJsInterfaceAvailable()) {
21807
+ var _window$FronteggNativ3, _window$FronteggNativ4;
21808
+ return (_window$FronteggNativ3 = (_window$FronteggNativ4 = window.FronteggNativeBridgeFunctions) == null ? void 0 : _window$FronteggNativ4[method]) != null ? _window$FronteggNativ3 : false;
21809
+ }
21810
+ return false;
21786
21811
  }
21787
21812
  }
21788
21813
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (new FronteggNativeModule());
@@ -23408,7 +23433,7 @@ __webpack_require__.r(__webpack_exports__);
23408
23433
  /* harmony export */ });
23409
23434
  /* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
23410
23435
  /* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
23411
- /** @license Frontegg v6.159.0
23436
+ /** @license Frontegg v6.160.0
23412
23437
  *
23413
23438
  * This source code is licensed under the MIT license found in the
23414
23439
  * LICENSE file in the root directory of this source tree.