@frontegg/redux-store 5.78.2 → 5.79.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.
- package/auth/LoginState/index.d.ts +8 -2
- package/auth/index.d.ts +5 -1
- package/auth/index.js +6 -3
- package/auth/reducer.d.ts +5 -1
- package/node/auth/index.js +1 -1
- package/node/{index-91a6e5b6.js → index-a3c0e1be.js} +6 -3
- package/node/index.js +1 -1
- package/node/toolkit/index.js +1 -1
- package/package.json +1 -1
|
@@ -95,7 +95,11 @@ declare const actions: {
|
|
|
95
95
|
loginWithMfa: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<ILoginWithMfa, boolean>], WithCallback<ILoginWithMfa, boolean>, string, never, never>;
|
|
96
96
|
recoverMfa: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[IRecoverMFAToken], IRecoverMFAToken, string, never, never>;
|
|
97
97
|
logout: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[((() => void) | undefined)?], (() => void) | undefined, string, never, never>;
|
|
98
|
-
silentLogout: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(
|
|
98
|
+
silentLogout: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(WithCallback<{
|
|
99
|
+
callbackTimeout?: number | undefined;
|
|
100
|
+
}, boolean> | undefined)?], WithCallback<{
|
|
101
|
+
callbackTimeout?: number | undefined;
|
|
102
|
+
}, boolean> | undefined, string, never, never>;
|
|
99
103
|
checkIfAllowToRememberMfaDevice: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
|
|
100
104
|
mfaToken: string;
|
|
101
105
|
}], {
|
|
@@ -137,7 +141,9 @@ declare type DispatchedActions = {
|
|
|
137
141
|
loginWithMfa: (payload: WithCallback<ILoginWithMfa>) => void;
|
|
138
142
|
recoverMfa: (payload: IRecoverMFAToken) => void;
|
|
139
143
|
logout: (payload?: () => void) => void;
|
|
140
|
-
silentLogout: (payload?:
|
|
144
|
+
silentLogout: (payload?: WithCallback<{
|
|
145
|
+
callbackTimeout?: number;
|
|
146
|
+
}>) => void;
|
|
141
147
|
checkIfAllowToRememberMfaDevice: (payload: {
|
|
142
148
|
mfaToken: string;
|
|
143
149
|
}) => void;
|
package/auth/index.d.ts
CHANGED
|
@@ -303,7 +303,11 @@ declare const _default: {
|
|
|
303
303
|
loginWithMfa: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").ILoginWithMfa, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").ILoginWithMfa, boolean>, string, never, never>;
|
|
304
304
|
recoverMfa: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IRecoverMFAToken], import("@frontegg/rest-api").IRecoverMFAToken, string, never, never>;
|
|
305
305
|
logout: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[((() => void) | undefined)?], (() => void) | undefined, string, never, never>;
|
|
306
|
-
silentLogout: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[((
|
|
306
|
+
silentLogout: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(import("../interfaces").WithCallback<{
|
|
307
|
+
callbackTimeout?: number | undefined;
|
|
308
|
+
}, boolean> | undefined)?], import("../interfaces").WithCallback<{
|
|
309
|
+
callbackTimeout?: number | undefined;
|
|
310
|
+
}, boolean> | undefined, string, never, never>;
|
|
307
311
|
checkIfAllowToRememberMfaDevice: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
|
|
308
312
|
mfaToken: string;
|
|
309
313
|
}], {
|
package/auth/index.js
CHANGED
|
@@ -1518,10 +1518,12 @@ function* refreshTokenEmbedded() {
|
|
|
1518
1518
|
isAuthenticated: true,
|
|
1519
1519
|
loginState: Object.assign(Object.assign({}, loginState), { quickLoginToRegister, flow: shouldNavigateToRegisterQuicKLogin ? LoginFlow.RegisterQuickLogin : LoginFlow.Login })
|
|
1520
1520
|
}));
|
|
1521
|
+
const url = new URL(window === null || window === void 0 ? void 0 : window.location.href);
|
|
1522
|
+
const invitationToken = url.searchParams.get('invitationToken');
|
|
1521
1523
|
if (shouldNavigateToRegisterQuicKLogin) {
|
|
1522
1524
|
onRedirectTo(routes.loginUrl);
|
|
1523
1525
|
}
|
|
1524
|
-
else if ([routes.loginUrl, routes.socialLoginCallbackUrl, routes.signUpUrl, routes.oidcRedirectUrl, routes.samlCallbackUrl]
|
|
1526
|
+
else if (!invitationToken && [routes.loginUrl, routes.socialLoginCallbackUrl, routes.signUpUrl, routes.oidcRedirectUrl, routes.samlCallbackUrl]
|
|
1525
1527
|
.some(url => url && window.location.pathname.endsWith(url))) {
|
|
1526
1528
|
if (loginState.isNewUser && routes.signUpSuccessUrl && routes.socialLoginCallbackUrl === window.location.pathname) {
|
|
1527
1529
|
onRedirectTo(routes.signUpSuccessUrl, { refresh: routes.signUpSuccessUrl.startsWith('http') });
|
|
@@ -2038,12 +2040,13 @@ function* logout({ payload }) {
|
|
|
2038
2040
|
payload === null || payload === void 0 ? void 0 : payload();
|
|
2039
2041
|
}
|
|
2040
2042
|
function* silentLogout({ payload }) {
|
|
2043
|
+
var _a;
|
|
2041
2044
|
try {
|
|
2042
2045
|
yield call(api.auth.logout);
|
|
2043
2046
|
}
|
|
2044
|
-
catch (
|
|
2047
|
+
catch (_b) {
|
|
2045
2048
|
}
|
|
2046
|
-
setTimeout(() => payload === null || payload === void 0 ? void 0 : payload(), 500);
|
|
2049
|
+
setTimeout(() => { var _a; return (_a = payload === null || payload === void 0 ? void 0 : payload.callback) === null || _a === void 0 ? void 0 : _a.call(payload, true); }, (_a = payload === null || payload === void 0 ? void 0 : payload.callbackTimeout) !== null && _a !== void 0 ? _a : 500);
|
|
2047
2050
|
}
|
|
2048
2051
|
function* loginSagas() {
|
|
2049
2052
|
yield takeLeading(actions.requestAuthorize, requestAuthorize);
|
package/auth/reducer.d.ts
CHANGED
|
@@ -273,7 +273,11 @@ declare const actions: {
|
|
|
273
273
|
loginWithMfa: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").ILoginWithMfa, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").ILoginWithMfa, boolean>, string, never, never>;
|
|
274
274
|
recoverMfa: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IRecoverMFAToken], import("@frontegg/rest-api").IRecoverMFAToken, string, never, never>;
|
|
275
275
|
logout: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[((() => void) | undefined)?], (() => void) | undefined, string, never, never>;
|
|
276
|
-
silentLogout: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[((
|
|
276
|
+
silentLogout: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(import("../interfaces").WithCallback<{
|
|
277
|
+
callbackTimeout?: number | undefined;
|
|
278
|
+
}, boolean> | undefined)?], import("../interfaces").WithCallback<{
|
|
279
|
+
callbackTimeout?: number | undefined;
|
|
280
|
+
}, boolean> | undefined, string, never, never>;
|
|
277
281
|
checkIfAllowToRememberMfaDevice: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
|
|
278
282
|
mfaToken: string;
|
|
279
283
|
}], {
|
package/node/auth/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var auth_index = require('../index-
|
|
5
|
+
var auth_index = require('../index-a3c0e1be.js');
|
|
6
6
|
var constants = require('../constants-52e37c08.js');
|
|
7
7
|
var restApi = require('@frontegg/rest-api');
|
|
8
8
|
require('@reduxjs/toolkit');
|
|
@@ -1437,10 +1437,12 @@ function* refreshTokenEmbedded() {
|
|
|
1437
1437
|
isAuthenticated: true,
|
|
1438
1438
|
loginState: Object.assign(Object.assign({}, loginState), { quickLoginToRegister, flow: shouldNavigateToRegisterQuicKLogin ? exports.LoginFlow.RegisterQuickLogin : exports.LoginFlow.Login })
|
|
1439
1439
|
}));
|
|
1440
|
+
const url = new URL(window === null || window === void 0 ? void 0 : window.location.href);
|
|
1441
|
+
const invitationToken = url.searchParams.get('invitationToken');
|
|
1440
1442
|
if (shouldNavigateToRegisterQuicKLogin) {
|
|
1441
1443
|
onRedirectTo(routes.loginUrl);
|
|
1442
1444
|
}
|
|
1443
|
-
else if ([routes.loginUrl, routes.socialLoginCallbackUrl, routes.signUpUrl, routes.oidcRedirectUrl, routes.samlCallbackUrl]
|
|
1445
|
+
else if (!invitationToken && [routes.loginUrl, routes.socialLoginCallbackUrl, routes.signUpUrl, routes.oidcRedirectUrl, routes.samlCallbackUrl]
|
|
1444
1446
|
.some(url => url && window.location.pathname.endsWith(url))) {
|
|
1445
1447
|
if (loginState.isNewUser && routes.signUpSuccessUrl && routes.socialLoginCallbackUrl === window.location.pathname) {
|
|
1446
1448
|
onRedirectTo(routes.signUpSuccessUrl, { refresh: routes.signUpSuccessUrl.startsWith('http') });
|
|
@@ -1957,12 +1959,13 @@ function* logout({ payload }) {
|
|
|
1957
1959
|
payload === null || payload === void 0 ? void 0 : payload();
|
|
1958
1960
|
}
|
|
1959
1961
|
function* silentLogout({ payload }) {
|
|
1962
|
+
var _a;
|
|
1960
1963
|
try {
|
|
1961
1964
|
yield effects.call(restApi.api.auth.logout);
|
|
1962
1965
|
}
|
|
1963
|
-
catch (
|
|
1966
|
+
catch (_b) {
|
|
1964
1967
|
}
|
|
1965
|
-
setTimeout(() => payload === null || payload === void 0 ? void 0 : payload(), 500);
|
|
1968
|
+
setTimeout(() => { var _a; return (_a = payload === null || payload === void 0 ? void 0 : payload.callback) === null || _a === void 0 ? void 0 : _a.call(payload, true); }, (_a = payload === null || payload === void 0 ? void 0 : payload.callbackTimeout) !== null && _a !== void 0 ? _a : 500);
|
|
1966
1969
|
}
|
|
1967
1970
|
function* loginSagas() {
|
|
1968
1971
|
yield effects.takeLeading(actions.requestAuthorize, requestAuthorize);
|
package/node/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var auth_index = require('./index-
|
|
5
|
+
var auth_index = require('./index-a3c0e1be.js');
|
|
6
6
|
var audits_index = require('./audits/index.js');
|
|
7
7
|
var connectivity_index = require('./connectivity/index.js');
|
|
8
8
|
var subscriptions_index = require('./subscriptions/index.js');
|
package/node/toolkit/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var auth_index = require('../index-
|
|
5
|
+
var auth_index = require('../index-a3c0e1be.js');
|
|
6
6
|
var toolkit = require('@reduxjs/toolkit');
|
|
7
7
|
var createSagaMiddleware = require('redux-saga');
|
|
8
8
|
var effects = require('redux-saga/effects');
|