@frontegg/redux-store 6.0.3-alpha.1 → 6.0.3-alpha.4

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.
@@ -249,10 +249,15 @@ function* refreshTokenEmbedded() {
249
249
  }));
250
250
  const url = new URL((_window2 = window) == null ? void 0 : _window2.location.href);
251
251
  const invitationToken = url.searchParams.get('invitationToken');
252
+ const redirectRoutes = [routes.socialLoginCallbackUrl, routes.oidcRedirectUrl, routes.samlCallbackUrl];
253
+
254
+ if (!invitationToken) {
255
+ redirectRoutes.push(routes.loginUrl, routes.signUpUrl);
256
+ }
252
257
 
253
258
  if (shouldNavigateToRegisterQuicKLogin) {
254
259
  onRedirectTo(routes.loginUrl);
255
- } else if (!invitationToken && [routes.loginUrl, routes.socialLoginCallbackUrl, routes.signUpUrl, routes.oidcRedirectUrl, routes.samlCallbackUrl].some(url => url && window.location.pathname.endsWith(url))) {
260
+ } else if (redirectRoutes.some(url => url && window.location.pathname.endsWith(url))) {
256
261
  if (loginState.isNewUser && routes.signUpSuccessUrl && routes.socialLoginCallbackUrl === window.location.pathname) {
257
262
  onRedirectTo(routes.signUpSuccessUrl, {
258
263
  refresh: routes.signUpSuccessUrl.startsWith('http')
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.0.3-alpha.1
1
+ /** @license Frontegg v6.0.3-alpha.4
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.
@@ -298,10 +298,15 @@ function* refreshTokenEmbedded() {
298
298
  }));
299
299
  const url = new URL((_window2 = window) == null ? void 0 : _window2.location.href);
300
300
  const invitationToken = url.searchParams.get('invitationToken');
301
+ const redirectRoutes = [routes.socialLoginCallbackUrl, routes.oidcRedirectUrl, routes.samlCallbackUrl];
302
+
303
+ if (!invitationToken) {
304
+ redirectRoutes.push(routes.loginUrl, routes.signUpUrl);
305
+ }
301
306
 
302
307
  if (shouldNavigateToRegisterQuicKLogin) {
303
308
  onRedirectTo(routes.loginUrl);
304
- } else if (!invitationToken && [routes.loginUrl, routes.socialLoginCallbackUrl, routes.signUpUrl, routes.oidcRedirectUrl, routes.samlCallbackUrl].some(url => url && window.location.pathname.endsWith(url))) {
309
+ } else if (redirectRoutes.some(url => url && window.location.pathname.endsWith(url))) {
305
310
  if (loginState.isNewUser && routes.signUpSuccessUrl && routes.socialLoginCallbackUrl === window.location.pathname) {
306
311
  onRedirectTo(routes.signUpSuccessUrl, {
307
312
  refresh: routes.signUpSuccessUrl.startsWith('http')
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.0.3-alpha.1
1
+ /** @license Frontegg v6.0.3-alpha.4
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/redux-store",
3
- "version": "6.0.3-alpha.1",
3
+ "version": "6.0.3-alpha.4",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Frontegg LTD",