@frontegg/redux-store 5.69.0 → 5.70.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/AcceptInvitationState/index.d.ts +2 -0
- package/auth/AccountSettingsState/index.d.ts +2 -0
- package/auth/ActivateState/index.d.ts +3 -0
- package/auth/ApiTokensState/index.d.ts +2 -0
- package/auth/ForgotPasswordState/index.d.ts +2 -0
- package/auth/LoginState/index.d.ts +2 -0
- package/auth/MfaState/index.d.ts +2 -8
- package/auth/ProfileState/index.d.ts +2 -0
- package/auth/ResetPhoneNumberState/index.d.ts +10 -0
- package/auth/RolesState/index.d.ts +2 -0
- package/auth/SSOState/index.d.ts +2 -0
- package/auth/SecurityPolicyState/index.d.ts +11 -0
- package/auth/SessionsPolicyState/index.d.ts +94 -0
- package/auth/SessionsPolicyState/interfaces.d.ts +7 -0
- package/auth/SessionsPolicyState/saga.d.ts +2 -0
- package/auth/SessionsState/index.d.ts +13 -0
- package/auth/SessionsState/interfaces.d.ts +1 -0
- package/auth/SignUp/index.d.ts +2 -0
- package/auth/SocialLogins/index.d.ts +2 -0
- package/auth/TeamState/index.d.ts +2 -0
- package/auth/TenantsState/index.d.ts +4 -8
- package/auth/dummy.d.ts +2 -1
- package/auth/index.d.ts +22 -10
- package/auth/index.js +134 -38
- package/auth/interfaces.d.ts +2 -0
- package/auth/reducer.d.ts +10 -0
- package/auth/utils.d.ts +4 -0
- package/index.js +1 -1
- package/node/auth/index.js +4 -1
- package/node/{index-b636c3d4.js → index-85c05bdb.js} +170 -71
- package/node/index.js +4 -1
- package/node/toolkit/index.js +1 -1
- package/package.json +2 -2
- package/toolkit/index.d.ts +1 -1
|
@@ -52,11 +52,11 @@ const loginState = {
|
|
|
52
52
|
email: '',
|
|
53
53
|
tenants: [],
|
|
54
54
|
};
|
|
55
|
-
const reducers$
|
|
55
|
+
const reducers$h = {
|
|
56
56
|
setLoginState: vendor_index.typeReducerForKey('loginState'),
|
|
57
57
|
resetLoginState: vendor_index.resetStateByKey('loginState', { loginState }),
|
|
58
58
|
};
|
|
59
|
-
const actions$
|
|
59
|
+
const actions$i = {
|
|
60
60
|
requestAuthorize: toolkit.createAction(`${constants.authStoreName}/requestAuthorize`, (payload = false) => ({ payload })),
|
|
61
61
|
requestAuthorizeSSR: toolkit.createAction(`${constants.authStoreName}/requestAuthorizeSSR`, (payload) => ({ payload })),
|
|
62
62
|
requestHostedLoginAuthorize: toolkit.createAction(`${constants.authStoreName}/requestHostedLoginAuthorize`),
|
|
@@ -98,12 +98,12 @@ const activateState = {
|
|
|
98
98
|
loading: false,
|
|
99
99
|
},
|
|
100
100
|
};
|
|
101
|
-
const reducers$
|
|
101
|
+
const reducers$g = {
|
|
102
102
|
setActivateState: vendor_index.typeReducerForKey('activateState'),
|
|
103
103
|
resetActivateState: vendor_index.resetStateByKey('activateState', { activateState }),
|
|
104
104
|
setActivateStrategyState: vendor_index.typeReducerNestedKey('activateState', 'activationStrategy'),
|
|
105
105
|
};
|
|
106
|
-
const actions$
|
|
106
|
+
const actions$h = {
|
|
107
107
|
activateAccount: toolkit.createAction(`${constants.authStoreName}/activateAccount`, (payload) => ({ payload })),
|
|
108
108
|
preActivateAccount: toolkit.createAction(`${constants.authStoreName}/preActivateAccount`, (payload) => ({ payload })),
|
|
109
109
|
getActivateAccountStrategy: toolkit.createAction(`${constants.authStoreName}/getActivateAccountStrategy`, (payload) => ({ payload })),
|
|
@@ -124,13 +124,13 @@ exports.AcceptInvitationStep = void 0;
|
|
|
124
124
|
const acceptInvitationState = {
|
|
125
125
|
step: exports.AcceptInvitationStep.validate,
|
|
126
126
|
};
|
|
127
|
-
const reducers$
|
|
127
|
+
const reducers$f = {
|
|
128
128
|
setAcceptInvitationState: vendor_index.typeReducerForKey('acceptInvitationState'),
|
|
129
129
|
resetAcceptInvitationState: vendor_index.resetStateByKey('acceptInvitationState', {
|
|
130
130
|
acceptInvitationState,
|
|
131
131
|
}),
|
|
132
132
|
};
|
|
133
|
-
const actions$
|
|
133
|
+
const actions$g = {
|
|
134
134
|
acceptInvitation: toolkit.createAction(`${constants.authStoreName}/acceptInvitation`, (payload) => ({ payload })),
|
|
135
135
|
};
|
|
136
136
|
|
|
@@ -146,11 +146,11 @@ const forgotPasswordState = {
|
|
|
146
146
|
email: '',
|
|
147
147
|
passwordConfig: null,
|
|
148
148
|
};
|
|
149
|
-
const reducers$
|
|
149
|
+
const reducers$e = {
|
|
150
150
|
setForgotPasswordState: vendor_index.typeReducerForKey('forgotPasswordState'),
|
|
151
151
|
resetForgotPasswordState: vendor_index.resetStateByKey('forgotPasswordState', { forgotPasswordState }),
|
|
152
152
|
};
|
|
153
|
-
const actions$
|
|
153
|
+
const actions$f = {
|
|
154
154
|
forgotPassword: toolkit.createAction(`${constants.authStoreName}/forgotPassword`, (payload) => ({ payload })),
|
|
155
155
|
resetPassword: toolkit.createAction(`${constants.authStoreName}/resetPassword`, (payload) => ({ payload })),
|
|
156
156
|
loadPasswordConfig: toolkit.createAction(`${constants.authStoreName}/loadPasswordConfig`, (payload) => ({
|
|
@@ -169,11 +169,11 @@ const resetPhoneNumberState = {
|
|
|
169
169
|
step: exports.ResetPhoneNumberStep.ResetPhoneNumber,
|
|
170
170
|
loading: false,
|
|
171
171
|
};
|
|
172
|
-
const reducers$
|
|
172
|
+
const reducers$d = {
|
|
173
173
|
setResetPhoneNumberState: vendor_index.typeReducerForKey('resetPhoneNumberState'),
|
|
174
174
|
resetResetPhoneNumberState: vendor_index.resetStateByKey('resetPhoneNumberState', { resetPhoneNumberState }),
|
|
175
175
|
};
|
|
176
|
-
const actions$
|
|
176
|
+
const actions$e = {
|
|
177
177
|
resetPhoneNumber: toolkit.createAction(`${constants.authStoreName}/resetPhoneNumber`, (payload) => ({ payload })),
|
|
178
178
|
verifyResetPhoneNumber: toolkit.createAction(`${constants.authStoreName}/verifyResetPhoneNumber`, (payload) => ({ payload })),
|
|
179
179
|
changePhoneNumber: toolkit.createAction(`${constants.authStoreName}/changePhoneNumber`, (payload) => ({ payload })),
|
|
@@ -187,13 +187,13 @@ const ssoState = {
|
|
|
187
187
|
loaders: {},
|
|
188
188
|
ssoConfigurations: []
|
|
189
189
|
};
|
|
190
|
-
const reducers$
|
|
190
|
+
const reducers$c = {
|
|
191
191
|
setSSOLoader: vendor_index.loadersReducerForKey('ssoState'),
|
|
192
192
|
setSSOError: vendor_index.errorsReducerForKey('ssoState'),
|
|
193
193
|
setSSOState: vendor_index.typeReducerForKey('ssoState'),
|
|
194
194
|
resetSSOState: vendor_index.resetStateByKey('ssoState', { ssoState }),
|
|
195
195
|
};
|
|
196
|
-
const actions$
|
|
196
|
+
const actions$d = {
|
|
197
197
|
loadSSOConfigurationsV2: toolkit.createAction(`${constants.authStoreName}/loadSSOConfigurationsV2`),
|
|
198
198
|
saveSSOConfigurationV2: toolkit.createAction(`${constants.authStoreName}/saveSSOConfigurationV2`, (payload) => ({ payload })),
|
|
199
199
|
updateSSOConfiguration: toolkit.createAction(`${constants.authStoreName}/updateSSOConfiguration`, (payload) => ({ payload })),
|
|
@@ -227,11 +227,11 @@ const profileState = {
|
|
|
227
227
|
loading: false,
|
|
228
228
|
error: null,
|
|
229
229
|
};
|
|
230
|
-
const reducers$
|
|
230
|
+
const reducers$b = {
|
|
231
231
|
setProfileState: vendor_index.typeReducerForKey('profileState'),
|
|
232
232
|
resetProfileState: vendor_index.resetStateByKey('profileState', { profileState }),
|
|
233
233
|
};
|
|
234
|
-
const actions$
|
|
234
|
+
const actions$c = {
|
|
235
235
|
loadProfile: toolkit.createAction(`${constants.authStoreName}/loadProfile`),
|
|
236
236
|
saveProfile: toolkit.createAction(`${constants.authStoreName}/saveProfile`, (payload) => ({ payload })),
|
|
237
237
|
changePassword: toolkit.createAction(`${constants.authStoreName}/changePassword`, (payload) => ({
|
|
@@ -249,11 +249,11 @@ const mfaState = {
|
|
|
249
249
|
step: exports.MFAStep.verify,
|
|
250
250
|
loading: false,
|
|
251
251
|
};
|
|
252
|
-
const reducers$
|
|
252
|
+
const reducers$a = {
|
|
253
253
|
setMfaState: vendor_index.typeReducerForKey('mfaState'),
|
|
254
254
|
resetMfaState: vendor_index.resetStateByKey('mfaState', { mfaState }),
|
|
255
255
|
};
|
|
256
|
-
const actions$
|
|
256
|
+
const actions$b = {
|
|
257
257
|
enrollMfa: toolkit.createAction(`${constants.authStoreName}/enrollMfa`),
|
|
258
258
|
verifyMfa: toolkit.createAction(`${constants.authStoreName}/verifyMfa`, (payload) => ({
|
|
259
259
|
payload,
|
|
@@ -296,13 +296,13 @@ const teamState = {
|
|
|
296
296
|
open: false,
|
|
297
297
|
},
|
|
298
298
|
};
|
|
299
|
-
const reducers$
|
|
299
|
+
const reducers$9 = {
|
|
300
300
|
setTeamLoader: vendor_index.loadersReducerForKey('teamState'),
|
|
301
301
|
setTeamError: vendor_index.errorsReducerForKey('teamState'),
|
|
302
302
|
setTeamState: vendor_index.typeReducerForKey('teamState'),
|
|
303
303
|
resetTeamState: vendor_index.resetStateByKey('teamState', { teamState }),
|
|
304
304
|
};
|
|
305
|
-
const actions$
|
|
305
|
+
const actions$a = {
|
|
306
306
|
loadUsers: toolkit.createAction(`${constants.authStoreName}/loadUsers`, (payload) => ({ payload })),
|
|
307
307
|
loadAllSubTenantsUsers: toolkit.createAction(`${constants.authStoreName}/loadAllSubTenantsUsers`, (payload) => ({ payload })),
|
|
308
308
|
loadRoles: toolkit.createAction(`${constants.authStoreName}/loadRoles`, (payload) => ({ payload })),
|
|
@@ -339,11 +339,11 @@ const socialLoginState = {
|
|
|
339
339
|
loading: false,
|
|
340
340
|
error: '',
|
|
341
341
|
};
|
|
342
|
-
const reducers$
|
|
342
|
+
const reducers$8 = {
|
|
343
343
|
setSocialLoginsState: vendor_index.typeReducerForKey('socialLoginState'),
|
|
344
344
|
resetSocialLoginsState: vendor_index.resetStateByKey('socialLoginState', { socialLoginState }),
|
|
345
345
|
};
|
|
346
|
-
const actions$
|
|
346
|
+
const actions$9 = {
|
|
347
347
|
loadSocialLoginsConfiguration: toolkit.createAction(`${constants.authStoreName}/loadSocialLoginsConfiguration`),
|
|
348
348
|
loadSocialLoginsConfigurationV2: toolkit.createAction(`${constants.authStoreName}/loadSocialLoginsConfigurationV2`),
|
|
349
349
|
loginViaSocialLogin: toolkit.createAction(`${constants.authStoreName}/loginViaSocialLogin`, (payload) => ({
|
|
@@ -367,11 +367,11 @@ const signUpState = {
|
|
|
367
367
|
firstLoad: true,
|
|
368
368
|
stage: exports.SignUpStage.SignUp,
|
|
369
369
|
};
|
|
370
|
-
const reducers$
|
|
370
|
+
const reducers$7 = {
|
|
371
371
|
setSignUpState: vendor_index.typeReducerForKey('signUpState'),
|
|
372
372
|
resetSignUpState: vendor_index.resetStateByKey('signUpState', { signUpState }),
|
|
373
373
|
};
|
|
374
|
-
const actions$
|
|
374
|
+
const actions$8 = {
|
|
375
375
|
signUpUser: toolkit.createAction(`${constants.authStoreName}/signUpUser`, (payload) => ({ payload })),
|
|
376
376
|
resetSignUpStateSoft: toolkit.createAction(`${constants.authStoreName}/resetSignUpStateSoft`),
|
|
377
377
|
};
|
|
@@ -397,13 +397,13 @@ const apiTokensState = {
|
|
|
397
397
|
permissions: [],
|
|
398
398
|
errors: {},
|
|
399
399
|
};
|
|
400
|
-
const reducers$
|
|
400
|
+
const reducers$6 = {
|
|
401
401
|
setApiTokensLoader: vendor_index.loadersReducerForKey('apiTokensState'),
|
|
402
402
|
setApiTokensError: vendor_index.errorsReducerForKey('apiTokensState'),
|
|
403
403
|
setApiTokensState: vendor_index.typeReducerForKey('apiTokensState'),
|
|
404
404
|
resetApiTokensState: vendor_index.resetStateByKey('apiTokensState', { apiTokensState }),
|
|
405
405
|
};
|
|
406
|
-
const actions$
|
|
406
|
+
const actions$7 = {
|
|
407
407
|
loadApiTokens: toolkit.createAction(`${constants.authStoreName}/loadApiTokens`, (payload) => ({
|
|
408
408
|
payload,
|
|
409
409
|
})),
|
|
@@ -445,7 +445,7 @@ const securityPolicyState = {
|
|
|
445
445
|
loading: true,
|
|
446
446
|
},
|
|
447
447
|
};
|
|
448
|
-
const reducers$
|
|
448
|
+
const reducers$5 = {
|
|
449
449
|
setSecurityPolicyState: vendor_index.typeReducerForKey('securityPolicyState'),
|
|
450
450
|
setSecurityPolicyGlobalState: vendor_index.typeReducerNestedKey('securityPolicyState', 'globalPolicy'),
|
|
451
451
|
setSecurityPolicyPublicState: vendor_index.typeReducerNestedKey('securityPolicyState', 'publicPolicy'),
|
|
@@ -458,7 +458,7 @@ const reducers$4 = {
|
|
|
458
458
|
setSecurityPolicyPasswordState: vendor_index.typeReducerNestedKey('securityPolicyState', 'passwordPolicy'),
|
|
459
459
|
resetSecurityPolicyState: vendor_index.resetStateByKey('securityPolicyState', { securityPolicyState }),
|
|
460
460
|
};
|
|
461
|
-
const actions$
|
|
461
|
+
const actions$6 = {
|
|
462
462
|
loadSecurityPolicy: toolkit.createAction(`${constants.authStoreName}/loadSecurityPolicy`),
|
|
463
463
|
loadPublicSecurityPolicy: toolkit.createAction(`${constants.authStoreName}/loadPublicSecurityPolicy`),
|
|
464
464
|
loadSecurityPolicyMfa: toolkit.createAction(`${constants.authStoreName}/loadSecurityPolicyMfa`),
|
|
@@ -476,11 +476,11 @@ const actions$5 = {
|
|
|
476
476
|
const accountSettingsState = {
|
|
477
477
|
loading: false,
|
|
478
478
|
};
|
|
479
|
-
const reducers$
|
|
479
|
+
const reducers$4 = {
|
|
480
480
|
setAccountSettingsState: vendor_index.typeReducerForKey('accountSettingsState'),
|
|
481
481
|
resetAccountSettingsState: vendor_index.resetStateByKey('accountSettingsState', { accountSettingsState }),
|
|
482
482
|
};
|
|
483
|
-
const actions$
|
|
483
|
+
const actions$5 = {
|
|
484
484
|
loadAccountSettings: toolkit.createAction(`${constants.authStoreName}/loadAccountSettings`, (payload) => ({ payload })),
|
|
485
485
|
saveAccountSettings: toolkit.createAction(`${constants.authStoreName}/saveAccountSettings`, (payload) => ({ payload })),
|
|
486
486
|
};
|
|
@@ -491,11 +491,11 @@ const tenantsState = {
|
|
|
491
491
|
loading: true,
|
|
492
492
|
tenantTree: null,
|
|
493
493
|
};
|
|
494
|
-
const reducers$
|
|
494
|
+
const reducers$3 = {
|
|
495
495
|
setTenantsState: vendor_index.typeReducerForKey('tenantsState'),
|
|
496
496
|
resetTenantsState: vendor_index.resetStateByKey('tenantsState', { tenantsState }),
|
|
497
497
|
};
|
|
498
|
-
const actions$
|
|
498
|
+
const actions$4 = {
|
|
499
499
|
switchTenant: toolkit.createAction(`${constants.authStoreName}/switchTenant`, (payload) => ({ payload })),
|
|
500
500
|
loadTenants: toolkit.createAction(`${constants.authStoreName}/loadTenants`, (payload) => ({
|
|
501
501
|
payload,
|
|
@@ -514,11 +514,11 @@ const rolesState = {
|
|
|
514
514
|
permissions: [],
|
|
515
515
|
permissionCategories: [],
|
|
516
516
|
};
|
|
517
|
-
const reducers$
|
|
517
|
+
const reducers$2 = {
|
|
518
518
|
setRolesState: vendor_index.typeReducerForKey('rolesState'),
|
|
519
519
|
resetRolesState: vendor_index.resetStateByKey('rolesState', { rolesState }),
|
|
520
520
|
};
|
|
521
|
-
const actions$
|
|
521
|
+
const actions$3 = {
|
|
522
522
|
loadRolesAndPermissions: toolkit.createAction(`${constants.authStoreName}/loadRoles`, (payload) => ({ payload })),
|
|
523
523
|
addRole: toolkit.createAction(`${constants.authStoreName}/addRole`, (payload) => ({ payload })),
|
|
524
524
|
updateRole: toolkit.createAction(`${constants.authStoreName}/updateRole`, (payload) => ({ payload })),
|
|
@@ -531,14 +531,29 @@ const sessionsState = {
|
|
|
531
531
|
loading: false,
|
|
532
532
|
sessions: [],
|
|
533
533
|
};
|
|
534
|
-
const reducers = {
|
|
534
|
+
const reducers$1 = {
|
|
535
535
|
setSessionsState: vendor_index.typeReducerForKey('sessionsState'),
|
|
536
536
|
resetSessionsState: vendor_index.resetStateByKey('sessionsState', { sessionsState }),
|
|
537
537
|
};
|
|
538
|
-
const actions$
|
|
538
|
+
const actions$2 = {
|
|
539
539
|
loadUserSessions: toolkit.createAction(`${constants.authStoreName}/loadUserSessions`),
|
|
540
|
+
loadCurrentUserSession: toolkit.createAction(`${constants.authStoreName}/loadCurrentUserSession`),
|
|
540
541
|
deleteUserSession: toolkit.createAction(`${constants.authStoreName}/deleteUserSession`, (payload) => ({ payload })),
|
|
541
542
|
deleteAllUserSessions: toolkit.createAction(`${constants.authStoreName}/deleteAllUserSessions`),
|
|
543
|
+
revokeUserSessions: toolkit.createAction(`${constants.authStoreName}/revokeUserSessions`, (payload) => ({ payload })),
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
const sessionsPolicyState = {
|
|
547
|
+
loading: false,
|
|
548
|
+
configurations: {},
|
|
549
|
+
};
|
|
550
|
+
const reducers = {
|
|
551
|
+
setSessionsPolicyState: vendor_index.typeReducerForKey('sessionsPolicyState'),
|
|
552
|
+
resetSessionsPolicyState: vendor_index.resetStateByKey('sessionsPolicyState', { sessionsPolicyState }),
|
|
553
|
+
};
|
|
554
|
+
const actions$1 = {
|
|
555
|
+
loadSessionsPolicy: toolkit.createAction(`${constants.authStoreName}/loadSessionsPolicy`),
|
|
556
|
+
createOrUpdateSessionsPolicy: toolkit.createAction(`${constants.authStoreName}/createOrUpdateSessionsPolicy`, (payload) => ({ payload })),
|
|
542
557
|
};
|
|
543
558
|
|
|
544
559
|
const reinitializeState = {
|
|
@@ -563,6 +578,7 @@ const reinitializeState = {
|
|
|
563
578
|
rolesState,
|
|
564
579
|
resetPhoneNumberState,
|
|
565
580
|
sessionsState,
|
|
581
|
+
sessionsPolicyState,
|
|
566
582
|
};
|
|
567
583
|
const initialState$1 = Object.assign({ routes: {
|
|
568
584
|
authenticatedUrl: '/',
|
|
@@ -584,9 +600,9 @@ const initialState$1 = Object.assign({ routes: {
|
|
|
584
600
|
const { reducer, actions: sliceActions } = toolkit.createSlice({
|
|
585
601
|
name: constants.authStoreName,
|
|
586
602
|
initialState: initialState$1,
|
|
587
|
-
reducers: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ resetState: (state) => (Object.assign(Object.assign({}, state), reinitializeState)), setState: (state, { payload }) => (Object.assign(Object.assign({}, state), payload)), setUser: vendor_index.typeReducer('user') }, reducers$
|
|
603
|
+
reducers: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ resetState: (state) => (Object.assign(Object.assign({}, state), reinitializeState)), setState: (state, { payload }) => (Object.assign(Object.assign({}, state), payload)), setUser: vendor_index.typeReducer('user') }, reducers$h), reducers$8), reducers$g), reducers$f), reducers$e), reducers$d), reducers$7), reducers$b), reducers$c), reducers$a), reducers$9), reducers$6), reducers$5), reducers$4), reducers$3), reducers$2), reducers$1), reducers),
|
|
588
604
|
});
|
|
589
|
-
const actions = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, sliceActions), actions$
|
|
605
|
+
const actions = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, sliceActions), actions$i), actions$9), actions$h), actions$g), actions$f), actions$e), actions$8), actions$c), actions$d), actions$b), actions$a), actions$7), actions$6), actions$5), actions$4), actions$3), actions$2), actions$1);
|
|
590
606
|
|
|
591
607
|
exports.SSOStateKeys = void 0;
|
|
592
608
|
(function (SSOStateKeys) {
|
|
@@ -911,7 +927,21 @@ const sessionsMock = [
|
|
|
911
927
|
createdAt: new Date(Date.now() - 1002232300),
|
|
912
928
|
ipAddress: "2.228.163.92",
|
|
913
929
|
}
|
|
914
|
-
];
|
|
930
|
+
];
|
|
931
|
+
const sessionsConfigDummies = {
|
|
932
|
+
sessionConcurrentConfiguration: {
|
|
933
|
+
isActive: true,
|
|
934
|
+
maxSessions: 10,
|
|
935
|
+
},
|
|
936
|
+
sessionIdleTimeoutConfiguration: {
|
|
937
|
+
isActive: true,
|
|
938
|
+
timeout: 300
|
|
939
|
+
},
|
|
940
|
+
sessionTimeoutConfiguration: {
|
|
941
|
+
isActive: true,
|
|
942
|
+
timeout: 86400
|
|
943
|
+
},
|
|
944
|
+
};
|
|
915
945
|
|
|
916
946
|
exports.UserVeirifedOriginTypes = void 0;
|
|
917
947
|
(function (UserVeirifedOriginTypes) {
|
|
@@ -4124,6 +4154,16 @@ function* loadCurrentUserSessions() {
|
|
|
4124
4154
|
yield effects.put(actions.setSessionsState({ error: e, loading: false }));
|
|
4125
4155
|
}
|
|
4126
4156
|
}
|
|
4157
|
+
function* loadCurrentUserSession() {
|
|
4158
|
+
yield effects.put(actions.setSessionsState({ loading: true, error: null }));
|
|
4159
|
+
try {
|
|
4160
|
+
const session = yield effects.call(restApi.api.auth.getCurrentUserSession);
|
|
4161
|
+
yield effects.put(actions.setSessionsState({ currentSession: session, loading: false }));
|
|
4162
|
+
}
|
|
4163
|
+
catch (e) {
|
|
4164
|
+
yield effects.put(actions.setSessionsState({ error: e, loading: false }));
|
|
4165
|
+
}
|
|
4166
|
+
}
|
|
4127
4167
|
function* deleteUserSession({ payload: { id } }) {
|
|
4128
4168
|
yield effects.put(actions.setSessionsState({ loading: true, error: null }));
|
|
4129
4169
|
try {
|
|
@@ -4134,6 +4174,17 @@ function* deleteUserSession({ payload: { id } }) {
|
|
|
4134
4174
|
yield effects.put(actions.setSessionsState({ error: e, loading: false }));
|
|
4135
4175
|
}
|
|
4136
4176
|
}
|
|
4177
|
+
function* revokeUserSessions({ payload: { callback, userId } }) {
|
|
4178
|
+
yield effects.put(actions.setSessionsState({ loading: true, error: null }));
|
|
4179
|
+
try {
|
|
4180
|
+
yield effects.call(restApi.api.auth.revokeSessionsForUser, userId);
|
|
4181
|
+
callback === null || callback === void 0 ? void 0 : callback(true);
|
|
4182
|
+
}
|
|
4183
|
+
catch (e) {
|
|
4184
|
+
yield effects.put(actions.setSessionsState({ error: e, loading: false }));
|
|
4185
|
+
callback === null || callback === void 0 ? void 0 : callback(false);
|
|
4186
|
+
}
|
|
4187
|
+
}
|
|
4137
4188
|
function* deleteAllUserSessions() {
|
|
4138
4189
|
yield effects.put(actions.setSessionsState({ loading: true, error: null }));
|
|
4139
4190
|
try {
|
|
@@ -4148,6 +4199,8 @@ function* sessionsSaga() {
|
|
|
4148
4199
|
yield effects.takeLatest(actions.loadUserSessions, loadCurrentUserSessions);
|
|
4149
4200
|
yield effects.takeLatest(actions.deleteUserSession, deleteUserSession);
|
|
4150
4201
|
yield effects.takeLatest(actions.deleteAllUserSessions, deleteAllUserSessions);
|
|
4202
|
+
yield effects.takeLatest(actions.loadCurrentUserSession, loadCurrentUserSession);
|
|
4203
|
+
yield effects.takeEvery(actions.revokeUserSessions, revokeUserSessions);
|
|
4151
4204
|
}
|
|
4152
4205
|
/*********************************
|
|
4153
4206
|
* Preview Sagas
|
|
@@ -4173,6 +4226,47 @@ function* sessionsSagaMock() {
|
|
|
4173
4226
|
yield effects.takeLatest(actions.deleteAllUserSessions, deleteAllUserSessionsMock);
|
|
4174
4227
|
}
|
|
4175
4228
|
|
|
4229
|
+
function* loadSessionPolicyState() {
|
|
4230
|
+
yield effects.put(actions.setSessionsPolicyState({ loading: true, error: null }));
|
|
4231
|
+
try {
|
|
4232
|
+
const sessionsPolicy = yield effects.call(restApi.api.auth.getSessionConfigurations);
|
|
4233
|
+
yield effects.put(actions.setSessionsPolicyState({ configurations: sessionsPolicy, loading: false }));
|
|
4234
|
+
}
|
|
4235
|
+
catch (e) {
|
|
4236
|
+
yield effects.put(actions.setSessionsState({ error: e, loading: false }));
|
|
4237
|
+
}
|
|
4238
|
+
}
|
|
4239
|
+
function* createOrUpdateSessionsPolicy({ payload }) {
|
|
4240
|
+
yield effects.put(actions.setSessionsPolicyState({ loading: true, error: null, }));
|
|
4241
|
+
try {
|
|
4242
|
+
const { callback } = payload, rest = tslib.__rest(payload, ["callback"]);
|
|
4243
|
+
yield effects.call(restApi.api.auth.createOrUpdateSessionConfigrations, rest);
|
|
4244
|
+
yield effects.put(actions.loadSessionsPolicy());
|
|
4245
|
+
callback === null || callback === void 0 ? void 0 : callback(true);
|
|
4246
|
+
}
|
|
4247
|
+
catch (e) {
|
|
4248
|
+
yield effects.put(actions.setSessionsPolicyState({ error: e, loading: false }));
|
|
4249
|
+
}
|
|
4250
|
+
}
|
|
4251
|
+
function* sessionsPolicySaga() {
|
|
4252
|
+
yield effects.takeLeading(actions.loadSessionsPolicy, loadSessionPolicyState);
|
|
4253
|
+
yield effects.takeLatest(actions.createOrUpdateSessionsPolicy, createOrUpdateSessionsPolicy);
|
|
4254
|
+
}
|
|
4255
|
+
function* loadSessionPolicyStateMock() {
|
|
4256
|
+
yield effects.put(actions.setSessionsPolicyState({ loading: true, error: null }));
|
|
4257
|
+
yield effects.put(actions.setSessionsPolicyState({ configurations: sessionsConfigDummies, loading: false }));
|
|
4258
|
+
}
|
|
4259
|
+
function* createOrUpdateSessionsPolicyMock({ payload }) {
|
|
4260
|
+
yield effects.put(actions.setSessionsPolicyState({ loading: true, error: null, }));
|
|
4261
|
+
const { callback } = payload, rest = tslib.__rest(payload, ["callback"]);
|
|
4262
|
+
callback === null || callback === void 0 ? void 0 : callback(true);
|
|
4263
|
+
yield effects.put(actions.setSessionsPolicyState({ configurations: rest, loading: false }));
|
|
4264
|
+
}
|
|
4265
|
+
function* sessionsPolicySagaMock() {
|
|
4266
|
+
yield effects.takeLeading(actions.loadSessionsPolicy, loadSessionPolicyStateMock);
|
|
4267
|
+
yield effects.takeLatest(actions.createOrUpdateSessionsPolicy, createOrUpdateSessionsPolicyMock);
|
|
4268
|
+
}
|
|
4269
|
+
|
|
4176
4270
|
function* sagas() {
|
|
4177
4271
|
yield effects.all([
|
|
4178
4272
|
effects.call(loginSagas),
|
|
@@ -4193,6 +4287,7 @@ function* sagas() {
|
|
|
4193
4287
|
effects.call(tenantsSagas),
|
|
4194
4288
|
effects.call(rolesSagas),
|
|
4195
4289
|
effects.call(sessionsSaga),
|
|
4290
|
+
effects.call(sessionsPolicySaga),
|
|
4196
4291
|
]);
|
|
4197
4292
|
}
|
|
4198
4293
|
function* mockSagas() {
|
|
@@ -4212,6 +4307,7 @@ function* mockSagas() {
|
|
|
4212
4307
|
effects.call(sessionsSagaMock),
|
|
4213
4308
|
effects.call(accountSettingsSagaMock),
|
|
4214
4309
|
effects.call(tenantsSagasMock),
|
|
4310
|
+
effects.call(sessionsPolicySagaMock),
|
|
4215
4311
|
]);
|
|
4216
4312
|
}
|
|
4217
4313
|
|
|
@@ -4308,23 +4404,24 @@ const createFronteggStore = (rootInitialState, storeHolder, previewMode = false,
|
|
|
4308
4404
|
exports.acceptInvitationState = acceptInvitationState;
|
|
4309
4405
|
exports.accountSettingsState = accountSettingsState;
|
|
4310
4406
|
exports.actions = actions;
|
|
4311
|
-
exports.actions$1 = actions$
|
|
4312
|
-
exports.actions$10 = actions$
|
|
4313
|
-
exports.actions$11 = actions$
|
|
4314
|
-
exports.actions$12 = actions$
|
|
4315
|
-
exports.actions$13 = actions$
|
|
4316
|
-
exports.actions$14 = actions$
|
|
4317
|
-
exports.actions$15 = actions$
|
|
4318
|
-
exports.actions$16 = actions$
|
|
4319
|
-
exports.actions$17 = actions$
|
|
4320
|
-
exports.actions$
|
|
4321
|
-
exports.actions$
|
|
4322
|
-
exports.actions$
|
|
4323
|
-
exports.actions$
|
|
4324
|
-
exports.actions$
|
|
4325
|
-
exports.actions$
|
|
4326
|
-
exports.actions$
|
|
4327
|
-
exports.actions$
|
|
4407
|
+
exports.actions$1 = actions$i;
|
|
4408
|
+
exports.actions$10 = actions$9;
|
|
4409
|
+
exports.actions$11 = actions$8;
|
|
4410
|
+
exports.actions$12 = actions$7;
|
|
4411
|
+
exports.actions$13 = actions$6;
|
|
4412
|
+
exports.actions$14 = actions$5;
|
|
4413
|
+
exports.actions$15 = actions$4;
|
|
4414
|
+
exports.actions$16 = actions$3;
|
|
4415
|
+
exports.actions$17 = actions$2;
|
|
4416
|
+
exports.actions$18 = actions$1;
|
|
4417
|
+
exports.actions$2 = actions$h;
|
|
4418
|
+
exports.actions$3 = actions$g;
|
|
4419
|
+
exports.actions$4 = actions$f;
|
|
4420
|
+
exports.actions$5 = actions$e;
|
|
4421
|
+
exports.actions$6 = actions$d;
|
|
4422
|
+
exports.actions$7 = actions$b;
|
|
4423
|
+
exports.actions$8 = actions$c;
|
|
4424
|
+
exports.actions$9 = actions$a;
|
|
4328
4425
|
exports.activateState = activateState;
|
|
4329
4426
|
exports.apiTokensState = apiTokensState;
|
|
4330
4427
|
exports.authStore = authStore;
|
|
@@ -4336,27 +4433,29 @@ exports.mfaState = mfaState;
|
|
|
4336
4433
|
exports.mockSagas = mockSagas;
|
|
4337
4434
|
exports.profileState = profileState;
|
|
4338
4435
|
exports.reducer = reducer;
|
|
4339
|
-
exports.reducers = reducers$
|
|
4340
|
-
exports.reducers$1 = reducers$
|
|
4341
|
-
exports.reducers$10 = reducers$
|
|
4342
|
-
exports.reducers$11 = reducers$
|
|
4343
|
-
exports.reducers$12 = reducers$
|
|
4344
|
-
exports.reducers$13 = reducers$
|
|
4345
|
-
exports.reducers$14 = reducers$
|
|
4346
|
-
exports.reducers$15 = reducers$
|
|
4347
|
-
exports.reducers$16 = reducers;
|
|
4348
|
-
exports.reducers$
|
|
4349
|
-
exports.reducers$
|
|
4350
|
-
exports.reducers$
|
|
4351
|
-
exports.reducers$
|
|
4352
|
-
exports.reducers$
|
|
4353
|
-
exports.reducers$
|
|
4354
|
-
exports.reducers$
|
|
4355
|
-
exports.reducers$
|
|
4436
|
+
exports.reducers = reducers$h;
|
|
4437
|
+
exports.reducers$1 = reducers$g;
|
|
4438
|
+
exports.reducers$10 = reducers$7;
|
|
4439
|
+
exports.reducers$11 = reducers$6;
|
|
4440
|
+
exports.reducers$12 = reducers$5;
|
|
4441
|
+
exports.reducers$13 = reducers$4;
|
|
4442
|
+
exports.reducers$14 = reducers$3;
|
|
4443
|
+
exports.reducers$15 = reducers$2;
|
|
4444
|
+
exports.reducers$16 = reducers$1;
|
|
4445
|
+
exports.reducers$17 = reducers;
|
|
4446
|
+
exports.reducers$2 = reducers$f;
|
|
4447
|
+
exports.reducers$3 = reducers$e;
|
|
4448
|
+
exports.reducers$4 = reducers$d;
|
|
4449
|
+
exports.reducers$5 = reducers$c;
|
|
4450
|
+
exports.reducers$6 = reducers$a;
|
|
4451
|
+
exports.reducers$7 = reducers$b;
|
|
4452
|
+
exports.reducers$8 = reducers$9;
|
|
4453
|
+
exports.reducers$9 = reducers$8;
|
|
4356
4454
|
exports.resetPhoneNumberState = resetPhoneNumberState;
|
|
4357
4455
|
exports.rolesState = rolesState;
|
|
4358
4456
|
exports.sagas = sagas;
|
|
4359
4457
|
exports.securityPolicyState = securityPolicyState;
|
|
4458
|
+
exports.sessionsPolicyState = sessionsPolicyState;
|
|
4360
4459
|
exports.sessionsState = sessionsState;
|
|
4361
4460
|
exports.signUpState = signUpState;
|
|
4362
4461
|
exports.socialLoginState = socialLoginState;
|
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-85c05bdb.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');
|
|
@@ -153,6 +153,9 @@ exports.securityPolicyActions = auth_index.actions$13;
|
|
|
153
153
|
exports.securityPolicyReducers = auth_index.reducers$12;
|
|
154
154
|
exports.securityPolicyState = auth_index.securityPolicyState;
|
|
155
155
|
exports.sessionsActions = auth_index.actions$17;
|
|
156
|
+
exports.sessionsPolicyActions = auth_index.actions$18;
|
|
157
|
+
exports.sessionsPolicyReducers = auth_index.reducers$17;
|
|
158
|
+
exports.sessionsPolicyState = auth_index.sessionsPolicyState;
|
|
156
159
|
exports.sessionsReducers = auth_index.reducers$16;
|
|
157
160
|
exports.sessionsState = auth_index.sessionsState;
|
|
158
161
|
exports.signUpActions = auth_index.actions$11;
|
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-85c05bdb.js');
|
|
6
6
|
var toolkit = require('@reduxjs/toolkit');
|
|
7
7
|
var createSagaMiddleware = require('redux-saga');
|
|
8
8
|
var effects = require('redux-saga/effects');
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/redux-store",
|
|
3
3
|
"libName": "FronteggReduxStore",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.70.0",
|
|
5
5
|
"author": "Frontegg LTD",
|
|
6
6
|
"main": "./node/index.js",
|
|
7
7
|
"module": "./index.js",
|
|
8
8
|
"types": "./index.d.ts",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@frontegg/rest-api": "^
|
|
10
|
+
"@frontegg/rest-api": "^3.0.6",
|
|
11
11
|
"@reduxjs/toolkit": "^1.5.0",
|
|
12
12
|
"redux-saga": "^1.1.0",
|
|
13
13
|
"tslib": "^2.3.1",
|
package/toolkit/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export { bindActionCreators, CaseReducerActions, SliceCaseReducers } from '@redu
|
|
|
12
12
|
export interface RootState {
|
|
13
13
|
context?: ContextOptions;
|
|
14
14
|
}
|
|
15
|
-
export declare const createFronteggStore: (rootInitialState: InitialState, storeHolder?: any, previewMode?: boolean, authInitialState?: (Partial<Pick<AuthState, "error" | "onRedirectTo" | "isAuthenticated" | "isLoading" | "keepSessionAlive" | "user" | "isSSOAuth" | "ssoACS" | "loginState" | "activateState" | "acceptInvitationState" | "forgotPasswordState" | "resetPhoneNumberState" | "ssoState" | "profileState" | "mfaState" | "teamState" | "socialLoginState" | "signUpState" | "apiTokensState" | "securityPolicyState" | "accountSettingsState" | "tenantsState" | "rolesState" | "sessionsState" | "hostedLoginBox" | "header" | "loaderComponent">> & {
|
|
15
|
+
export declare const createFronteggStore: (rootInitialState: InitialState, storeHolder?: any, previewMode?: boolean, authInitialState?: (Partial<Pick<AuthState, "error" | "onRedirectTo" | "isAuthenticated" | "isLoading" | "keepSessionAlive" | "user" | "isSSOAuth" | "ssoACS" | "loginState" | "activateState" | "acceptInvitationState" | "forgotPasswordState" | "resetPhoneNumberState" | "ssoState" | "profileState" | "mfaState" | "teamState" | "socialLoginState" | "signUpState" | "apiTokensState" | "securityPolicyState" | "accountSettingsState" | "tenantsState" | "rolesState" | "sessionsState" | "hostedLoginBox" | "sessionsPolicyState" | "header" | "loaderComponent">> & {
|
|
16
16
|
routes?: Partial<AuthPageRoutes> | undefined;
|
|
17
17
|
}) | undefined, overrideInitialState?: Partial<{
|
|
18
18
|
auth: Partial<Omit<AuthState, 'routes'>> & {
|