@frontegg/redux-store 6.0.1-alpha.6 → 6.0.3-alpha.2
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/audits/backward-compatibility/reducer.d.ts +1 -1
- package/audits/index.d.ts +3 -3
- package/audits/reducer.d.ts +3 -3
- package/auth/AcceptInvitationState/index.d.ts +6 -0
- package/auth/AccountSettingsState/index.d.ts +6 -0
- package/auth/ActivateState/index.d.ts +9 -0
- package/auth/ApiTokensState/index.d.ts +6 -0
- package/auth/ForgotPasswordState/index.d.ts +6 -0
- package/auth/LoginState/index.d.ts +38 -8
- package/auth/LoginState/index.js +26 -2
- package/auth/LoginState/interfaces.d.ts +28 -2
- package/auth/LoginState/interfaces.js +20 -2
- package/auth/LoginState/saga.d.ts +11 -5
- package/auth/LoginState/saga.js +428 -36
- package/auth/MfaState/index.d.ts +6 -0
- package/auth/ProfileState/index.d.ts +6 -0
- package/auth/ResetPhoneNumberState/index.d.ts +6 -0
- package/auth/ResetPhoneNumberState/saga.d.ts +1 -1
- package/auth/RolesState/index.d.ts +6 -0
- package/auth/SSOState/index.d.ts +6 -0
- package/auth/SecurityPolicyState/index.d.ts +80 -1
- package/auth/SecurityPolicyState/index.js +6 -1
- package/auth/SecurityPolicyState/interfaces.d.ts +3 -1
- package/auth/SecurityPolicyState/saga.d.ts +6 -0
- package/auth/SecurityPolicyState/saga.js +21 -0
- package/auth/SessionsPolicyState/index.d.ts +94 -0
- package/auth/SessionsPolicyState/index.js +21 -0
- package/auth/SessionsPolicyState/interfaces.d.ts +7 -0
- package/auth/SessionsPolicyState/interfaces.js +1 -0
- package/auth/SessionsPolicyState/saga.d.ts +2 -0
- package/auth/SessionsPolicyState/saga.js +93 -0
- package/auth/SessionsState/index.d.ts +111 -0
- package/auth/SessionsState/index.js +26 -0
- package/auth/SessionsState/interfaces.d.ts +14 -0
- package/auth/SessionsState/interfaces.js +1 -0
- package/auth/SessionsState/saga.d.ts +2 -0
- package/auth/SessionsState/saga.js +163 -0
- package/auth/SignUp/index.d.ts +6 -0
- package/auth/SocialLogins/index.d.ts +14 -2
- package/auth/SocialLogins/saga.js +5 -0
- package/auth/TeamState/index.d.ts +8 -0
- package/auth/TeamState/index.js +3 -0
- package/auth/TeamState/saga.js +69 -12
- package/auth/TenantsState/index.d.ts +6 -0
- package/auth/dummy.d.ts +4 -1
- package/auth/dummy.js +39 -3
- package/auth/index.d.ts +126 -81
- package/auth/index.js +4 -0
- package/auth/initialState.js +5 -1
- package/auth/interfaces.d.ts +38 -0
- package/auth/interfaces.js +33 -1
- package/auth/reducer.d.ts +124 -82
- package/auth/reducer.js +4 -2
- package/auth/saga.js +4 -2
- package/auth/utils.d.ts +15 -0
- package/auth/utils.js +75 -1
- package/connectivity/index.d.ts +5 -5
- package/connectivity/reducer.d.ts +5 -5
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/node/auth/LoginState/index.js +25 -1
- package/node/auth/LoginState/interfaces.js +21 -2
- package/node/auth/LoginState/saga.js +431 -35
- package/node/auth/SecurityPolicyState/index.js +6 -1
- package/node/auth/SecurityPolicyState/saga.js +23 -0
- package/node/auth/SessionsPolicyState/index.js +33 -0
- package/node/auth/SessionsPolicyState/interfaces.js +5 -0
- package/node/auth/SessionsPolicyState/saga.js +105 -0
- package/node/auth/SessionsState/index.js +38 -0
- package/node/auth/SessionsState/interfaces.js +5 -0
- package/node/auth/SessionsState/saga.js +176 -0
- package/node/auth/SocialLogins/saga.js +5 -0
- package/node/auth/TeamState/index.js +3 -0
- package/node/auth/TeamState/saga.js +67 -12
- package/node/auth/dummy.js +42 -4
- package/node/auth/index.js +56 -0
- package/node/auth/initialState.js +7 -1
- package/node/auth/interfaces.js +36 -2
- package/node/auth/reducer.js +6 -2
- package/node/auth/saga.js +6 -2
- package/node/auth/utils.js +84 -2
- package/node/index.js +1 -1
- package/node/subscriptions/VendorPublicConfig/index.js +37 -0
- package/node/subscriptions/VendorPublicConfig/interfaces.js +5 -0
- package/node/subscriptions/VendorPublicConfig/saga.js +48 -0
- package/node/subscriptions/dummy.js +7 -2
- package/node/subscriptions/interfaces.js +13 -0
- package/node/subscriptions/reducer.js +8 -3
- package/node/subscriptions/saga.js +4 -2
- package/package.json +4 -3
- package/subscriptions/Billing/Information/index.d.ts +1 -1
- package/subscriptions/Billing/Invoices/index.d.ts +1 -1
- package/subscriptions/Billing/PaymentMethod/index.d.ts +1 -1
- package/subscriptions/Billing/Subscription/index.d.ts +1 -1
- package/subscriptions/Billing/index.d.ts +3 -3
- package/subscriptions/Checkout/index.d.ts +1 -1
- package/subscriptions/Config/index.d.ts +1 -1
- package/subscriptions/Plans/index.d.ts +1 -1
- package/subscriptions/Stripe/index.d.ts +1 -1
- package/subscriptions/VendorPublicConfig/index.d.ts +10 -0
- package/subscriptions/VendorPublicConfig/index.js +24 -0
- package/subscriptions/VendorPublicConfig/interfaces.d.ts +10 -0
- package/subscriptions/VendorPublicConfig/interfaces.js +1 -0
- package/subscriptions/VendorPublicConfig/saga.d.ts +2 -0
- package/subscriptions/VendorPublicConfig/saga.js +36 -0
- package/subscriptions/dummy.d.ts +2 -1
- package/subscriptions/dummy.js +5 -1
- package/subscriptions/index.d.ts +12 -5
- package/subscriptions/interfaces.d.ts +4 -0
- package/subscriptions/interfaces.js +1 -0
- package/subscriptions/reducer.d.ts +12 -5
- package/subscriptions/reducer.js +7 -3
- package/subscriptions/saga.js +3 -2
- package/toolkit/index.d.ts +1 -1
- package/vendor/index.d.ts +1 -1
- package/vendor/reducer.d.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LoadAudits, Filter, DataSorting } from './interfaces';
|
|
2
2
|
export declare const defaultItemsPerPage = 20;
|
|
3
|
-
declare const storeName: "audits", reducer: import("
|
|
3
|
+
declare const storeName: "audits", reducer: import("@reduxjs/toolkit").Reducer<import("./interfaces").OldAuditsState, import("@reduxjs/toolkit").AnyAction>;
|
|
4
4
|
export { reducer, storeName };
|
|
5
5
|
export declare const actions: {
|
|
6
6
|
initData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
package/audits/index.d.ts
CHANGED
|
@@ -14,16 +14,16 @@ declare const _default: {
|
|
|
14
14
|
mockSagas: typeof mockSagas;
|
|
15
15
|
storeName: string;
|
|
16
16
|
initialState: import("./interfaces").AuditsState;
|
|
17
|
-
reducer: import("
|
|
17
|
+
reducer: import("@reduxjs/toolkit").Reducer<import("./interfaces").AuditsState, import("@reduxjs/toolkit").AnyAction>;
|
|
18
18
|
actions: {
|
|
19
19
|
loadAuditsMetadata: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
20
20
|
exportAuditsCsv: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
21
|
-
loadAuditLogs: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("
|
|
21
|
+
loadAuditLogs: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("..").WithSilentLoad<import("..").WithCallback<{
|
|
22
22
|
pageOffset: number;
|
|
23
23
|
pageSize?: number | undefined;
|
|
24
24
|
filter?: import("@frontegg/rest-api").QueryFilter[] | undefined;
|
|
25
25
|
sort?: import("@frontegg/rest-api").QuerySort[] | undefined;
|
|
26
|
-
}, boolean>>], import("
|
|
26
|
+
}, boolean>>], import("..").WithSilentLoad<import("..").WithCallback<{
|
|
27
27
|
pageOffset: number;
|
|
28
28
|
pageSize?: number | undefined;
|
|
29
29
|
filter?: import("@frontegg/rest-api").QueryFilter[] | undefined;
|
package/audits/reducer.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { AuditsState } from './interfaces';
|
|
2
2
|
import { AuditLogsActions } from './AuditLogsState';
|
|
3
3
|
import { AuditsMetadataActions } from './AuditsMetadataState';
|
|
4
|
-
declare const reducer: import("
|
|
4
|
+
declare const reducer: import("@reduxjs/toolkit").Reducer<AuditsState, import("@reduxjs/toolkit").AnyAction>;
|
|
5
5
|
declare const actions: {
|
|
6
6
|
loadAuditsMetadata: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
7
7
|
exportAuditsCsv: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
8
|
-
loadAuditLogs: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("
|
|
8
|
+
loadAuditLogs: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("..").WithSilentLoad<import("..").WithCallback<{
|
|
9
9
|
pageOffset: number;
|
|
10
10
|
pageSize?: number | undefined;
|
|
11
11
|
filter?: import("@frontegg/rest-api").QueryFilter[] | undefined;
|
|
12
12
|
sort?: import("@frontegg/rest-api").QuerySort[] | undefined;
|
|
13
|
-
}, boolean>>], import("
|
|
13
|
+
}, boolean>>], import("..").WithSilentLoad<import("..").WithCallback<{
|
|
14
14
|
pageOffset: number;
|
|
15
15
|
pageSize?: number | undefined;
|
|
16
16
|
filter?: import("@frontegg/rest-api").QueryFilter[] | undefined;
|
|
@@ -34,6 +34,9 @@ declare const reducers: {
|
|
|
34
34
|
accountSettingsState: import("..").AccountSettingsState;
|
|
35
35
|
tenantsState: import("..").TenantsState;
|
|
36
36
|
rolesState: import("..").RolesState;
|
|
37
|
+
sessionsState: import("..").SessionsState;
|
|
38
|
+
hostedLoginBox?: boolean | undefined;
|
|
39
|
+
sessionsPolicyState: import("..").SessionsPolicyState;
|
|
37
40
|
routes: import("..").AuthPageRoutes;
|
|
38
41
|
header?: any;
|
|
39
42
|
loaderComponent?: any;
|
|
@@ -64,6 +67,9 @@ declare const reducers: {
|
|
|
64
67
|
accountSettingsState: import("..").AccountSettingsState;
|
|
65
68
|
tenantsState: import("..").TenantsState;
|
|
66
69
|
rolesState: import("..").RolesState;
|
|
70
|
+
sessionsState: import("..").SessionsState;
|
|
71
|
+
hostedLoginBox?: boolean | undefined;
|
|
72
|
+
sessionsPolicyState: import("..").SessionsPolicyState;
|
|
67
73
|
routes: import("..").AuthPageRoutes;
|
|
68
74
|
header?: any;
|
|
69
75
|
loaderComponent?: any;
|
|
@@ -35,6 +35,9 @@ declare const reducers: {
|
|
|
35
35
|
accountSettingsState: AccountSettingsState;
|
|
36
36
|
tenantsState: import("..").TenantsState;
|
|
37
37
|
rolesState: import("..").RolesState;
|
|
38
|
+
sessionsState: import("..").SessionsState;
|
|
39
|
+
hostedLoginBox?: boolean | undefined;
|
|
40
|
+
sessionsPolicyState: import("..").SessionsPolicyState;
|
|
38
41
|
routes: import("..").AuthPageRoutes;
|
|
39
42
|
header?: any;
|
|
40
43
|
loaderComponent?: any;
|
|
@@ -65,6 +68,9 @@ declare const reducers: {
|
|
|
65
68
|
accountSettingsState: AccountSettingsState;
|
|
66
69
|
tenantsState: import("..").TenantsState;
|
|
67
70
|
rolesState: import("..").RolesState;
|
|
71
|
+
sessionsState: import("..").SessionsState;
|
|
72
|
+
hostedLoginBox?: boolean | undefined;
|
|
73
|
+
sessionsPolicyState: import("..").SessionsPolicyState;
|
|
68
74
|
routes: import("..").AuthPageRoutes;
|
|
69
75
|
header?: any;
|
|
70
76
|
loaderComponent?: any;
|
|
@@ -35,6 +35,9 @@ declare const reducers: {
|
|
|
35
35
|
accountSettingsState: import("..").AccountSettingsState;
|
|
36
36
|
tenantsState: import("..").TenantsState;
|
|
37
37
|
rolesState: import("..").RolesState;
|
|
38
|
+
sessionsState: import("..").SessionsState;
|
|
39
|
+
hostedLoginBox?: boolean | undefined;
|
|
40
|
+
sessionsPolicyState: import("..").SessionsPolicyState;
|
|
38
41
|
routes: import("..").AuthPageRoutes;
|
|
39
42
|
header?: any;
|
|
40
43
|
loaderComponent?: any;
|
|
@@ -65,6 +68,9 @@ declare const reducers: {
|
|
|
65
68
|
accountSettingsState: import("..").AccountSettingsState;
|
|
66
69
|
tenantsState: import("..").TenantsState;
|
|
67
70
|
rolesState: import("..").RolesState;
|
|
71
|
+
sessionsState: import("..").SessionsState;
|
|
72
|
+
hostedLoginBox?: boolean | undefined;
|
|
73
|
+
sessionsPolicyState: import("..").SessionsPolicyState;
|
|
68
74
|
routes: import("..").AuthPageRoutes;
|
|
69
75
|
header?: any;
|
|
70
76
|
loaderComponent?: any;
|
|
@@ -101,6 +107,9 @@ declare const reducers: {
|
|
|
101
107
|
accountSettingsState: import("..").AccountSettingsState;
|
|
102
108
|
tenantsState: import("..").TenantsState;
|
|
103
109
|
rolesState: import("..").RolesState;
|
|
110
|
+
sessionsState: import("..").SessionsState;
|
|
111
|
+
hostedLoginBox?: boolean | undefined;
|
|
112
|
+
sessionsPolicyState: import("..").SessionsPolicyState;
|
|
104
113
|
routes: import("..").AuthPageRoutes;
|
|
105
114
|
header?: any;
|
|
106
115
|
loaderComponent?: any;
|
|
@@ -52,6 +52,9 @@ declare const reducers: {
|
|
|
52
52
|
accountSettingsState: import("..").AccountSettingsState;
|
|
53
53
|
tenantsState: import("..").TenantsState;
|
|
54
54
|
rolesState: import("..").RolesState;
|
|
55
|
+
sessionsState: import("..").SessionsState;
|
|
56
|
+
hostedLoginBox?: boolean | undefined;
|
|
57
|
+
sessionsPolicyState: import("..").SessionsPolicyState;
|
|
55
58
|
routes: import("..").AuthPageRoutes;
|
|
56
59
|
header?: any;
|
|
57
60
|
loaderComponent?: any;
|
|
@@ -82,6 +85,9 @@ declare const reducers: {
|
|
|
82
85
|
accountSettingsState: import("..").AccountSettingsState;
|
|
83
86
|
tenantsState: import("..").TenantsState;
|
|
84
87
|
rolesState: import("..").RolesState;
|
|
88
|
+
sessionsState: import("..").SessionsState;
|
|
89
|
+
hostedLoginBox?: boolean | undefined;
|
|
90
|
+
sessionsPolicyState: import("..").SessionsPolicyState;
|
|
85
91
|
routes: import("..").AuthPageRoutes;
|
|
86
92
|
header?: any;
|
|
87
93
|
loaderComponent?: any;
|
|
@@ -35,6 +35,9 @@ declare const reducers: {
|
|
|
35
35
|
accountSettingsState: import("..").AccountSettingsState;
|
|
36
36
|
tenantsState: import("..").TenantsState;
|
|
37
37
|
rolesState: import("..").RolesState;
|
|
38
|
+
sessionsState: import("..").SessionsState;
|
|
39
|
+
hostedLoginBox?: boolean | undefined;
|
|
40
|
+
sessionsPolicyState: import("..").SessionsPolicyState;
|
|
38
41
|
routes: import("..").AuthPageRoutes;
|
|
39
42
|
header?: any;
|
|
40
43
|
loaderComponent?: any;
|
|
@@ -65,6 +68,9 @@ declare const reducers: {
|
|
|
65
68
|
accountSettingsState: import("..").AccountSettingsState;
|
|
66
69
|
tenantsState: import("..").TenantsState;
|
|
67
70
|
rolesState: import("..").RolesState;
|
|
71
|
+
sessionsState: import("..").SessionsState;
|
|
72
|
+
hostedLoginBox?: boolean | undefined;
|
|
73
|
+
sessionsPolicyState: import("..").SessionsPolicyState;
|
|
68
74
|
routes: import("..").AuthPageRoutes;
|
|
69
75
|
header?: any;
|
|
70
76
|
loaderComponent?: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ILogin, ILoginWithMfa,
|
|
2
|
-
import { HostedLoginCallback, IPasswordlessPostLoginPayload, LoginState } from './interfaces';
|
|
1
|
+
import { IChangePhoneNumberWithVerification, ICreateNewDeviceSessionResponse, IEmailPasswordlessPreLogin, ILogin, ILoginWithMfa, IPostLogin, IPreLogin, IRecoverMFAToken, IVerifyChangePhoneNumber, IWebAuthnPreLogin, IWebAuthnPreLoginResponse } from '@frontegg/rest-api';
|
|
2
|
+
import { HostedLoginCallback, IPasswordlessPostLoginPayload, IQuickSmsPasswordlessPreLoginPayload, IVerifyNewWebAuthnDevicePayload, IWebAuthnPostLoginPayload, LoginState } from './interfaces';
|
|
3
3
|
import { WithCallback } from '../../interfaces';
|
|
4
4
|
import { IVerifyInviteToken } from '@frontegg/rest-api';
|
|
5
5
|
declare const loginState: LoginState;
|
|
@@ -36,6 +36,9 @@ declare const reducers: {
|
|
|
36
36
|
accountSettingsState: import("..").AccountSettingsState;
|
|
37
37
|
tenantsState: import("..").TenantsState;
|
|
38
38
|
rolesState: import("..").RolesState;
|
|
39
|
+
sessionsState: import("..").SessionsState;
|
|
40
|
+
hostedLoginBox?: boolean | undefined;
|
|
41
|
+
sessionsPolicyState: import("..").SessionsPolicyState;
|
|
39
42
|
routes: import("..").AuthPageRoutes;
|
|
40
43
|
header?: any;
|
|
41
44
|
loaderComponent?: any;
|
|
@@ -66,6 +69,9 @@ declare const reducers: {
|
|
|
66
69
|
accountSettingsState: import("..").AccountSettingsState;
|
|
67
70
|
tenantsState: import("..").TenantsState;
|
|
68
71
|
rolesState: import("..").RolesState;
|
|
72
|
+
sessionsState: import("..").SessionsState;
|
|
73
|
+
hostedLoginBox?: boolean | undefined;
|
|
74
|
+
sessionsPolicyState: import("..").SessionsPolicyState;
|
|
69
75
|
routes: import("..").AuthPageRoutes;
|
|
70
76
|
header?: any;
|
|
71
77
|
loaderComponent?: any;
|
|
@@ -74,7 +80,7 @@ declare const reducers: {
|
|
|
74
80
|
declare const actions: {
|
|
75
81
|
requestAuthorize: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(boolean | undefined)?], boolean, string, never, never>;
|
|
76
82
|
requestAuthorizeSSR: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[string], string, string, never, never>;
|
|
77
|
-
requestHostedLoginAuthorize: import("@reduxjs/toolkit").
|
|
83
|
+
requestHostedLoginAuthorize: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(Record<string, string> | undefined)?], Record<string, string> | undefined, string, never, never>;
|
|
78
84
|
handleHostedLoginCallback: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[HostedLoginCallback], HostedLoginCallback, string, never, never>;
|
|
79
85
|
afterAuthNavigation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
80
86
|
preLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IPreLogin & {
|
|
@@ -89,15 +95,30 @@ declare const actions: {
|
|
|
89
95
|
loginWithMfa: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<ILoginWithMfa, boolean>], WithCallback<ILoginWithMfa, boolean>, string, never, never>;
|
|
90
96
|
recoverMfa: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[IRecoverMFAToken], IRecoverMFAToken, string, never, never>;
|
|
91
97
|
logout: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[((() => void) | undefined)?], (() => void) | undefined, string, never, never>;
|
|
92
|
-
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>;
|
|
93
103
|
checkIfAllowToRememberMfaDevice: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
|
|
94
104
|
mfaToken: string;
|
|
95
105
|
}], {
|
|
96
106
|
mfaToken: string;
|
|
97
107
|
}, string, never, never>;
|
|
98
|
-
|
|
108
|
+
changePhoneNumberWithVerification: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IChangePhoneNumberWithVerification, boolean>], WithCallback<IChangePhoneNumberWithVerification, boolean>, string, never, never>;
|
|
109
|
+
verifyChangePhoneNumber: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IVerifyChangePhoneNumber, boolean>], WithCallback<IVerifyChangePhoneNumber, boolean>, string, never, never>;
|
|
110
|
+
quickSmsPasswordlessPreLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IQuickSmsPasswordlessPreLoginPayload, boolean>], WithCallback<IQuickSmsPasswordlessPreLoginPayload, boolean>, string, never, never>;
|
|
111
|
+
passwordlessPreLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IEmailPasswordlessPreLogin, void>], WithCallback<IEmailPasswordlessPreLogin, void>, string, never, never>;
|
|
99
112
|
passwordlessPostLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IPasswordlessPostLoginPayload, boolean>], WithCallback<IPasswordlessPostLoginPayload, boolean>, string, never, never>;
|
|
100
113
|
verifyInviteToken: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[IVerifyInviteToken], IVerifyInviteToken, string, never, never>;
|
|
114
|
+
webAuthnPrelogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IWebAuthnPreLogin, IWebAuthnPreLoginResponse | null>], WithCallback<IWebAuthnPreLogin, IWebAuthnPreLoginResponse | null>, string, never, never>;
|
|
115
|
+
webAuthnPostLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[IWebAuthnPostLoginPayload], IWebAuthnPostLoginPayload, string, never, never>;
|
|
116
|
+
webAuthnCreateNewDeviceSession: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
|
|
117
|
+
callback?: ((data: ICreateNewDeviceSessionResponse | null, error?: string | undefined) => void) | undefined;
|
|
118
|
+
}], {
|
|
119
|
+
callback?: ((data: ICreateNewDeviceSessionResponse | null, error?: string | undefined) => void) | undefined;
|
|
120
|
+
}, string, never, never>;
|
|
121
|
+
webAuthnVerifyNewDeviceSession: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[IVerifyNewWebAuthnDevicePayload], IVerifyNewWebAuthnDevicePayload, string, never, never>;
|
|
101
122
|
};
|
|
102
123
|
/**
|
|
103
124
|
* To be used for actions types after dispatch, and should contains
|
|
@@ -108,7 +129,7 @@ declare type DispatchedActions = {
|
|
|
108
129
|
resetLoginState: () => void;
|
|
109
130
|
requestAuthorize: (payload?: boolean) => void;
|
|
110
131
|
requestAuthorizeSSR: (payload: string) => void;
|
|
111
|
-
requestHostedLoginAuthorize: () => void;
|
|
132
|
+
requestHostedLoginAuthorize: (payload?: Record<string, string>) => void;
|
|
112
133
|
handleHostedLoginCallback: (payload: HostedLoginCallback) => void;
|
|
113
134
|
afterAuthNavigation: () => void;
|
|
114
135
|
preLogin: (payload: WithCallback<IPreLogin & {
|
|
@@ -120,13 +141,22 @@ declare type DispatchedActions = {
|
|
|
120
141
|
loginWithMfa: (payload: WithCallback<ILoginWithMfa>) => void;
|
|
121
142
|
recoverMfa: (payload: IRecoverMFAToken) => void;
|
|
122
143
|
logout: (payload?: () => void) => void;
|
|
123
|
-
silentLogout: (payload?:
|
|
144
|
+
silentLogout: (payload?: WithCallback<{
|
|
145
|
+
callbackTimeout?: number;
|
|
146
|
+
}>) => void;
|
|
124
147
|
checkIfAllowToRememberMfaDevice: (payload: {
|
|
125
148
|
mfaToken: string;
|
|
126
149
|
}) => void;
|
|
127
|
-
|
|
150
|
+
changePhoneNumberWithVerification: (payload: WithCallback<IChangePhoneNumberWithVerification>) => void;
|
|
151
|
+
verifyChangePhoneNumber: (payload: WithCallback<IVerifyChangePhoneNumber>) => void;
|
|
152
|
+
quickSmsPasswordlessPreLogin: (payload: WithCallback<IQuickSmsPasswordlessPreLoginPayload>) => void;
|
|
153
|
+
passwordlessPreLogin: (payload: WithCallback<IEmailPasswordlessPreLogin, void>) => void;
|
|
128
154
|
passwordlessPostLogin: (payload: WithCallback<IPasswordlessPostLoginPayload>) => void;
|
|
129
155
|
verifyInviteToken: (payload: IVerifyInviteToken) => void;
|
|
156
|
+
webAuthnPrelogin: (payload: WithCallback<IWebAuthnPreLogin, IWebAuthnPreLoginResponse | null>) => void;
|
|
157
|
+
webAuthnPostLogin: (payload: IWebAuthnPostLoginPayload) => void;
|
|
158
|
+
webAuthnCreateNewDeviceSession: (payload: WithCallback<{}, ICreateNewDeviceSessionResponse | null>) => void;
|
|
159
|
+
webAuthnVerifyNewDeviceSession: (payload: IVerifyNewWebAuthnDevicePayload) => void;
|
|
130
160
|
};
|
|
131
161
|
export declare type LoginActions = DispatchedActions;
|
|
132
162
|
export { loginState, reducers as loginReducers, actions as loginActions };
|
package/auth/LoginState/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { createAction } from '@reduxjs/toolkit';
|
|
2
|
-
import { LoginStep } from './interfaces';
|
|
2
|
+
import { LoginFlow, LoginStep } from './interfaces';
|
|
3
3
|
import { resetStateByKey, typeReducerForKey } from '../utils';
|
|
4
4
|
import { authStoreName } from '../../constants';
|
|
5
5
|
const loginState = {
|
|
6
|
+
flow: LoginFlow.Login,
|
|
6
7
|
step: LoginStep.preLogin,
|
|
7
8
|
loading: false,
|
|
8
9
|
email: '',
|
|
@@ -21,7 +22,9 @@ const actions = {
|
|
|
21
22
|
requestAuthorizeSSR: createAction(`${authStoreName}/requestAuthorizeSSR`, payload => ({
|
|
22
23
|
payload
|
|
23
24
|
})),
|
|
24
|
-
requestHostedLoginAuthorize: createAction(`${authStoreName}/requestHostedLoginAuthorize
|
|
25
|
+
requestHostedLoginAuthorize: createAction(`${authStoreName}/requestHostedLoginAuthorize`, payload => ({
|
|
26
|
+
payload
|
|
27
|
+
})),
|
|
25
28
|
handleHostedLoginCallback: createAction(`${authStoreName}/handleHostedLoginCallback`, payload => ({
|
|
26
29
|
payload
|
|
27
30
|
})),
|
|
@@ -50,6 +53,15 @@ const actions = {
|
|
|
50
53
|
checkIfAllowToRememberMfaDevice: createAction(`${authStoreName}/checkIfAllowToRememberMfaDevice`, payload => ({
|
|
51
54
|
payload
|
|
52
55
|
})),
|
|
56
|
+
changePhoneNumberWithVerification: createAction(`${authStoreName}/changePhoneNumberWithVerification`, payload => ({
|
|
57
|
+
payload
|
|
58
|
+
})),
|
|
59
|
+
verifyChangePhoneNumber: createAction(`${authStoreName}/verifyChangePhoneNumber`, payload => ({
|
|
60
|
+
payload
|
|
61
|
+
})),
|
|
62
|
+
quickSmsPasswordlessPreLogin: createAction(`${authStoreName}/quickSmsPasswordlessPreLogin`, payload => ({
|
|
63
|
+
payload
|
|
64
|
+
})),
|
|
53
65
|
passwordlessPreLogin: createAction(`${authStoreName}/passwordlessPreLogin`, payload => ({
|
|
54
66
|
payload
|
|
55
67
|
})),
|
|
@@ -58,6 +70,18 @@ const actions = {
|
|
|
58
70
|
})),
|
|
59
71
|
verifyInviteToken: createAction(`${authStoreName}/verifyInviteToken`, payload => ({
|
|
60
72
|
payload
|
|
73
|
+
})),
|
|
74
|
+
webAuthnPrelogin: createAction(`${authStoreName}/webAuthnPrelogin`, payload => ({
|
|
75
|
+
payload
|
|
76
|
+
})),
|
|
77
|
+
webAuthnPostLogin: createAction(`${authStoreName}/webAuthnPostLogin`, payload => ({
|
|
78
|
+
payload
|
|
79
|
+
})),
|
|
80
|
+
webAuthnCreateNewDeviceSession: createAction(`${authStoreName}/webAuthnCreateNewDeviceSession`, payload => ({
|
|
81
|
+
payload
|
|
82
|
+
})),
|
|
83
|
+
webAuthnVerifyNewDeviceSession: createAction(`${authStoreName}/webAuthnVerifyNewDeviceSession`, payload => ({
|
|
84
|
+
payload
|
|
61
85
|
}))
|
|
62
86
|
};
|
|
63
87
|
const Matcher = {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { AuthStrategyEnum, IPasswordlessPostLogin, ITenantsResponse } from '@frontegg/rest-api';
|
|
1
|
+
import { AuthStrategyEnum, IPasswordlessPostLogin, ITenantsResponse, IVerifyNewWebAuthnDevice, IWebAuthnPostLogin } from '@frontegg/rest-api';
|
|
2
|
+
import { WithCallback } from '../../interfaces';
|
|
2
3
|
import { CustomEventsOptions } from '../interfaces';
|
|
3
|
-
export { AuthStrategyEnum };
|
|
4
4
|
export declare enum LoginStep {
|
|
5
5
|
'preLogin' = "preLogin",
|
|
6
6
|
'magicLinkPreLoginSuccess' = "magicLinkPreLoginSuccess",
|
|
7
7
|
'loginWithSmsOtc' = "loginWithSmsOtc",
|
|
8
|
+
'loginWithQuickSmsOtc' = "loginWithQuickSmsOtc",
|
|
8
9
|
'loginWithOtc' = "loginWithOtc",
|
|
9
10
|
'loginWithPassword' = "loginWithPassword",
|
|
10
11
|
'loginWithTwoFactor' = "loginWithTwoFactor",
|
|
@@ -14,10 +15,21 @@ export declare enum LoginStep {
|
|
|
14
15
|
'forceTwoFactor' = "forceTwoFactor",
|
|
15
16
|
'recoverTwoFactor' = "recoverTwoFactor"
|
|
16
17
|
}
|
|
18
|
+
export declare enum LoginFlow {
|
|
19
|
+
Login = "login",
|
|
20
|
+
RegisterQuickLogin = "registerQuickLogin"
|
|
21
|
+
}
|
|
22
|
+
export declare enum QuickLoginStrategy {
|
|
23
|
+
Internal = "internal",
|
|
24
|
+
UsbKey = "usb-key",
|
|
25
|
+
Android = "android",
|
|
26
|
+
Sms = "sms"
|
|
27
|
+
}
|
|
17
28
|
export interface LoginState {
|
|
18
29
|
loading: boolean;
|
|
19
30
|
error?: any;
|
|
20
31
|
step: LoginStep;
|
|
32
|
+
flow: LoginFlow;
|
|
21
33
|
ssoRedirectUrl?: string;
|
|
22
34
|
mfaRequired?: boolean;
|
|
23
35
|
mfaToken?: string;
|
|
@@ -30,12 +42,26 @@ export interface LoginState {
|
|
|
30
42
|
inviteTokenError?: string;
|
|
31
43
|
isNewUser?: boolean;
|
|
32
44
|
phoneNumber?: string;
|
|
45
|
+
quickLoginToRegister?: QuickLoginStrategy;
|
|
46
|
+
changePhoneId?: string;
|
|
33
47
|
}
|
|
34
48
|
export interface HostedLoginCallback {
|
|
35
49
|
code: string;
|
|
36
50
|
state?: string;
|
|
37
51
|
nonce?: string;
|
|
38
52
|
}
|
|
53
|
+
export interface IQuickSmsPasswordlessPreLoginPayload {
|
|
54
|
+
userId: string;
|
|
55
|
+
recaptchaToken?: string;
|
|
56
|
+
invitationToken?: string;
|
|
57
|
+
}
|
|
39
58
|
export interface IPasswordlessPostLoginPayload extends IPasswordlessPostLogin {
|
|
40
59
|
events?: CustomEventsOptions;
|
|
41
60
|
}
|
|
61
|
+
export declare type IWebAuthnPostLoginPayload = WithCallback<Omit<IWebAuthnPostLogin, 'response' | 'id'>> & {
|
|
62
|
+
publicKey: Credential;
|
|
63
|
+
};
|
|
64
|
+
export declare type IVerifyNewWebAuthnDevicePayload = WithCallback<Omit<IVerifyNewWebAuthnDevice, 'response' | 'id'>> & {
|
|
65
|
+
publicKey: Credential;
|
|
66
|
+
};
|
|
67
|
+
export { AuthStrategyEnum };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AuthStrategyEnum } from '@frontegg/rest-api';
|
|
2
|
-
export { AuthStrategyEnum };
|
|
3
2
|
export let LoginStep;
|
|
4
3
|
|
|
5
4
|
(function (LoginStep) {
|
|
6
5
|
LoginStep["preLogin"] = "preLogin";
|
|
7
6
|
LoginStep["magicLinkPreLoginSuccess"] = "magicLinkPreLoginSuccess";
|
|
8
7
|
LoginStep["loginWithSmsOtc"] = "loginWithSmsOtc";
|
|
8
|
+
LoginStep["loginWithQuickSmsOtc"] = "loginWithQuickSmsOtc";
|
|
9
9
|
LoginStep["loginWithOtc"] = "loginWithOtc";
|
|
10
10
|
LoginStep["loginWithPassword"] = "loginWithPassword";
|
|
11
11
|
LoginStep["loginWithTwoFactor"] = "loginWithTwoFactor";
|
|
@@ -14,4 +14,22 @@ export let LoginStep;
|
|
|
14
14
|
LoginStep["success"] = "success";
|
|
15
15
|
LoginStep["forceTwoFactor"] = "forceTwoFactor";
|
|
16
16
|
LoginStep["recoverTwoFactor"] = "recoverTwoFactor";
|
|
17
|
-
})(LoginStep || (LoginStep = {}));
|
|
17
|
+
})(LoginStep || (LoginStep = {}));
|
|
18
|
+
|
|
19
|
+
export let LoginFlow;
|
|
20
|
+
|
|
21
|
+
(function (LoginFlow) {
|
|
22
|
+
LoginFlow["Login"] = "login";
|
|
23
|
+
LoginFlow["RegisterQuickLogin"] = "registerQuickLogin";
|
|
24
|
+
})(LoginFlow || (LoginFlow = {}));
|
|
25
|
+
|
|
26
|
+
export let QuickLoginStrategy;
|
|
27
|
+
|
|
28
|
+
(function (QuickLoginStrategy) {
|
|
29
|
+
QuickLoginStrategy["Internal"] = "internal";
|
|
30
|
+
QuickLoginStrategy["UsbKey"] = "usb-key";
|
|
31
|
+
QuickLoginStrategy["Android"] = "android";
|
|
32
|
+
QuickLoginStrategy["Sms"] = "sms";
|
|
33
|
+
})(QuickLoginStrategy || (QuickLoginStrategy = {}));
|
|
34
|
+
|
|
35
|
+
export { AuthStrategyEnum };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CallEffect } from 'redux-saga/effects';
|
|
2
2
|
import { IAllowedToRememberMfaDevice, ILoginResponse, ILoginResponseV2, ISamlMetadata } from '@frontegg/rest-api';
|
|
3
3
|
import { AuthState } from '../interfaces';
|
|
4
|
-
import { LoginStep } from './interfaces';
|
|
4
|
+
import { LoginFlow, LoginStep, QuickLoginStrategy } from './interfaces';
|
|
5
5
|
export declare function afterAuthNavigation(): Generator<import("redux-saga/effects").SelectEffect | CallEffect<true>, void, {
|
|
6
6
|
routes: any;
|
|
7
7
|
includeQueryParam: any;
|
|
@@ -27,15 +27,18 @@ export declare function getMfaRequiredState(user: any): Generator<import("redux-
|
|
|
27
27
|
error: undefined;
|
|
28
28
|
step: LoginStep.loginWithTwoFactor | LoginStep.forceTwoFactor;
|
|
29
29
|
tenantsLoading: boolean;
|
|
30
|
+
email: any;
|
|
30
31
|
tenants: never[];
|
|
31
32
|
allowRememberMfaDevice: any;
|
|
32
33
|
mfaDeviceExpiration: any;
|
|
34
|
+
flow: LoginFlow;
|
|
33
35
|
ssoRedirectUrl?: string | undefined;
|
|
34
|
-
email?: string | undefined;
|
|
35
36
|
inviteTokenTenantName?: string | undefined;
|
|
36
37
|
inviteTokenError?: string | undefined;
|
|
37
38
|
isNewUser?: boolean | undefined;
|
|
38
39
|
phoneNumber?: string | undefined;
|
|
40
|
+
quickLoginToRegister?: QuickLoginStrategy | undefined;
|
|
41
|
+
changePhoneId?: string | undefined;
|
|
39
42
|
};
|
|
40
43
|
user: undefined;
|
|
41
44
|
isAuthenticated: boolean;
|
|
@@ -43,7 +46,7 @@ export declare function getMfaRequiredState(user: any): Generator<import("redux-
|
|
|
43
46
|
isAllowedToRemember: any;
|
|
44
47
|
mfaDeviceExpiration: any;
|
|
45
48
|
}>;
|
|
46
|
-
export declare function refreshToken(): Generator<import("redux-saga/effects").SelectEffect | import("redux-saga/effects").PutEffect<{
|
|
49
|
+
export declare function refreshToken(): Generator<import("redux-saga/effects").SelectEffect | CallEffect<void> | CallEffect<Generator<import("redux-saga/effects").SelectEffect | import("redux-saga/effects").PutEffect<{
|
|
47
50
|
payload: Partial<AuthState>;
|
|
48
51
|
type: string;
|
|
49
52
|
}> | Generator<import("redux-saga/effects").SelectEffect | CallEffect<true>, void, {
|
|
@@ -57,15 +60,18 @@ export declare function refreshToken(): Generator<import("redux-saga/effects").S
|
|
|
57
60
|
error: undefined;
|
|
58
61
|
step: LoginStep.loginWithTwoFactor | LoginStep.forceTwoFactor;
|
|
59
62
|
tenantsLoading: boolean;
|
|
63
|
+
email: any;
|
|
60
64
|
tenants: never[];
|
|
61
65
|
allowRememberMfaDevice: any;
|
|
62
66
|
mfaDeviceExpiration: any;
|
|
67
|
+
flow: LoginFlow;
|
|
63
68
|
ssoRedirectUrl?: string | undefined;
|
|
64
|
-
email?: string | undefined;
|
|
65
69
|
inviteTokenTenantName?: string | undefined;
|
|
66
70
|
inviteTokenError?: string | undefined;
|
|
67
71
|
isNewUser?: boolean | undefined;
|
|
68
72
|
phoneNumber?: string | undefined;
|
|
73
|
+
quickLoginToRegister?: QuickLoginStrategy | undefined;
|
|
74
|
+
changePhoneId?: string | undefined;
|
|
69
75
|
};
|
|
70
76
|
user: undefined;
|
|
71
77
|
isAuthenticated: boolean;
|
|
@@ -75,6 +81,6 @@ export declare function refreshToken(): Generator<import("redux-saga/effects").S
|
|
|
75
81
|
}> | CallEffect<ILoginResponseV2> | import("redux-saga/effects").PutEffect<{
|
|
76
82
|
payload: Partial<import("../..").TenantsState>;
|
|
77
83
|
type: string;
|
|
78
|
-
}>, void, AuthState & ILoginResponseV2 & Partial<AuthState
|
|
84
|
+
}>, void, AuthState & ILoginResponseV2 & Partial<AuthState>>>, void, AuthState>;
|
|
79
85
|
export declare function loginSagas(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
|
|
80
86
|
export declare function loginSagasMock(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
|