@frontegg/redux-store 5.40.0 → 5.41.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/AccountSettingsState/index.d.ts +0 -8
- package/auth/MfaState/index.d.ts +2 -8
- package/auth/ResetPhoneNumberState/index.d.ts +0 -8
- package/auth/SignUp/saga.d.ts +1 -1
- package/auth/index.js +9 -4
- package/auth/interfaces.d.ts +7 -1
- package/index.js +1 -1
- package/node/auth/index.js +151 -3518
- package/node/{saga-633c17d2.js → index-2ab7009b.js} +12 -2
- package/node/index-5c2d4101.js +3612 -0
- package/node/index.js +52 -48
- package/node/toolkit/index.js +65 -144
- package/node/vendor/index.js +8 -15
- package/package.json +1 -1
|
@@ -13,10 +13,6 @@ declare const reducers: {
|
|
|
13
13
|
}) => {
|
|
14
14
|
onRedirectTo: (path: string, opts?: import("@frontegg/rest-api").RedirectOptions | undefined) => void;
|
|
15
15
|
error?: any;
|
|
16
|
-
/**
|
|
17
|
-
* if you see error in matcher that's mean the DispatchAction does not
|
|
18
|
-
* contains the same functions in reducers and actions
|
|
19
|
-
*/
|
|
20
16
|
isAuthenticated: boolean;
|
|
21
17
|
isLoading: boolean;
|
|
22
18
|
keepSessionAlive?: boolean | undefined;
|
|
@@ -47,10 +43,6 @@ declare const reducers: {
|
|
|
47
43
|
resetAccountSettingsState: (state: import("..").AuthState) => {
|
|
48
44
|
onRedirectTo: (path: string, opts?: import("@frontegg/rest-api").RedirectOptions | undefined) => void;
|
|
49
45
|
error?: any;
|
|
50
|
-
/**
|
|
51
|
-
* if you see error in matcher that's mean the DispatchAction does not
|
|
52
|
-
* contains the same functions in reducers and actions
|
|
53
|
-
*/
|
|
54
46
|
isAuthenticated: boolean;
|
|
55
47
|
isLoading: boolean;
|
|
56
48
|
keepSessionAlive?: boolean | undefined;
|
package/auth/MfaState/index.d.ts
CHANGED
|
@@ -19,10 +19,7 @@ declare const reducers: {
|
|
|
19
19
|
user?: import("..").User | null | undefined;
|
|
20
20
|
isSSOAuth: boolean;
|
|
21
21
|
ssoACS?: string | undefined;
|
|
22
|
-
loginState: import("..").LoginState;
|
|
23
|
-
* if you see error in matcher that's mean the DispatchAction does not
|
|
24
|
-
* contains the same functions in reducers and actions
|
|
25
|
-
*/
|
|
22
|
+
loginState: import("..").LoginState;
|
|
26
23
|
activateState: import("..").ActivateAccountState;
|
|
27
24
|
acceptInvitationState: import("..").AcceptInvitationState;
|
|
28
25
|
forgotPasswordState: import("..").ForgotPasswordState;
|
|
@@ -52,10 +49,7 @@ declare const reducers: {
|
|
|
52
49
|
user?: import("..").User | null | undefined;
|
|
53
50
|
isSSOAuth: boolean;
|
|
54
51
|
ssoACS?: string | undefined;
|
|
55
|
-
loginState: import("..").LoginState;
|
|
56
|
-
* if you see error in matcher that's mean the DispatchAction does not
|
|
57
|
-
* contains the same functions in reducers and actions
|
|
58
|
-
*/
|
|
52
|
+
loginState: import("..").LoginState;
|
|
59
53
|
activateState: import("..").ActivateAccountState;
|
|
60
54
|
acceptInvitationState: import("..").AcceptInvitationState;
|
|
61
55
|
forgotPasswordState: import("..").ForgotPasswordState;
|
|
@@ -22,10 +22,6 @@ declare const reducers: {
|
|
|
22
22
|
loginState: import("..").LoginState;
|
|
23
23
|
activateState: import("..").ActivateAccountState;
|
|
24
24
|
acceptInvitationState: import("..").AcceptInvitationState;
|
|
25
|
-
/**
|
|
26
|
-
* if you see error in matcher that's mean the DispatchAction does not
|
|
27
|
-
* contains the same functions in reducers and actions
|
|
28
|
-
*/
|
|
29
25
|
forgotPasswordState: import("..").ForgotPasswordState;
|
|
30
26
|
resetPhoneNumberState: ResetPhoneNumberState;
|
|
31
27
|
ssoState: import("..").SSOState;
|
|
@@ -56,10 +52,6 @@ declare const reducers: {
|
|
|
56
52
|
loginState: import("..").LoginState;
|
|
57
53
|
activateState: import("..").ActivateAccountState;
|
|
58
54
|
acceptInvitationState: import("..").AcceptInvitationState;
|
|
59
|
-
/**
|
|
60
|
-
* if you see error in matcher that's mean the DispatchAction does not
|
|
61
|
-
* contains the same functions in reducers and actions
|
|
62
|
-
*/
|
|
63
55
|
forgotPasswordState: import("..").ForgotPasswordState;
|
|
64
56
|
resetPhoneNumberState: ResetPhoneNumberState;
|
|
65
57
|
ssoState: import("..").SSOState;
|
package/auth/SignUp/saga.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare function signUpUser({ payload: { events, url, ...payload } }: Pay
|
|
|
20
20
|
payload: Partial<import("../LoginState/interfaces").LoginState>;
|
|
21
21
|
type: string;
|
|
22
22
|
}> | import("redux-saga/effects").PutEffect<{
|
|
23
|
-
payload: Partial<import("
|
|
23
|
+
payload: Partial<import("../interfaces").AuthState>;
|
|
24
24
|
type: string;
|
|
25
25
|
}> | import("redux-saga/effects").PutEffect<{
|
|
26
26
|
payload: {
|
package/auth/index.js
CHANGED
|
@@ -797,7 +797,12 @@ var UserVeirifedOriginTypes;
|
|
|
797
797
|
UserVeirifedOriginTypes["SOCIAL_LOGIN"] = "SOCIAL_LOGIN";
|
|
798
798
|
UserVeirifedOriginTypes["PASSWORDLESS"] = "PASSWORDLESS";
|
|
799
799
|
UserVeirifedOriginTypes["ACTIVATION_LINK"] = "ACTIVATION_LINK";
|
|
800
|
-
})(UserVeirifedOriginTypes || (UserVeirifedOriginTypes = {}));
|
|
800
|
+
})(UserVeirifedOriginTypes || (UserVeirifedOriginTypes = {}));
|
|
801
|
+
var AuthenticationTypes;
|
|
802
|
+
(function (AuthenticationTypes) {
|
|
803
|
+
AuthenticationTypes["SOCIAL_LOGIN"] = "SOCIAL_LOGIN";
|
|
804
|
+
AuthenticationTypes["PASSWORD"] = "PASSWORD";
|
|
805
|
+
})(AuthenticationTypes || (AuthenticationTypes = {}));
|
|
801
806
|
|
|
802
807
|
function* loadAllowSignUps() {
|
|
803
808
|
yield put(actions.setSignUpState({ loading: true }));
|
|
@@ -820,7 +825,7 @@ function* signUpUser(_a) {
|
|
|
820
825
|
const { shouldActivate, user } = yield call(api.auth.signUpUser, payload);
|
|
821
826
|
if (!payload.invitationToken) {
|
|
822
827
|
const { email, name, companyName } = payload;
|
|
823
|
-
(_b = events === null || events === void 0 ? void 0 : events.signUpComplete) === null || _b === void 0 ? void 0 : _b.call(events, { email, name, companyName, url });
|
|
828
|
+
(_b = events === null || events === void 0 ? void 0 : events.signUpComplete) === null || _b === void 0 ? void 0 : _b.call(events, { email, name, companyName, url, authenticationType: AuthenticationTypes.PASSWORD });
|
|
824
829
|
}
|
|
825
830
|
ContextHolder.setAccessToken(user === null || user === void 0 ? void 0 : user.accessToken);
|
|
826
831
|
ContextHolder.setUser(user);
|
|
@@ -2706,7 +2711,7 @@ function* loginViaSocialLogin(_a) {
|
|
|
2706
2711
|
yield put(actions.setSocialLoginsState({ loading: true }));
|
|
2707
2712
|
const { email, isNewUser } = yield call(api.auth.loginViaSocialLogin, payload);
|
|
2708
2713
|
if (isNewUser) {
|
|
2709
|
-
(_b = events === null || events === void 0 ? void 0 : events.signUpComplete) === null || _b === void 0 ? void 0 : _b.call(events, { email, url });
|
|
2714
|
+
(_b = events === null || events === void 0 ? void 0 : events.signUpComplete) === null || _b === void 0 ? void 0 : _b.call(events, { email, url, authenticationType: AuthenticationTypes.SOCIAL_LOGIN, socialProvider: payload.provider });
|
|
2710
2715
|
(_c = events === null || events === void 0 ? void 0 : events.userVerified) === null || _c === void 0 ? void 0 : _c.call(events, { email, origin: UserVeirifedOriginTypes.SOCIAL_LOGIN });
|
|
2711
2716
|
}
|
|
2712
2717
|
yield put(actions.setLoginState({ email, isNewUser }));
|
|
@@ -3461,4 +3466,4 @@ var authStore = {
|
|
|
3461
3466
|
actions,
|
|
3462
3467
|
};
|
|
3463
3468
|
|
|
3464
|
-
export { AcceptInvitationStep, ActivateAccountStep, ApiStateKeys, ForgotPasswordStep, LoginStep, MFAStep, ResetPhoneNumberStep, SSOStateKeys, SamlVendors, SignUpStage, TeamStateKeys, UserVeirifedOriginTypes, actions$e as acceptInvitationActions, reducers$d as acceptInvitationReducers, acceptInvitationState, actions$3 as accountSettingsActions, reducers$2 as accountSettingsReducers, accountSettingsState, actions$f as activateAccountActions, reducers$e as activateAccountReducers, activateState, actions$5 as apiTokensActions, reducers$4 as apiTokensReducers, apiTokensState, actions as authActions, initialState as authInitialState, mockSagas as authMockSagas, reducer as authReducers, sagas as authSagas, authStore as default, actions$d as forgotPasswordActions, reducers$c as forgotPasswordReducers, forgotPasswordState, actions$g as loginActions, reducers$f as loginReducers, loginState, actions$9 as mfaActions, reducers$8 as mfaReducers, mfaState, actions$a as profileActions, reducers$9 as profileReducers, profileState, actions$c as resetPhoneNumberActions, reducers$b as resetPhoneNumberReducers, resetPhoneNumberState, actions$1 as rolesActions, reducers as rolesReducers, rolesState, actions$4 as securityPolicyActions, reducers$3 as securityPolicyReducers, securityPolicyState, actions$6 as signUpActions, reducers$5 as signUpReducers, signUpState, socialLoginState, actions$7 as socialLoginsActions, reducers$6 as socialLoginsReducer, actions$b as ssoActions, reducers$a as ssoReducers, ssoState, actions$8 as teamActions, reducers$7 as teamReducers, teamState, actions$2 as tenantsActions, reducers$1 as tenantsReducers, tenantsState };
|
|
3469
|
+
export { AcceptInvitationStep, ActivateAccountStep, ApiStateKeys, AuthenticationTypes, ForgotPasswordStep, LoginStep, MFAStep, ResetPhoneNumberStep, SSOStateKeys, SamlVendors, SignUpStage, TeamStateKeys, UserVeirifedOriginTypes, actions$e as acceptInvitationActions, reducers$d as acceptInvitationReducers, acceptInvitationState, actions$3 as accountSettingsActions, reducers$2 as accountSettingsReducers, accountSettingsState, actions$f as activateAccountActions, reducers$e as activateAccountReducers, activateState, actions$5 as apiTokensActions, reducers$4 as apiTokensReducers, apiTokensState, actions as authActions, initialState as authInitialState, mockSagas as authMockSagas, reducer as authReducers, sagas as authSagas, authStore as default, actions$d as forgotPasswordActions, reducers$c as forgotPasswordReducers, forgotPasswordState, actions$g as loginActions, reducers$f as loginReducers, loginState, actions$9 as mfaActions, reducers$8 as mfaReducers, mfaState, actions$a as profileActions, reducers$9 as profileReducers, profileState, actions$c as resetPhoneNumberActions, reducers$b as resetPhoneNumberReducers, resetPhoneNumberState, actions$1 as rolesActions, reducers as rolesReducers, rolesState, actions$4 as securityPolicyActions, reducers$3 as securityPolicyReducers, securityPolicyState, actions$6 as signUpActions, reducers$5 as signUpReducers, signUpState, socialLoginState, actions$7 as socialLoginsActions, reducers$6 as socialLoginsReducer, actions$b as ssoActions, reducers$a as ssoReducers, ssoState, actions$8 as teamActions, reducers$7 as teamReducers, teamState, actions$2 as tenantsActions, reducers$1 as tenantsReducers, tenantsState };
|
package/auth/interfaces.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IUserProfile, RedirectOptions } from '@frontegg/rest-api';
|
|
1
|
+
import { IUserProfile, RedirectOptions, SocialLoginProviders } from '@frontegg/rest-api';
|
|
2
2
|
import { ApiTokensState } from './ApiTokensState/interfaces';
|
|
3
3
|
import { ActivateAccountState } from './ActivateState/interfaces';
|
|
4
4
|
import { LoginState } from './LoginState/interfaces';
|
|
@@ -130,6 +130,10 @@ export declare enum UserVeirifedOriginTypes {
|
|
|
130
130
|
PASSWORDLESS = "PASSWORDLESS",
|
|
131
131
|
ACTIVATION_LINK = "ACTIVATION_LINK"
|
|
132
132
|
}
|
|
133
|
+
export declare enum AuthenticationTypes {
|
|
134
|
+
SOCIAL_LOGIN = "SOCIAL_LOGIN",
|
|
135
|
+
PASSWORD = "PASSWORD"
|
|
136
|
+
}
|
|
133
137
|
export interface CustomEventsOptions {
|
|
134
138
|
userVerified?: (payload: IUserVerifiedPayload) => void;
|
|
135
139
|
signUpComplete?: (payload: ISignUpCompletePayload) => void;
|
|
@@ -143,5 +147,7 @@ export interface ISignUpCompletePayload {
|
|
|
143
147
|
companyName?: string;
|
|
144
148
|
email: string;
|
|
145
149
|
url?: URL;
|
|
150
|
+
authenticationType: AuthenticationTypes;
|
|
151
|
+
socialProvider?: SocialLoginProviders;
|
|
146
152
|
}
|
|
147
153
|
export {};
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AcceptInvitationStep, ActivateAccountStep, ApiStateKeys, ForgotPasswordStep, LoginStep, MFAStep, ResetPhoneNumberStep, SSOStateKeys, SamlVendors, SignUpStage, TeamStateKeys, UserVeirifedOriginTypes, acceptInvitationActions, acceptInvitationReducers, acceptInvitationState, accountSettingsActions, accountSettingsReducers, accountSettingsState, activateAccountActions, activateAccountReducers, activateState, apiTokensActions, apiTokensReducers, apiTokensState, default as auth, authActions, authInitialState, authMockSagas, authReducers, authSagas, forgotPasswordActions, forgotPasswordReducers, forgotPasswordState, loginActions, loginReducers, loginState, mfaActions, mfaReducers, mfaState, profileActions, profileReducers, profileState, resetPhoneNumberActions, resetPhoneNumberReducers, resetPhoneNumberState, rolesActions, rolesReducers, rolesState, securityPolicyActions, securityPolicyReducers, securityPolicyState, signUpActions, signUpReducers, signUpState, socialLoginState, socialLoginsActions, socialLoginsReducer, ssoActions, ssoReducers, ssoState, teamActions, teamReducers, teamState, tenantsActions, tenantsReducers, tenantsState } from './auth/index.js';
|
|
1
|
+
export { AcceptInvitationStep, ActivateAccountStep, ApiStateKeys, AuthenticationTypes, ForgotPasswordStep, LoginStep, MFAStep, ResetPhoneNumberStep, SSOStateKeys, SamlVendors, SignUpStage, TeamStateKeys, UserVeirifedOriginTypes, acceptInvitationActions, acceptInvitationReducers, acceptInvitationState, accountSettingsActions, accountSettingsReducers, accountSettingsState, activateAccountActions, activateAccountReducers, activateState, apiTokensActions, apiTokensReducers, apiTokensState, default as auth, authActions, authInitialState, authMockSagas, authReducers, authSagas, forgotPasswordActions, forgotPasswordReducers, forgotPasswordState, loginActions, loginReducers, loginState, mfaActions, mfaReducers, mfaState, profileActions, profileReducers, profileState, resetPhoneNumberActions, resetPhoneNumberReducers, resetPhoneNumberState, rolesActions, rolesReducers, rolesState, securityPolicyActions, securityPolicyReducers, securityPolicyState, signUpActions, signUpReducers, signUpState, socialLoginState, socialLoginsActions, socialLoginsReducer, ssoActions, ssoReducers, ssoState, teamActions, teamReducers, teamState, tenantsActions, tenantsReducers, tenantsState } from './auth/index.js';
|
|
2
2
|
export { auditLogsActions, auditLogsReducers, auditLogsState, default as audits, auditsActions, auditsInitialState, auditsMetadataActions, auditsMetadataReducers, auditsMetadataState, auditsMockSagas, auditsReducers, auditsSagas } from './audits/index.js';
|
|
3
3
|
export { default as connectivity, connectivityActions, connectivityInitialState, connectivityReducers, connectivitySagas } from './connectivity/index.js';
|
|
4
4
|
export { CheckoutEvent, CheckoutStatus, PaymentMethodType, PaymentProvider, SubscriptionCancellationPolicy, SubscriptionStatus, subscriptionActions, subscriptionInitialState, subscriptionReducers, subscriptionSagas, subscriptionSagasMock, default as subscriptions } from './subscriptions/index.js';
|