@frontegg/redux-store 5.40.0 → 5.42.1
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 +3 -1
- package/auth/index.js +28 -6
- package/auth/interfaces.d.ts +10 -1
- package/index.js +1 -1
- package/node/auth/index.js +151 -3518
- package/node/index-09390a8a.js +3629 -0
- package/node/{saga-633c17d2.js → index-2ab7009b.js} +12 -2
- package/node/index.js +52 -48
- package/node/toolkit/index.js +65 -144
- package/node/vendor/index.js +8 -15
- package/package.json +2 -2
|
@@ -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: {
|
|
@@ -33,6 +33,8 @@ export declare function signUpUser({ payload: { events, url, ...payload } }: Pay
|
|
|
33
33
|
} & {
|
|
34
34
|
shouldActivate: any;
|
|
35
35
|
user: any;
|
|
36
|
+
tenantId: any;
|
|
37
|
+
userId: any;
|
|
36
38
|
}>;
|
|
37
39
|
export declare function resetSignUpStateSoft(): Generator<import("redux-saga/effects").PutEffect<{
|
|
38
40
|
payload: Partial<import("./interfaces").SignUpState>;
|
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 }));
|
|
@@ -817,10 +822,19 @@ function* signUpUser(_a) {
|
|
|
817
822
|
yield put(actions.setSignUpState({ loading: true }));
|
|
818
823
|
try {
|
|
819
824
|
const { routes, onRedirectTo } = yield select((state) => state.auth);
|
|
820
|
-
const { shouldActivate, user } = yield call(api.auth.signUpUser, payload);
|
|
825
|
+
const { shouldActivate, user, tenantId, userId } = 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, {
|
|
828
|
+
(_b = events === null || events === void 0 ? void 0 : events.signUpComplete) === null || _b === void 0 ? void 0 : _b.call(events, {
|
|
829
|
+
email,
|
|
830
|
+
name,
|
|
831
|
+
companyName,
|
|
832
|
+
url,
|
|
833
|
+
authenticationType: AuthenticationTypes.PASSWORD,
|
|
834
|
+
id: userId,
|
|
835
|
+
tenantId,
|
|
836
|
+
createdAt: new Date(),
|
|
837
|
+
});
|
|
824
838
|
}
|
|
825
839
|
ContextHolder.setAccessToken(user === null || user === void 0 ? void 0 : user.accessToken);
|
|
826
840
|
ContextHolder.setUser(user);
|
|
@@ -2704,9 +2718,17 @@ function* loginViaSocialLogin(_a) {
|
|
|
2704
2718
|
var _e = _a.payload, { events, url } = _e, payload = __rest(_e, ["events", "url"]);
|
|
2705
2719
|
try {
|
|
2706
2720
|
yield put(actions.setSocialLoginsState({ loading: true }));
|
|
2707
|
-
const { email, isNewUser } = yield call(api.auth.loginViaSocialLogin, payload);
|
|
2721
|
+
const { email, isNewUser, userId, tenantId } = yield call(api.auth.loginViaSocialLogin, payload);
|
|
2708
2722
|
if (isNewUser) {
|
|
2709
|
-
(_b = events === null || events === void 0 ? void 0 : events.signUpComplete) === null || _b === void 0 ? void 0 : _b.call(events, {
|
|
2723
|
+
(_b = events === null || events === void 0 ? void 0 : events.signUpComplete) === null || _b === void 0 ? void 0 : _b.call(events, {
|
|
2724
|
+
email,
|
|
2725
|
+
url,
|
|
2726
|
+
authenticationType: AuthenticationTypes.SOCIAL_LOGIN,
|
|
2727
|
+
createdAt: new Date(),
|
|
2728
|
+
id: userId,
|
|
2729
|
+
socialProvider: payload.provider,
|
|
2730
|
+
tenantId
|
|
2731
|
+
});
|
|
2710
2732
|
(_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
2733
|
}
|
|
2712
2734
|
yield put(actions.setLoginState({ email, isNewUser }));
|
|
@@ -3461,4 +3483,4 @@ var authStore = {
|
|
|
3461
3483
|
actions,
|
|
3462
3484
|
};
|
|
3463
3485
|
|
|
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 };
|
|
3486
|
+
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;
|
|
@@ -142,6 +146,11 @@ export interface ISignUpCompletePayload {
|
|
|
142
146
|
name?: string;
|
|
143
147
|
companyName?: string;
|
|
144
148
|
email: string;
|
|
149
|
+
id?: string;
|
|
150
|
+
createdAt?: Date;
|
|
151
|
+
tenantId?: string;
|
|
145
152
|
url?: URL;
|
|
153
|
+
authenticationType: AuthenticationTypes;
|
|
154
|
+
socialProvider?: SocialLoginProviders;
|
|
146
155
|
}
|
|
147
156
|
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';
|