@frontegg/redux-store 6.127.0 → 6.128.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.
@@ -1,3 +1,26 @@
1
+ /**
2
+ @notice these file is used inside next js middleware
3
+ middleware file in next js runs inside edge runtime
4
+ using redux-toolkit is not allowed inside edge runtime and breaks the build because it is using eval
5
+ please don't import from redux or from other files that import from redux
6
+ */
1
7
  import { AuthStrategyEnum } from '@frontegg/rest-api';
2
8
  import { LoginStep } from './interfaces';
3
9
  export declare const authStrategyLoginStepMap: Record<Exclude<AuthStrategyEnum, AuthStrategyEnum.NoLocalAuthentication>, LoginStep>;
10
+ export declare const defaultFronteggRoutes: {
11
+ authenticatedUrl: string;
12
+ loginUrl: string;
13
+ logoutUrl: string;
14
+ activateUrl: string;
15
+ impersonationUrl: string;
16
+ acceptInvitationUrl: string;
17
+ forgetPasswordUrl: string;
18
+ resetPhoneNumberUrl: string;
19
+ resetPasswordUrl: string;
20
+ socialLoginCallbackUrl: string;
21
+ signUpUrl: string;
22
+ oidcRedirectUrl: string;
23
+ samlCallbackUrl: string;
24
+ magicLinkCallbackUrl: string;
25
+ hostedLoginRedirectUrl: string;
26
+ };
@@ -1,3 +1,9 @@
1
+ /**
2
+ @notice these file is used inside next js middleware
3
+ middleware file in next js runs inside edge runtime
4
+ using redux-toolkit is not allowed inside edge runtime and breaks the build because it is using eval
5
+ please don't import from redux or from other files that import from redux
6
+ */
1
7
  import { AuthStrategyEnum } from '@frontegg/rest-api';
2
8
  import { LoginStep } from './interfaces';
3
9
  export const authStrategyLoginStepMap = {
@@ -5,4 +11,23 @@ export const authStrategyLoginStepMap = {
5
11
  [AuthStrategyEnum.EmailAndPassword]: LoginStep.loginWithPassword,
6
12
  [AuthStrategyEnum.MagicLink]: LoginStep.magicLinkPreLoginSuccess,
7
13
  [AuthStrategyEnum.SmsCode]: LoginStep.loginWithSmsOtc
14
+ };
15
+
16
+ // don't remove this object because it is used in next js middleware (notice top of the file)
17
+ export const defaultFronteggRoutes = {
18
+ authenticatedUrl: '/',
19
+ loginUrl: '/account/login',
20
+ logoutUrl: '/account/logout',
21
+ activateUrl: '/account/activate',
22
+ impersonationUrl: '/account/impersonate',
23
+ acceptInvitationUrl: '/account/invitation/accept',
24
+ forgetPasswordUrl: '/account/forget-password',
25
+ resetPhoneNumberUrl: '/account/reset-phone-number',
26
+ resetPasswordUrl: '/account/reset-password',
27
+ socialLoginCallbackUrl: '/account/social/success',
28
+ signUpUrl: '/account/sign-up',
29
+ oidcRedirectUrl: '/account/oidc/callback',
30
+ samlCallbackUrl: '/account/saml/callback',
31
+ magicLinkCallbackUrl: '/account/login/magic-link',
32
+ hostedLoginRedirectUrl: '/oauth/callback'
8
33
  };
@@ -26,6 +26,7 @@ import { customLoginState } from './CustomLoginState';
26
26
  import { allAccountsState } from './MSP/AllAccountsState';
27
27
  import { allAccountsDialogsState } from './MSP/AllAccountsState/allAccountsDialogsState';
28
28
  import { securityCenterState } from './SecurityCenterState';
29
+ import { defaultFronteggRoutes } from './LoginState/consts';
29
30
  export const reinitializeState = {
30
31
  isAuthenticated: false,
31
32
  isLoading: true,
@@ -60,22 +61,6 @@ export const reinitializeState = {
60
61
  securityCenterState
61
62
  };
62
63
  export const initialState = _extends({
63
- routes: {
64
- authenticatedUrl: '/',
65
- loginUrl: '/account/login',
66
- logoutUrl: '/account/logout',
67
- activateUrl: '/account/activate',
68
- impersonationUrl: '/account/impersonate',
69
- acceptInvitationUrl: '/account/invitation/accept',
70
- forgetPasswordUrl: '/account/forget-password',
71
- resetPhoneNumberUrl: '/account/reset-phone-number',
72
- resetPasswordUrl: '/account/reset-password',
73
- socialLoginCallbackUrl: '/account/social/success',
74
- signUpUrl: '/account/sign-up',
75
- oidcRedirectUrl: '/account/oidc/callback',
76
- samlCallbackUrl: '/account/saml/callback',
77
- magicLinkCallbackUrl: '/account/login/magic-link',
78
- hostedLoginRedirectUrl: '/oauth/callback'
79
- },
64
+ routes: defaultFronteggRoutes,
80
65
  onRedirectTo: () => {}
81
66
  }, reinitializeState);
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.127.0
1
+ /** @license Frontegg v6.128.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.
@@ -3,13 +3,40 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.authStrategyLoginStepMap = void 0;
6
+ exports.defaultFronteggRoutes = exports.authStrategyLoginStepMap = void 0;
7
7
  var _restApi = require("@frontegg/rest-api");
8
8
  var _interfaces = require("./interfaces");
9
+ /**
10
+ @notice these file is used inside next js middleware
11
+ middleware file in next js runs inside edge runtime
12
+ using redux-toolkit is not allowed inside edge runtime and breaks the build because it is using eval
13
+ please don't import from redux or from other files that import from redux
14
+ */
15
+
9
16
  const authStrategyLoginStepMap = {
10
17
  [_restApi.AuthStrategyEnum.Code]: _interfaces.LoginStep.loginWithOtc,
11
18
  [_restApi.AuthStrategyEnum.EmailAndPassword]: _interfaces.LoginStep.loginWithPassword,
12
19
  [_restApi.AuthStrategyEnum.MagicLink]: _interfaces.LoginStep.magicLinkPreLoginSuccess,
13
20
  [_restApi.AuthStrategyEnum.SmsCode]: _interfaces.LoginStep.loginWithSmsOtc
14
21
  };
15
- exports.authStrategyLoginStepMap = authStrategyLoginStepMap;
22
+
23
+ // don't remove this object because it is used in next js middleware (notice top of the file)
24
+ exports.authStrategyLoginStepMap = authStrategyLoginStepMap;
25
+ const defaultFronteggRoutes = {
26
+ authenticatedUrl: '/',
27
+ loginUrl: '/account/login',
28
+ logoutUrl: '/account/logout',
29
+ activateUrl: '/account/activate',
30
+ impersonationUrl: '/account/impersonate',
31
+ acceptInvitationUrl: '/account/invitation/accept',
32
+ forgetPasswordUrl: '/account/forget-password',
33
+ resetPhoneNumberUrl: '/account/reset-phone-number',
34
+ resetPasswordUrl: '/account/reset-password',
35
+ socialLoginCallbackUrl: '/account/social/success',
36
+ signUpUrl: '/account/sign-up',
37
+ oidcRedirectUrl: '/account/oidc/callback',
38
+ samlCallbackUrl: '/account/saml/callback',
39
+ magicLinkCallbackUrl: '/account/login/magic-link',
40
+ hostedLoginRedirectUrl: '/oauth/callback'
41
+ };
42
+ exports.defaultFronteggRoutes = defaultFronteggRoutes;
@@ -33,6 +33,7 @@ var _CustomLoginState = require("./CustomLoginState");
33
33
  var _AllAccountsState = require("./MSP/AllAccountsState");
34
34
  var _allAccountsDialogsState = require("./MSP/AllAccountsState/allAccountsDialogsState");
35
35
  var _SecurityCenterState = require("./SecurityCenterState");
36
+ var _consts = require("./LoginState/consts");
36
37
  const reinitializeState = {
37
38
  isAuthenticated: false,
38
39
  isLoading: true,
@@ -68,23 +69,7 @@ const reinitializeState = {
68
69
  };
69
70
  exports.reinitializeState = reinitializeState;
70
71
  const initialState = (0, _extends2.default)({
71
- routes: {
72
- authenticatedUrl: '/',
73
- loginUrl: '/account/login',
74
- logoutUrl: '/account/logout',
75
- activateUrl: '/account/activate',
76
- impersonationUrl: '/account/impersonate',
77
- acceptInvitationUrl: '/account/invitation/accept',
78
- forgetPasswordUrl: '/account/forget-password',
79
- resetPhoneNumberUrl: '/account/reset-phone-number',
80
- resetPasswordUrl: '/account/reset-password',
81
- socialLoginCallbackUrl: '/account/social/success',
82
- signUpUrl: '/account/sign-up',
83
- oidcRedirectUrl: '/account/oidc/callback',
84
- samlCallbackUrl: '/account/saml/callback',
85
- magicLinkCallbackUrl: '/account/login/magic-link',
86
- hostedLoginRedirectUrl: '/oauth/callback'
87
- },
72
+ routes: _consts.defaultFronteggRoutes,
88
73
  onRedirectTo: () => {}
89
74
  }, reinitializeState);
90
75
  exports.initialState = initialState;
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.127.0
1
+ /** @license Frontegg v6.128.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,12 +1,12 @@
1
1
  {
2
2
  "name": "@frontegg/redux-store",
3
- "version": "6.127.0",
3
+ "version": "6.128.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/rest-api": "3.1.9",
9
+ "@frontegg/rest-api": "3.1.11",
10
10
  "@reduxjs/toolkit": "1.8.5",
11
11
  "fast-deep-equal": "3.1.3",
12
12
  "redux-saga": "^1.2.1",