@frontegg/redux-store 5.39.2 → 5.42.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/ActivateState/index.d.ts +4 -4
- package/auth/ActivateState/interfaces.d.ts +5 -1
- package/auth/LoginState/index.d.ts +4 -4
- package/auth/LoginState/interfaces.d.ts +5 -1
- package/auth/MfaState/index.d.ts +2 -8
- package/auth/ResetPhoneNumberState/index.d.ts +0 -8
- package/auth/SignUp/index.d.ts +3 -4
- package/auth/SignUp/interfaces.d.ts +6 -0
- package/auth/SignUp/saga.d.ts +6 -3
- package/auth/SocialLogins/index.d.ts +4 -4
- package/auth/SocialLogins/interfaces.d.ts +6 -1
- package/auth/SocialLogins/saga.d.ts +1 -1
- package/auth/index.d.ts +4 -4
- package/auth/index.js +65 -14
- package/auth/interfaces.d.ts +35 -7
- package/auth/reducer.d.ts +4 -4
- package/index.js +1 -1
- package/node/auth/index.js +151 -3489
- package/node/index-09390a8a.js +3629 -0
- package/node/{saga-633c17d2.js → index-2ab7009b.js} +12 -2
- package/node/index.js +58 -48
- package/node/subscriptions/index.js +17 -13
- package/node/toolkit/index.js +65 -144
- package/node/vendor/index.js +8 -15
- package/package.json +2 -2
- package/subscriptions/index.js +17 -13
|
@@ -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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ActivateAccountState, ActivateAccountStrategyState, IPreActivateAccount } from './interfaces';
|
|
1
|
+
import { IGetActivateAccountStrategy, IGetActivateAccountStrategyResponse, IResendActivationEmail } from '@frontegg/rest-api';
|
|
2
|
+
import { ActivateAccountState, ActivateAccountStrategyState, IActivateAccountPayload, IPreActivateAccount } from './interfaces';
|
|
3
3
|
import { WithCallback } from '../../interfaces';
|
|
4
4
|
declare const activateState: ActivateAccountState;
|
|
5
5
|
declare const reducers: {
|
|
@@ -108,7 +108,7 @@ declare const reducers: {
|
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
110
|
declare const actions: {
|
|
111
|
-
activateAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<
|
|
111
|
+
activateAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IActivateAccountPayload, boolean>], WithCallback<IActivateAccountPayload, boolean>, string, never, never>;
|
|
112
112
|
preActivateAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[IPreActivateAccount], IPreActivateAccount, string, never, never>;
|
|
113
113
|
getActivateAccountStrategy: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IGetActivateAccountStrategy, IGetActivateAccountStrategyResponse>], WithCallback<IGetActivateAccountStrategy, IGetActivateAccountStrategyResponse>, string, never, never>;
|
|
114
114
|
resendActivationEmail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[IResendActivationEmail], IResendActivationEmail, string, never, never>;
|
|
@@ -121,7 +121,7 @@ declare type DispatchedActions = {
|
|
|
121
121
|
setActivateState: (state: Partial<ActivateAccountState>) => void;
|
|
122
122
|
resetActivateState: () => void;
|
|
123
123
|
setActivateStrategyState: (state: Partial<ActivateAccountStrategyState>) => void;
|
|
124
|
-
activateAccount: (payload: WithCallback<
|
|
124
|
+
activateAccount: (payload: WithCallback<IActivateAccountPayload>) => void;
|
|
125
125
|
preActivateAccount: (payload: IPreActivateAccount) => void;
|
|
126
126
|
resendActivationEmail: (payload: IResendActivationEmail) => void;
|
|
127
127
|
getActivateAccountStrategy: (payload: WithCallback<IGetActivateAccountStrategy, IGetActivateAccountStrategyResponse>) => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { IGetActivateAccountStrategyResponse } from '@frontegg/rest-api';
|
|
1
|
+
import { IActivateAccount, IGetActivateAccountStrategyResponse } from '@frontegg/rest-api';
|
|
2
2
|
import { WithStatus } from '../../interfaces';
|
|
3
|
+
import { CustomEventsOptions } from '../interfaces';
|
|
3
4
|
export declare enum ActivateAccountStep {
|
|
4
5
|
'activating' = "activating",
|
|
5
6
|
'success' = "success",
|
|
@@ -17,6 +18,9 @@ export declare type IPreActivateAccount = {
|
|
|
17
18
|
userId: string;
|
|
18
19
|
token: string;
|
|
19
20
|
};
|
|
21
|
+
export interface IActivateAccountPayload extends IActivateAccount {
|
|
22
|
+
events?: CustomEventsOptions;
|
|
23
|
+
}
|
|
20
24
|
export declare type ActivateAccountStrategyState = WithStatus & {
|
|
21
25
|
strategy?: IGetActivateAccountStrategyResponse;
|
|
22
26
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ILogin, ILoginWithMfa,
|
|
2
|
-
import { HostedLoginCallback, LoginState } from './interfaces';
|
|
1
|
+
import { ILogin, ILoginWithMfa, IPasswordlessPreLogin, IPostLogin, IPreLogin, IRecoverMFAToken } from '@frontegg/rest-api';
|
|
2
|
+
import { HostedLoginCallback, IPasswordlessPostLoginPayload, LoginState } from './interfaces';
|
|
3
3
|
import { WithCallback } from '../../interfaces';
|
|
4
4
|
import { IVerifyInviteToken } from '@frontegg/rest-api';
|
|
5
5
|
declare const loginState: LoginState;
|
|
@@ -95,7 +95,7 @@ declare const actions: {
|
|
|
95
95
|
mfaToken: string;
|
|
96
96
|
}, string, never, never>;
|
|
97
97
|
passwordlessPreLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IPasswordlessPreLogin, void>], WithCallback<IPasswordlessPreLogin, void>, string, never, never>;
|
|
98
|
-
passwordlessPostLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<
|
|
98
|
+
passwordlessPostLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IPasswordlessPostLoginPayload, boolean>], WithCallback<IPasswordlessPostLoginPayload, boolean>, string, never, never>;
|
|
99
99
|
verifyInviteToken: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[IVerifyInviteToken], IVerifyInviteToken, string, never, never>;
|
|
100
100
|
};
|
|
101
101
|
/**
|
|
@@ -123,7 +123,7 @@ declare type DispatchedActions = {
|
|
|
123
123
|
mfaToken: string;
|
|
124
124
|
}) => void;
|
|
125
125
|
passwordlessPreLogin: (payload: IPasswordlessPreLogin) => void;
|
|
126
|
-
passwordlessPostLogin: (payload: WithCallback<
|
|
126
|
+
passwordlessPostLogin: (payload: WithCallback<IPasswordlessPostLoginPayload>) => void;
|
|
127
127
|
verifyInviteToken: (payload: IVerifyInviteToken) => void;
|
|
128
128
|
};
|
|
129
129
|
export declare type LoginActions = DispatchedActions;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AuthStrategyEnum, ITenantsResponse } from '@frontegg/rest-api';
|
|
1
|
+
import { AuthStrategyEnum, IPasswordlessPostLogin, ITenantsResponse } from '@frontegg/rest-api';
|
|
2
|
+
import { CustomEventsOptions } from '../interfaces';
|
|
2
3
|
export { AuthStrategyEnum };
|
|
3
4
|
export declare enum LoginStep {
|
|
4
5
|
'preLogin' = "preLogin",
|
|
@@ -35,3 +36,6 @@ export interface HostedLoginCallback {
|
|
|
35
36
|
state?: string;
|
|
36
37
|
nonce?: string;
|
|
37
38
|
}
|
|
39
|
+
export interface IPasswordlessPostLoginPayload extends IPasswordlessPostLogin {
|
|
40
|
+
events?: CustomEventsOptions;
|
|
41
|
+
}
|
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/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SignUpState } from './interfaces';
|
|
1
|
+
import { ISignUpUserPayload, SignUpState } from './interfaces';
|
|
3
2
|
declare const signUpState: SignUpState;
|
|
4
3
|
declare const reducers: {
|
|
5
4
|
setSignUpState: {
|
|
@@ -70,7 +69,7 @@ declare const reducers: {
|
|
|
70
69
|
};
|
|
71
70
|
};
|
|
72
71
|
declare const actions: {
|
|
73
|
-
signUpUser: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[
|
|
72
|
+
signUpUser: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[ISignUpUserPayload], ISignUpUserPayload, string, never, never>;
|
|
74
73
|
resetSignUpStateSoft: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
75
74
|
};
|
|
76
75
|
/**
|
|
@@ -80,7 +79,7 @@ declare const actions: {
|
|
|
80
79
|
declare type DispatchedActions = {
|
|
81
80
|
setSignUpState: (state: Partial<SignUpState>) => void;
|
|
82
81
|
resetSignUpState: () => void;
|
|
83
|
-
signUpUser: (payload:
|
|
82
|
+
signUpUser: (payload: ISignUpUserPayload) => void;
|
|
84
83
|
resetSignUpStateSoft: () => void;
|
|
85
84
|
};
|
|
86
85
|
export declare type SignUpActions = DispatchedActions;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ISignUpUser } from '@frontegg/rest-api';
|
|
2
|
+
import { CustomEventsOptions } from '../interfaces';
|
|
1
3
|
export interface SignUpState {
|
|
2
4
|
loading: boolean;
|
|
3
5
|
allowSignUps: boolean;
|
|
@@ -11,3 +13,7 @@ export declare enum SignUpStage {
|
|
|
11
13
|
SignUp = "SignUp",
|
|
12
14
|
SignUpSuccess = "SignUpSuccess"
|
|
13
15
|
}
|
|
16
|
+
export interface ISignUpUserPayload extends ISignUpUser {
|
|
17
|
+
events?: CustomEventsOptions;
|
|
18
|
+
url?: URL;
|
|
19
|
+
}
|
package/auth/SignUp/saga.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
-
import {
|
|
2
|
+
import { IVendorConfig } from '@frontegg/rest-api';
|
|
3
|
+
import { ISignUpUserPayload } from './interfaces';
|
|
3
4
|
export declare function loadAllowSignUps(): Generator<import("redux-saga/effects").PutEffect<{
|
|
4
5
|
payload: Partial<import("./interfaces").SignUpState>;
|
|
5
6
|
type: string;
|
|
@@ -9,7 +10,7 @@ export declare function loadAllowSignUps(): Generator<import("redux-saga/effects
|
|
|
9
10
|
}>;
|
|
10
11
|
type: string;
|
|
11
12
|
}>, void, IVendorConfig>;
|
|
12
|
-
export declare function signUpUser({ payload }: PayloadAction<
|
|
13
|
+
export declare function signUpUser({ payload: { events, url, ...payload } }: PayloadAction<ISignUpUserPayload>): Generator<import("redux-saga/effects").PutEffect<{
|
|
13
14
|
payload: Partial<import("./interfaces").SignUpState>;
|
|
14
15
|
type: string;
|
|
15
16
|
}> | import("redux-saga/effects").SelectEffect | import("redux-saga/effects").CallEffect<import("@frontegg/rest-api").ISignUpResponse> | import("redux-saga/effects").PutEffect<{
|
|
@@ -19,7 +20,7 @@ export declare function signUpUser({ payload }: PayloadAction<ISignUpUser>): Gen
|
|
|
19
20
|
payload: Partial<import("../LoginState/interfaces").LoginState>;
|
|
20
21
|
type: string;
|
|
21
22
|
}> | import("redux-saga/effects").PutEffect<{
|
|
22
|
-
payload: Partial<import("
|
|
23
|
+
payload: Partial<import("../interfaces").AuthState>;
|
|
23
24
|
type: string;
|
|
24
25
|
}> | import("redux-saga/effects").PutEffect<{
|
|
25
26
|
payload: {
|
|
@@ -32,6 +33,8 @@ export declare function signUpUser({ payload }: PayloadAction<ISignUpUser>): Gen
|
|
|
32
33
|
} & {
|
|
33
34
|
shouldActivate: any;
|
|
34
35
|
user: any;
|
|
36
|
+
tenantId: any;
|
|
37
|
+
userId: any;
|
|
35
38
|
}>;
|
|
36
39
|
export declare function resetSignUpStateSoft(): Generator<import("redux-saga/effects").PutEffect<{
|
|
37
40
|
payload: Partial<import("./interfaces").SignUpState>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SocialLoginState } from './interfaces';
|
|
1
|
+
import { ISetSocialLoginError } from '@frontegg/rest-api';
|
|
2
|
+
import { ILoginViaSocialLoginPayload, SocialLoginState } from './interfaces';
|
|
3
3
|
declare const socialLoginState: SocialLoginState;
|
|
4
4
|
declare const reducers: {
|
|
5
5
|
setSocialLoginsState: {
|
|
@@ -72,7 +72,7 @@ declare const reducers: {
|
|
|
72
72
|
declare const actions: {
|
|
73
73
|
loadSocialLoginsConfiguration: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
74
74
|
loadSocialLoginsConfigurationV2: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
75
|
-
loginViaSocialLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[
|
|
75
|
+
loginViaSocialLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[ILoginViaSocialLoginPayload], ILoginViaSocialLoginPayload, string, never, never>;
|
|
76
76
|
setSocialLoginError: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[ISetSocialLoginError], ISetSocialLoginError, string, never, never>;
|
|
77
77
|
};
|
|
78
78
|
/**
|
|
@@ -84,7 +84,7 @@ declare type DispatchedActions = {
|
|
|
84
84
|
resetSocialLoginsState: () => void;
|
|
85
85
|
loadSocialLoginsConfiguration: () => void;
|
|
86
86
|
loadSocialLoginsConfigurationV2: () => void;
|
|
87
|
-
loginViaSocialLogin: (payload:
|
|
87
|
+
loginViaSocialLogin: (payload: ILoginViaSocialLoginPayload) => void;
|
|
88
88
|
setSocialLoginError: (payload: ISetSocialLoginError) => void;
|
|
89
89
|
};
|
|
90
90
|
export declare type SocialLoginActions = DispatchedActions;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ISocialLoginProviderConfiguration, ISocialLoginProviderConfigurationV2 } from '@frontegg/rest-api';
|
|
1
|
+
import { ILoginViaSocialLogin, ISocialLoginProviderConfiguration, ISocialLoginProviderConfigurationV2 } from '@frontegg/rest-api';
|
|
2
|
+
import { CustomEventsOptions } from '../interfaces';
|
|
2
3
|
export interface SocialLoginState {
|
|
3
4
|
firstLoad: boolean;
|
|
4
5
|
loading: boolean;
|
|
@@ -6,3 +7,7 @@ export interface SocialLoginState {
|
|
|
6
7
|
socialLoginsConfigV2?: ISocialLoginProviderConfigurationV2[];
|
|
7
8
|
error?: string;
|
|
8
9
|
}
|
|
10
|
+
export interface ILoginViaSocialLoginPayload extends ILoginViaSocialLogin {
|
|
11
|
+
events?: CustomEventsOptions;
|
|
12
|
+
url?: URL;
|
|
13
|
+
}
|
|
@@ -6,5 +6,5 @@ export declare function loadSocialLoginsConfigurations(): Generator<import("redu
|
|
|
6
6
|
export declare function loadSocialLoginsConfigurationsV2(): Generator<import("redux-saga/effects").PutEffect<{
|
|
7
7
|
payload: Partial<import("./interfaces").SocialLoginState>;
|
|
8
8
|
type: string;
|
|
9
|
-
}> | import("redux-saga/effects").CallEffect<ISocialLoginProviderConfigurationV2[]>, void, ISocialLoginProviderConfigurationV2[]>;
|
|
9
|
+
}> | import("redux-saga/effects").SelectEffect | import("redux-saga/effects").CallEffect<ISocialLoginProviderConfigurationV2[]>, void, ISocialLoginProviderConfigurationV2[]>;
|
|
10
10
|
export declare function socialLoginsSaga(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
|
package/auth/index.d.ts
CHANGED
|
@@ -218,7 +218,7 @@ declare const _default: {
|
|
|
218
218
|
loadProfile: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
219
219
|
saveProfile: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("../interfaces").WithCallback<import("@frontegg/rest-api").IUserProfile, import("@frontegg/rest-api").IUserProfile>>], Partial<import("../interfaces").WithCallback<import("@frontegg/rest-api").IUserProfile, import("@frontegg/rest-api").IUserProfile>>, string, never, never>;
|
|
220
220
|
changePassword: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IChangePassword, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").IChangePassword, boolean>, string, never, never>;
|
|
221
|
-
signUpUser: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("
|
|
221
|
+
signUpUser: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("./SignUp/interfaces").ISignUpUserPayload], import("./SignUp/interfaces").ISignUpUserPayload, string, never, never>;
|
|
222
222
|
resetSignUpStateSoft: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
223
223
|
resetPhoneNumber: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IResetPhoneNumber, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").IResetPhoneNumber, boolean>, string, never, never>;
|
|
224
224
|
verifyResetPhoneNumber: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IVerifyResetPhoneNumber, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").IVerifyResetPhoneNumber, boolean>, string, never, never>;
|
|
@@ -233,13 +233,13 @@ declare const _default: {
|
|
|
233
233
|
resetPassword: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IResetPassword, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").IResetPassword, boolean>, string, never, never>;
|
|
234
234
|
loadPasswordConfig: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(import("@frontegg/rest-api").IGetUserPasswordConfig | undefined)?], import("@frontegg/rest-api").IGetUserPasswordConfig | undefined, string, never, never>;
|
|
235
235
|
acceptInvitation: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IAcceptInvitation], import("@frontegg/rest-api").IAcceptInvitation, string, never, never>;
|
|
236
|
-
activateAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("
|
|
236
|
+
activateAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("./ActivateState/interfaces").IActivateAccountPayload, boolean>], import("../interfaces").WithCallback<import("./ActivateState/interfaces").IActivateAccountPayload, boolean>, string, never, never>;
|
|
237
237
|
preActivateAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("./ActivateState/interfaces").IPreActivateAccount], import("./ActivateState/interfaces").IPreActivateAccount, string, never, never>;
|
|
238
238
|
getActivateAccountStrategy: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IGetActivateAccountStrategy, import("@frontegg/rest-api").IGetActivateAccountStrategyResponse>], import("../interfaces").WithCallback<import("@frontegg/rest-api").IGetActivateAccountStrategy, import("@frontegg/rest-api").IGetActivateAccountStrategyResponse>, string, never, never>;
|
|
239
239
|
resendActivationEmail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IResendActivationEmail], import("@frontegg/rest-api").IResendActivationEmail, string, never, never>;
|
|
240
240
|
loadSocialLoginsConfiguration: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
241
241
|
loadSocialLoginsConfigurationV2: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
242
|
-
loginViaSocialLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("
|
|
242
|
+
loginViaSocialLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("./SocialLogins/interfaces").ILoginViaSocialLoginPayload], import("./SocialLogins/interfaces").ILoginViaSocialLoginPayload, string, never, never>;
|
|
243
243
|
setSocialLoginError: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").ISetSocialLoginError], import("@frontegg/rest-api").ISetSocialLoginError, string, never, never>;
|
|
244
244
|
requestAuthorize: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(boolean | undefined)?], boolean, string, never, never>;
|
|
245
245
|
requestHostedLoginAuthorize: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
@@ -264,7 +264,7 @@ declare const _default: {
|
|
|
264
264
|
mfaToken: string;
|
|
265
265
|
}, string, never, never>;
|
|
266
266
|
passwordlessPreLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IPasswordlessPreLogin, void>], import("../interfaces").WithCallback<import("@frontegg/rest-api").IPasswordlessPreLogin, void>, string, never, never>;
|
|
267
|
-
passwordlessPostLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("
|
|
267
|
+
passwordlessPostLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("./LoginState/interfaces").IPasswordlessPostLoginPayload, boolean>], import("../interfaces").WithCallback<import("./LoginState/interfaces").IPasswordlessPostLoginPayload, boolean>, string, never, never>;
|
|
268
268
|
verifyInviteToken: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IVerifyInviteToken], import("@frontegg/rest-api").IVerifyInviteToken, string, never, never>;
|
|
269
269
|
setRolesState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./RolesState/interfaces").RolesState>], Partial<import("./RolesState/interfaces").RolesState>, string, never, never>;
|
|
270
270
|
resetRolesState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
package/auth/index.js
CHANGED
|
@@ -792,6 +792,18 @@ const tenantsDemo = [
|
|
|
792
792
|
},
|
|
793
793
|
];
|
|
794
794
|
|
|
795
|
+
var UserVeirifedOriginTypes;
|
|
796
|
+
(function (UserVeirifedOriginTypes) {
|
|
797
|
+
UserVeirifedOriginTypes["SOCIAL_LOGIN"] = "SOCIAL_LOGIN";
|
|
798
|
+
UserVeirifedOriginTypes["PASSWORDLESS"] = "PASSWORDLESS";
|
|
799
|
+
UserVeirifedOriginTypes["ACTIVATION_LINK"] = "ACTIVATION_LINK";
|
|
800
|
+
})(UserVeirifedOriginTypes || (UserVeirifedOriginTypes = {}));
|
|
801
|
+
var AuthenticationTypes;
|
|
802
|
+
(function (AuthenticationTypes) {
|
|
803
|
+
AuthenticationTypes["SOCIAL_LOGIN"] = "SOCIAL_LOGIN";
|
|
804
|
+
AuthenticationTypes["PASSWORD"] = "PASSWORD";
|
|
805
|
+
})(AuthenticationTypes || (AuthenticationTypes = {}));
|
|
806
|
+
|
|
795
807
|
function* loadAllowSignUps() {
|
|
796
808
|
yield put(actions.setSignUpState({ loading: true }));
|
|
797
809
|
try {
|
|
@@ -804,11 +816,26 @@ function* loadAllowSignUps() {
|
|
|
804
816
|
yield put(actions.setSignUpState({ loading: false, error: e.message, firstLoad: false }));
|
|
805
817
|
}
|
|
806
818
|
}
|
|
807
|
-
function* signUpUser(
|
|
819
|
+
function* signUpUser(_a) {
|
|
820
|
+
var _b;
|
|
821
|
+
var _c = _a.payload, { events, url } = _c, payload = __rest(_c, ["events", "url"]);
|
|
808
822
|
yield put(actions.setSignUpState({ loading: true }));
|
|
809
823
|
try {
|
|
810
824
|
const { routes, onRedirectTo } = yield select((state) => state.auth);
|
|
811
|
-
const { shouldActivate, user } = yield call(api.auth.signUpUser, payload);
|
|
825
|
+
const { shouldActivate, user, tenantId, userId } = yield call(api.auth.signUpUser, payload);
|
|
826
|
+
if (!payload.invitationToken) {
|
|
827
|
+
const { email, name, companyName } = payload;
|
|
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
|
+
});
|
|
838
|
+
}
|
|
812
839
|
ContextHolder.setAccessToken(user === null || user === void 0 ? void 0 : user.accessToken);
|
|
813
840
|
ContextHolder.setUser(user);
|
|
814
841
|
if (!shouldActivate && (user === null || user === void 0 ? void 0 : user.mfaRequired) && (user === null || user === void 0 ? void 0 : user.mfaToken)) {
|
|
@@ -980,7 +1007,11 @@ function* requestAuthorize({ payload: firstTime }) {
|
|
|
980
1007
|
yield put(actions.setState({ isLoading: false }));
|
|
981
1008
|
}
|
|
982
1009
|
function* requestHostedLoginAuthorize() {
|
|
983
|
-
const { routes,
|
|
1010
|
+
const { routes, context, onRedirectTo } = yield select((state) => ({
|
|
1011
|
+
routes: state.auth.routes,
|
|
1012
|
+
onRedirectTo: state.auth.onRedirectTo,
|
|
1013
|
+
context: state.root.context,
|
|
1014
|
+
}));
|
|
984
1015
|
// Generate the relevant params for the redirect
|
|
985
1016
|
const nonce = createRandomString();
|
|
986
1017
|
const code_verifier = createRandomString();
|
|
@@ -988,11 +1019,12 @@ function* requestHostedLoginAuthorize() {
|
|
|
988
1019
|
// We are saving the verifier in session storage to be able to validate the response
|
|
989
1020
|
localStorage.setItem(HOSTED_LOGIN_VERIFIER_KEY, code_verifier);
|
|
990
1021
|
const redirectUrl = `${window.location.origin}${routes.hostedLoginRedirectUrl}`;
|
|
1022
|
+
const baseUrl = fetch.getBaseUrl(context, '/oauth/authorize');
|
|
991
1023
|
// Hard coded for now
|
|
992
1024
|
const oauthUrl = `${baseUrl}/oauth/authorize`;
|
|
993
1025
|
const params = {
|
|
994
1026
|
response_type: 'code',
|
|
995
|
-
client_id: clientId || 'INVALID-CLIENT-ID',
|
|
1027
|
+
client_id: context.clientId || 'INVALID-CLIENT-ID',
|
|
996
1028
|
scope: 'openid email profile',
|
|
997
1029
|
redirect_uri: redirectUrl,
|
|
998
1030
|
code_challenge: code_challenge,
|
|
@@ -1041,8 +1073,8 @@ function* passwordlessPreLogin(_a) {
|
|
|
1041
1073
|
}
|
|
1042
1074
|
}
|
|
1043
1075
|
function* passwordlessPostLogin(_a) {
|
|
1044
|
-
var _b;
|
|
1045
|
-
var
|
|
1076
|
+
var _b, _c;
|
|
1077
|
+
var _d = _a.payload, { callback, events } = _d, payload = __rest(_d, ["callback", "events"]);
|
|
1046
1078
|
try {
|
|
1047
1079
|
yield put(actions.setLoginState({ loading: true }));
|
|
1048
1080
|
const data = yield call(api.auth.passwordlessPostLogin, payload);
|
|
@@ -1055,6 +1087,9 @@ function* passwordlessPostLogin(_a) {
|
|
|
1055
1087
|
}
|
|
1056
1088
|
else {
|
|
1057
1089
|
const user = yield call(api.auth.generateLoginResponse, data);
|
|
1090
|
+
if (data.emailVerified) {
|
|
1091
|
+
(_b = events === null || events === void 0 ? void 0 : events.userVerified) === null || _b === void 0 ? void 0 : _b.call(events, { email: user.email, origin: UserVeirifedOriginTypes.PASSWORDLESS });
|
|
1092
|
+
}
|
|
1058
1093
|
yield put(actions.loadTenants());
|
|
1059
1094
|
yield put(actions.setState({ user, isAuthenticated: true }));
|
|
1060
1095
|
yield afterAuthNavigation();
|
|
@@ -1062,7 +1097,7 @@ function* passwordlessPostLogin(_a) {
|
|
|
1062
1097
|
callback === null || callback === void 0 ? void 0 : callback(true);
|
|
1063
1098
|
}
|
|
1064
1099
|
catch (e) {
|
|
1065
|
-
yield put(actions.setLoginState({ error: (
|
|
1100
|
+
yield put(actions.setLoginState({ error: (_c = e.message) !== null && _c !== void 0 ? _c : 'Failed to authenticate' }));
|
|
1066
1101
|
}
|
|
1067
1102
|
finally {
|
|
1068
1103
|
yield put(actions.setLoginState({ loading: false }));
|
|
@@ -2167,7 +2202,8 @@ function* preActivateAccount({ payload: { userId, token } }) {
|
|
|
2167
2202
|
}
|
|
2168
2203
|
}
|
|
2169
2204
|
function* activateAccount(_a) {
|
|
2170
|
-
var _b
|
|
2205
|
+
var _b;
|
|
2206
|
+
var _c = _a.payload, { callback, events } = _c, payload = __rest(_c, ["callback", "events"]);
|
|
2171
2207
|
yield put(actions.setActivateState({ loading: true }));
|
|
2172
2208
|
try {
|
|
2173
2209
|
const onRedirectTo = ContextHolder.onRedirectTo;
|
|
@@ -2187,6 +2223,7 @@ function* activateAccount(_a) {
|
|
|
2187
2223
|
else {
|
|
2188
2224
|
yield put(actions.setActivateState({ step: ActivateAccountStep.success }));
|
|
2189
2225
|
const { user, tenants } = yield call(api.auth.generateLoginResponseV2, data);
|
|
2226
|
+
(_b = events === null || events === void 0 ? void 0 : events.userVerified) === null || _b === void 0 ? void 0 : _b.call(events, { email: user.email, origin: UserVeirifedOriginTypes.ACTIVATION_LINK });
|
|
2190
2227
|
yield put(actions.setTenantsState({ tenants, loading: false }));
|
|
2191
2228
|
yield put(actions.setState({ user, isAuthenticated: true }));
|
|
2192
2229
|
yield delay$1(1000);
|
|
@@ -2662,11 +2699,12 @@ function* loadSocialLoginsConfigurations() {
|
|
|
2662
2699
|
}
|
|
2663
2700
|
function* loadSocialLoginsConfigurationsV2() {
|
|
2664
2701
|
try {
|
|
2702
|
+
const context = yield select((state) => state.root.context);
|
|
2665
2703
|
yield put(actions.setSocialLoginsState({ loading: true }));
|
|
2666
2704
|
const socialLoginsConfigV2 = yield call(api.auth.getSocialLoginProvidersV2);
|
|
2667
|
-
const baseUrl = fetch.getBaseUrl(ContextHolder.getContext());
|
|
2668
2705
|
const socialLoginsConfigWithFullUrl = socialLoginsConfigV2.map((_a) => {
|
|
2669
2706
|
var { authorizationUrl } = _a, config = __rest(_a, ["authorizationUrl"]);
|
|
2707
|
+
const baseUrl = fetch.getBaseUrl(context, authorizationUrl !== null && authorizationUrl !== void 0 ? authorizationUrl : '');
|
|
2670
2708
|
return (Object.assign(Object.assign({}, config), { authorizationUrl: authorizationUrl ? `${baseUrl}${authorizationUrl}` : null }));
|
|
2671
2709
|
});
|
|
2672
2710
|
yield put(actions.setSocialLoginsState({ socialLoginsConfigV2: socialLoginsConfigWithFullUrl, loading: false, firstLoad: false }));
|
|
@@ -2675,17 +2713,30 @@ function* loadSocialLoginsConfigurationsV2() {
|
|
|
2675
2713
|
yield put(actions.setSocialLoginsState({ error: e.message, loading: false, firstLoad: false }));
|
|
2676
2714
|
}
|
|
2677
2715
|
}
|
|
2678
|
-
function* loginViaSocialLogin(
|
|
2679
|
-
var
|
|
2716
|
+
function* loginViaSocialLogin(_a) {
|
|
2717
|
+
var _b, _c, _d;
|
|
2718
|
+
var _e = _a.payload, { events, url } = _e, payload = __rest(_e, ["events", "url"]);
|
|
2680
2719
|
try {
|
|
2681
2720
|
yield put(actions.setSocialLoginsState({ loading: true }));
|
|
2682
|
-
const { email, isNewUser } = yield call(api.auth.loginViaSocialLogin, payload);
|
|
2721
|
+
const { email, isNewUser, userId, tenantId } = yield call(api.auth.loginViaSocialLogin, payload);
|
|
2722
|
+
if (isNewUser) {
|
|
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
|
+
});
|
|
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 });
|
|
2733
|
+
}
|
|
2683
2734
|
yield put(actions.setLoginState({ email, isNewUser }));
|
|
2684
2735
|
yield refreshToken();
|
|
2685
2736
|
yield put(actions.setSocialLoginsState({ loading: false }));
|
|
2686
2737
|
}
|
|
2687
2738
|
catch (e) {
|
|
2688
|
-
yield put(actions.setSocialLoginsState({ loading: false, error: (
|
|
2739
|
+
yield put(actions.setSocialLoginsState({ loading: false, error: (_d = e.message) !== null && _d !== void 0 ? _d : 'Failed to authenticate', firstLoad: false }));
|
|
2689
2740
|
}
|
|
2690
2741
|
}
|
|
2691
2742
|
function* setSocialLoginError({ payload }) {
|
|
@@ -3432,4 +3483,4 @@ var authStore = {
|
|
|
3432
3483
|
actions,
|
|
3433
3484
|
};
|
|
3434
3485
|
|
|
3435
|
-
export { AcceptInvitationStep, ActivateAccountStep, ApiStateKeys, ForgotPasswordStep, LoginStep, MFAStep, ResetPhoneNumberStep, SSOStateKeys, SamlVendors, SignUpStage, TeamStateKeys, 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';
|
|
@@ -101,16 +101,16 @@ export declare type AuthPageRoutes = {
|
|
|
101
101
|
*/
|
|
102
102
|
signUpUrl: string;
|
|
103
103
|
/**
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
* oidc success redirect url
|
|
105
|
+
*/
|
|
106
106
|
oidcRedirectUrl?: string;
|
|
107
107
|
/**
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
* magic link redirect url
|
|
109
|
+
*/
|
|
110
110
|
magicLinkCallbackUrl?: string;
|
|
111
111
|
/**
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
* after sign up success url, the order of urls read: (accountSignUpSuccessUrl or userSignUpSuccessUrl) / signupSuccessUrl / authenticationUrl
|
|
113
|
+
*/
|
|
114
114
|
signUpSuccessUrl?: string;
|
|
115
115
|
/**
|
|
116
116
|
* after account sign up success url, the order of urls read: accountSignUpSuccessUrl / signupSuccessUrl / authenticationUrl
|
|
@@ -125,4 +125,32 @@ export declare type AuthPageRoutes = {
|
|
|
125
125
|
*/
|
|
126
126
|
hostedLoginRedirectUrl?: string;
|
|
127
127
|
};
|
|
128
|
+
export declare enum UserVeirifedOriginTypes {
|
|
129
|
+
SOCIAL_LOGIN = "SOCIAL_LOGIN",
|
|
130
|
+
PASSWORDLESS = "PASSWORDLESS",
|
|
131
|
+
ACTIVATION_LINK = "ACTIVATION_LINK"
|
|
132
|
+
}
|
|
133
|
+
export declare enum AuthenticationTypes {
|
|
134
|
+
SOCIAL_LOGIN = "SOCIAL_LOGIN",
|
|
135
|
+
PASSWORD = "PASSWORD"
|
|
136
|
+
}
|
|
137
|
+
export interface CustomEventsOptions {
|
|
138
|
+
userVerified?: (payload: IUserVerifiedPayload) => void;
|
|
139
|
+
signUpComplete?: (payload: ISignUpCompletePayload) => void;
|
|
140
|
+
}
|
|
141
|
+
export interface IUserVerifiedPayload {
|
|
142
|
+
email: string;
|
|
143
|
+
origin: UserVeirifedOriginTypes;
|
|
144
|
+
}
|
|
145
|
+
export interface ISignUpCompletePayload {
|
|
146
|
+
name?: string;
|
|
147
|
+
companyName?: string;
|
|
148
|
+
email: string;
|
|
149
|
+
id?: string;
|
|
150
|
+
createdAt?: Date;
|
|
151
|
+
tenantId?: string;
|
|
152
|
+
url?: URL;
|
|
153
|
+
authenticationType: AuthenticationTypes;
|
|
154
|
+
socialProvider?: SocialLoginProviders;
|
|
155
|
+
}
|
|
128
156
|
export {};
|
package/auth/reducer.d.ts
CHANGED
|
@@ -191,7 +191,7 @@ declare const actions: {
|
|
|
191
191
|
loadProfile: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
192
192
|
saveProfile: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("../interfaces").WithCallback<import("@frontegg/rest-api").IUserProfile, import("@frontegg/rest-api").IUserProfile>>], Partial<import("../interfaces").WithCallback<import("@frontegg/rest-api").IUserProfile, import("@frontegg/rest-api").IUserProfile>>, string, never, never>;
|
|
193
193
|
changePassword: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IChangePassword, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").IChangePassword, boolean>, string, never, never>;
|
|
194
|
-
signUpUser: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("
|
|
194
|
+
signUpUser: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import(".").ISignUpUserPayload], import(".").ISignUpUserPayload, string, never, never>;
|
|
195
195
|
resetSignUpStateSoft: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
196
196
|
resetPhoneNumber: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IResetPhoneNumber, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").IResetPhoneNumber, boolean>, string, never, never>;
|
|
197
197
|
verifyResetPhoneNumber: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IVerifyResetPhoneNumber, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").IVerifyResetPhoneNumber, boolean>, string, never, never>;
|
|
@@ -206,13 +206,13 @@ declare const actions: {
|
|
|
206
206
|
resetPassword: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IResetPassword, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").IResetPassword, boolean>, string, never, never>;
|
|
207
207
|
loadPasswordConfig: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(import("@frontegg/rest-api").IGetUserPasswordConfig | undefined)?], import("@frontegg/rest-api").IGetUserPasswordConfig | undefined, string, never, never>;
|
|
208
208
|
acceptInvitation: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IAcceptInvitation], import("@frontegg/rest-api").IAcceptInvitation, string, never, never>;
|
|
209
|
-
activateAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("
|
|
209
|
+
activateAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import(".").IActivateAccountPayload, boolean>], import("../interfaces").WithCallback<import(".").IActivateAccountPayload, boolean>, string, never, never>;
|
|
210
210
|
preActivateAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import(".").IPreActivateAccount], import(".").IPreActivateAccount, string, never, never>;
|
|
211
211
|
getActivateAccountStrategy: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IGetActivateAccountStrategy, import("@frontegg/rest-api").IGetActivateAccountStrategyResponse>], import("../interfaces").WithCallback<import("@frontegg/rest-api").IGetActivateAccountStrategy, import("@frontegg/rest-api").IGetActivateAccountStrategyResponse>, string, never, never>;
|
|
212
212
|
resendActivationEmail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IResendActivationEmail], import("@frontegg/rest-api").IResendActivationEmail, string, never, never>;
|
|
213
213
|
loadSocialLoginsConfiguration: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
214
214
|
loadSocialLoginsConfigurationV2: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
215
|
-
loginViaSocialLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("
|
|
215
|
+
loginViaSocialLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import(".").ILoginViaSocialLoginPayload], import(".").ILoginViaSocialLoginPayload, string, never, never>;
|
|
216
216
|
setSocialLoginError: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").ISetSocialLoginError], import("@frontegg/rest-api").ISetSocialLoginError, string, never, never>;
|
|
217
217
|
requestAuthorize: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(boolean | undefined)?], boolean, string, never, never>;
|
|
218
218
|
requestHostedLoginAuthorize: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
@@ -237,7 +237,7 @@ declare const actions: {
|
|
|
237
237
|
mfaToken: string;
|
|
238
238
|
}, string, never, never>;
|
|
239
239
|
passwordlessPreLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IPasswordlessPreLogin, void>], import("../interfaces").WithCallback<import("@frontegg/rest-api").IPasswordlessPreLogin, void>, string, never, never>;
|
|
240
|
-
passwordlessPostLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("
|
|
240
|
+
passwordlessPostLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import(".").IPasswordlessPostLoginPayload, boolean>], import("../interfaces").WithCallback<import(".").IPasswordlessPostLoginPayload, boolean>, string, never, never>;
|
|
241
241
|
verifyInviteToken: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IVerifyInviteToken], import("@frontegg/rest-api").IVerifyInviteToken, string, never, never>;
|
|
242
242
|
setRolesState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import(".").RolesState>], Partial<import(".").RolesState>, string, never, never>;
|
|
243
243
|
resetRolesState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AcceptInvitationStep, ActivateAccountStep, ApiStateKeys, ForgotPasswordStep, LoginStep, MFAStep, ResetPhoneNumberStep, SSOStateKeys, SamlVendors, SignUpStage, TeamStateKeys, 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';
|