@frontegg/redux-store 7.117.0 → 7.119.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.
@@ -26,7 +26,7 @@ import { LoginFlow, LoginStep } from '../interfaces';
26
26
  import { base64urlDecode, deepResetState, delay, errorHandler, errorTraceId, GTMEventAction, publicKeyCredentialToJSON, refreshTokenWithRetry, reportGTMEvent, retryIfNeeded, withRetryConfig } from '../../../helpers';
27
27
  import { initialState } from '../state';
28
28
  import { getSearchParam, isEmailPayload, isUsernamePayload, shouldShowPasswordRotationPromptFunc, TENANT_ID_PARAM_KEY } from '../helpers';
29
- import { AuthStrategyEnum, ContextHolder, FeatureFlags, getTabTenantFromSessionStorage, removeTabTenantFromSessionStorage, WebAuthnDeviceType } from '@frontegg/rest-api';
29
+ import { AuthStrategyEnum, ContextHolder, FeatureFlags, getTabTenantFromSessionStorage, removeTabTenantFromSessionStorage, WebAuthnDeviceType, PreLoginAddressType } from '@frontegg/rest-api';
30
30
  import hostedLoginAuthorizeActions from './hostedLoginAuthorize.actions';
31
31
  import { clearHostedOAuthState } from '../oauthStorage';
32
32
  import { SHOULD_STEP_UP_KEY } from '../../StepUpState/consts';
@@ -410,9 +410,21 @@ export default ((store, api, sharedActions) => {
410
410
  }));
411
411
  const {
412
412
  address,
413
- idpType
413
+ idpType,
414
+ addressType
414
415
  } = preLoginResult != null ? preLoginResult : {};
415
416
  if (address) {
417
+ if (addressType === PreLoginAddressType.External) {
418
+ // Domain-based routing: navigate to the vendor legacy login URL immediately,
419
+ // skipping the SSO interstitial and the SSO/OIDC-specific handling.
420
+ setLoginState({
421
+ loading: false
422
+ });
423
+ onRedirectTo(address, {
424
+ refresh: true
425
+ });
426
+ return;
427
+ }
416
428
  let ssoRedirectUrl = address;
417
429
  if (idpType === SamlVendors.Oidc && !ssoRedirectUrl.includes('redirect_uri')) {
418
430
  const {
@@ -59,19 +59,11 @@ export default ((store, api, sharedActions) => {
59
59
  inviteTokenState
60
60
  } = store.auth.teamState;
61
61
  try {
62
- const [enhancedInviteUserModalFlag] = await actions.getFeatureFlags(['invite_user_modal_enhancements_frontend']);
63
- let data;
64
- if (enhancedInviteUserModalFlag) {
65
- data = await api.teams.createInviteUserLinkV2({
66
- expiresInMinutes: expiresInMinutes != null ? expiresInMinutes : 43200,
67
- shouldSendEmail: shouldSendEmail != null ? shouldSendEmail : true,
68
- roleIds: roleIds != null ? roleIds : []
69
- });
70
- } else {
71
- data = await api.teams.createInviteUserLink({
72
- expiresInMinutes: 43200
73
- });
74
- }
62
+ const data = await api.teams.createInviteUserLinkV2({
63
+ expiresInMinutes: expiresInMinutes != null ? expiresInMinutes : 43200,
64
+ shouldSendEmail: shouldSendEmail != null ? shouldSendEmail : true,
65
+ roleIds: roleIds != null ? roleIds : []
66
+ });
75
67
  actions.setTeamState({
76
68
  inviteTokenState: _extends({}, inviteTokenState, data)
77
69
  });
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.117.0
1
+ /** @license Frontegg v7.119.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.
@@ -417,9 +417,21 @@ var _default = (store, api, sharedActions) => {
417
417
  }));
418
418
  const {
419
419
  address,
420
- idpType
420
+ idpType,
421
+ addressType
421
422
  } = preLoginResult != null ? preLoginResult : {};
422
423
  if (address) {
424
+ if (addressType === _restApi.PreLoginAddressType.External) {
425
+ // Domain-based routing: navigate to the vendor legacy login URL immediately,
426
+ // skipping the SSO interstitial and the SSO/OIDC-specific handling.
427
+ setLoginState({
428
+ loading: false
429
+ });
430
+ onRedirectTo(address, {
431
+ refresh: true
432
+ });
433
+ return;
434
+ }
423
435
  let ssoRedirectUrl = address;
424
436
  if (idpType === _interfaces4.SamlVendors.Oidc && !ssoRedirectUrl.includes('redirect_uri')) {
425
437
  const {
@@ -66,19 +66,11 @@ var _default = (store, api, sharedActions) => {
66
66
  inviteTokenState
67
67
  } = store.auth.teamState;
68
68
  try {
69
- const [enhancedInviteUserModalFlag] = await actions.getFeatureFlags(['invite_user_modal_enhancements_frontend']);
70
- let data;
71
- if (enhancedInviteUserModalFlag) {
72
- data = await api.teams.createInviteUserLinkV2({
73
- expiresInMinutes: expiresInMinutes != null ? expiresInMinutes : 43200,
74
- shouldSendEmail: shouldSendEmail != null ? shouldSendEmail : true,
75
- roleIds: roleIds != null ? roleIds : []
76
- });
77
- } else {
78
- data = await api.teams.createInviteUserLink({
79
- expiresInMinutes: 43200
80
- });
81
- }
69
+ const data = await api.teams.createInviteUserLinkV2({
70
+ expiresInMinutes: expiresInMinutes != null ? expiresInMinutes : 43200,
71
+ shouldSendEmail: shouldSendEmail != null ? shouldSendEmail : true,
72
+ roleIds: roleIds != null ? roleIds : []
73
+ });
82
74
  actions.setTeamState({
83
75
  inviteTokenState: (0, _extends2.default)({}, inviteTokenState, data)
84
76
  });
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.117.0
1
+ /** @license Frontegg v7.119.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/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@frontegg/redux-store",
3
- "version": "7.117.0",
3
+ "version": "7.119.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
9
  "@frontegg/entitlements-javascript-commons": "1.1.2",
10
- "@frontegg/rest-api": "7.117.0",
10
+ "@frontegg/rest-api": "7.119.0",
11
11
  "fast-deep-equal": "3.1.3",
12
12
  "get-value": "^3.0.1",
13
13
  "proxy-compare": "^3.0.0",