@frontegg/redux-store 7.41.0-alpha.0 → 7.41.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.
@@ -996,6 +996,9 @@ export default ((store, api, sharedActions) => {
996
996
  loading: false
997
997
  }
998
998
  });
999
+ actions.setAuthState({
1000
+ userIp: ip
1001
+ });
999
1002
  callback == null ? void 0 : callback(true);
1000
1003
  } catch (e) {
1001
1004
  actions.setAuthState({
@@ -245,8 +245,8 @@ export default ((store, api, sharedActions) => {
245
245
  error: null
246
246
  });
247
247
  try {
248
- var _store$auth$userIpDat, _store$auth$userIpDat2;
249
- const userIp = (_store$auth$userIpDat = (_store$auth$userIpDat2 = store.auth.userIpData) == null ? void 0 : _store$auth$userIpDat2.ip) != null ? _store$auth$userIpDat : '';
248
+ var _ref, _store$auth$userIpDat;
249
+ const userIp = (_ref = ((_store$auth$userIpDat = store.auth.userIpData) == null ? void 0 : _store$auth$userIpDat.ip) || store.auth.userIp) != null ? _ref : '';
250
250
  await Promise.all([api.auth.createIPRestriction({
251
251
  ip: userIp,
252
252
  isActive: true,
package/auth/index.js CHANGED
@@ -86,6 +86,7 @@ export const createAuthState = _overrideState => {
86
86
  user: null,
87
87
  error: undefined,
88
88
  errorByRequest: {},
89
+ userIp: undefined,
89
90
  userIpData: {
90
91
  loading: false
91
92
  }
@@ -58,6 +58,7 @@ export interface AuthState extends Routes, PluginOptions {
58
58
  error?: any;
59
59
  errorByRequest: ErrorByRequest;
60
60
  isAuthenticated: boolean;
61
+ userIp?: string;
61
62
  userIpData?: UserIPData;
62
63
  isLoading: boolean;
63
64
  keepSessionAlive?: boolean;
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.41.0-alpha.0
1
+ /** @license Frontegg v7.41.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.
@@ -30,7 +30,8 @@ export default ((store, api, sharedActions) => {
30
30
  await actions.setAuthState({
31
31
  userIpData: {
32
32
  ip
33
- }
33
+ },
34
+ userIp: ip
34
35
  });
35
36
  callback == null ? void 0 : callback(true, ip);
36
37
  } catch (e) {
@@ -1003,6 +1003,9 @@ var _default = (store, api, sharedActions) => {
1003
1003
  loading: false
1004
1004
  }
1005
1005
  });
1006
+ actions.setAuthState({
1007
+ userIp: ip
1008
+ });
1006
1009
  callback == null ? void 0 : callback(true);
1007
1010
  } catch (e) {
1008
1011
  actions.setAuthState({
@@ -252,8 +252,8 @@ var _default = (store, api, sharedActions) => {
252
252
  error: null
253
253
  });
254
254
  try {
255
- var _store$auth$userIpDat, _store$auth$userIpDat2;
256
- const userIp = (_store$auth$userIpDat = (_store$auth$userIpDat2 = store.auth.userIpData) == null ? void 0 : _store$auth$userIpDat2.ip) != null ? _store$auth$userIpDat : '';
255
+ var _ref, _store$auth$userIpDat;
256
+ const userIp = (_ref = ((_store$auth$userIpDat = store.auth.userIpData) == null ? void 0 : _store$auth$userIpDat.ip) || store.auth.userIp) != null ? _ref : '';
257
257
  await Promise.all([api.auth.createIPRestriction({
258
258
  ip: userIp,
259
259
  isActive: true,
@@ -471,6 +471,7 @@ const createAuthState = _overrideState => {
471
471
  user: null,
472
472
  error: undefined,
473
473
  errorByRequest: {},
474
+ userIp: undefined,
474
475
  userIpData: {
475
476
  loading: false
476
477
  }
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.41.0-alpha.0
1
+ /** @license Frontegg v7.41.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.
@@ -36,7 +36,8 @@ var _default = (store, api, sharedActions) => {
36
36
  await actions.setAuthState({
37
37
  userIpData: {
38
38
  ip
39
- }
39
+ },
40
+ userIp: ip
40
41
  });
41
42
  callback == null ? void 0 : callback(true, ip);
42
43
  } catch (e) {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@frontegg/redux-store",
3
- "version": "7.41.0-alpha.0",
3
+ "version": "7.41.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
9
  "@frontegg/entitlements-javascript-commons": "1.1.2",
10
- "@frontegg/rest-api": "7.41.0-alpha.0",
10
+ "@frontegg/rest-api": "7.41.0-alpha.2",
11
11
  "fast-deep-equal": "3.1.3",
12
12
  "get-value": "^3.0.1",
13
13
  "proxy-compare": "^3.0.0",