@frontegg/redux-store 7.13.0-alpha.0 → 7.13.0-alpha.1

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.
@@ -61,7 +61,7 @@ export default ((store, api, sharedActions) => {
61
61
  allowedRedirectOrigins = []
62
62
  } = store.auth;
63
63
  if (customLoginAuthenticatedUrl) {
64
- return getPathAndSearchParamsFromUrl(customLoginAuthenticatedUrl);
64
+ return getPathAndSearchParamsFromUrl(customLoginAuthenticatedUrl, preventRedirectUrlOriginCleaning);
65
65
  }
66
66
  const {
67
67
  authenticatedUrl,
@@ -9,7 +9,7 @@ export declare const getRedirectUrl: ({ authenticatedUrl, enforceRedirectToSameS
9
9
  includeQueryParam: boolean;
10
10
  }) => string;
11
11
  export declare const getSearchParamsFromUrl: (url: string) => string | undefined;
12
- export declare const getPathAndSearchParamsFromUrl: (url: string) => string;
12
+ export declare const getPathAndSearchParamsFromUrl: (url: string, preventRedirectUrlOriginCleaning?: boolean) => string;
13
13
  /**
14
14
  *
15
15
  * @param key
@@ -49,10 +49,14 @@ export const getSearchParamsFromUrl = url => {
49
49
  }
50
50
  return undefined;
51
51
  };
52
- export const getPathAndSearchParamsFromUrl = url => {
52
+ export const getPathAndSearchParamsFromUrl = (url, preventRedirectUrlOriginCleaning = false) => {
53
53
  const {
54
- pathname
54
+ pathname,
55
+ href
55
56
  } = new URL(url);
57
+ if (preventRedirectUrlOriginCleaning) {
58
+ return href;
59
+ }
56
60
  const searchParams = getSearchParamsFromUrl(url);
57
61
  if (searchParams) {
58
62
  return pathname + searchParams;
@@ -4,3 +4,4 @@ export * from './converters';
4
4
  export * from './encoders';
5
5
  export * from './random';
6
6
  export * from './gtm';
7
+ export * from './sha256';
package/helpers/index.js CHANGED
@@ -3,4 +3,5 @@ export * from './handlers';
3
3
  export * from './converters';
4
4
  export * from './encoders';
5
5
  export * from './random';
6
- export * from './gtm';
6
+ export * from './gtm';
7
+ export * from './sha256';
package/index.d.ts CHANGED
@@ -13,4 +13,5 @@ export * from './vendor';
13
13
  export * from './vendor/interfaces';
14
14
  export * from './audits';
15
15
  export * from './audits/interfaces';
16
+ export * from './helpers/';
16
17
  export type { NotEntitledJustification } from '@frontegg/rest-api';
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.13.0-alpha.0
1
+ /** @license Frontegg v7.13.0-alpha.1
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.
@@ -18,4 +18,5 @@ export * from './vendor';
18
18
  export * from './vendor/interfaces';
19
19
  export * from './audits';
20
20
  export * from './audits/interfaces';
21
+ export * from './helpers/';
21
22
  export {};
@@ -68,7 +68,7 @@ var _default = (store, api, sharedActions) => {
68
68
  allowedRedirectOrigins = []
69
69
  } = store.auth;
70
70
  if (customLoginAuthenticatedUrl) {
71
- return (0, _helpers.getPathAndSearchParamsFromUrl)(customLoginAuthenticatedUrl);
71
+ return (0, _helpers.getPathAndSearchParamsFromUrl)(customLoginAuthenticatedUrl, preventRedirectUrlOriginCleaning);
72
72
  }
73
73
  const {
74
74
  authenticatedUrl,
@@ -60,10 +60,14 @@ const getSearchParamsFromUrl = url => {
60
60
  return undefined;
61
61
  };
62
62
  exports.getSearchParamsFromUrl = getSearchParamsFromUrl;
63
- const getPathAndSearchParamsFromUrl = url => {
63
+ const getPathAndSearchParamsFromUrl = (url, preventRedirectUrlOriginCleaning = false) => {
64
64
  const {
65
- pathname
65
+ pathname,
66
+ href
66
67
  } = new URL(url);
68
+ if (preventRedirectUrlOriginCleaning) {
69
+ return href;
70
+ }
67
71
  const searchParams = getSearchParamsFromUrl(url);
68
72
  if (searchParams) {
69
73
  return pathname + searchParams;
@@ -68,4 +68,15 @@ Object.keys(_gtm).forEach(function (key) {
68
68
  return _gtm[key];
69
69
  }
70
70
  });
71
+ });
72
+ var _sha = require("./sha256");
73
+ Object.keys(_sha).forEach(function (key) {
74
+ if (key === "default" || key === "__esModule") return;
75
+ if (key in exports && exports[key] === _sha[key]) return;
76
+ Object.defineProperty(exports, key, {
77
+ enumerable: true,
78
+ get: function () {
79
+ return _sha[key];
80
+ }
81
+ });
71
82
  });
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.13.0-alpha.0
1
+ /** @license Frontegg v7.13.0-alpha.1
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.
@@ -172,4 +172,15 @@ Object.keys(_interfaces6).forEach(function (key) {
172
172
  return _interfaces6[key];
173
173
  }
174
174
  });
175
+ });
176
+ var _helpers3 = require("./helpers/");
177
+ Object.keys(_helpers3).forEach(function (key) {
178
+ if (key === "default" || key === "__esModule") return;
179
+ if (key in exports && exports[key] === _helpers3[key]) return;
180
+ Object.defineProperty(exports, key, {
181
+ enumerable: true,
182
+ get: function () {
183
+ return _helpers3[key];
184
+ }
185
+ });
175
186
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/redux-store",
3
- "version": "7.13.0-alpha.0",
3
+ "version": "7.13.0-alpha.1",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Frontegg LTD",