@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.
- package/auth/LoginState/saga.js +6 -1
- package/index.js +1 -1
- package/node/auth/LoginState/saga.js +6 -1
- package/node/index.js +1 -1
- package/package.json +1 -1
package/auth/LoginState/saga.js
CHANGED
|
@@ -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 (
|
|
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
|
@@ -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 (
|
|
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