@frontegg/redux-store 5.12.0 → 5.15.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/ActivateState/index.d.ts +2 -2
- package/auth/ApiTokensState/interfaces.d.ts +2 -1
- package/auth/LoginState/index.d.ts +4 -4
- package/auth/index.d.ts +3 -3
- package/auth/index.js +12 -6
- package/auth/reducer.d.ts +3 -3
- package/connectivity/index.js +2 -1
- package/node/auth/index.js +12 -6
- package/node/connectivity/index.js +2 -1
- package/node/subscriptions/index.js +1 -1
- package/package.json +1 -1
- package/subscriptions/index.js +1 -1
|
@@ -105,7 +105,7 @@ declare const reducers: {
|
|
|
105
105
|
};
|
|
106
106
|
};
|
|
107
107
|
declare const actions: {
|
|
108
|
-
activateAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[IActivateAccount], IActivateAccount, string, never, never>;
|
|
108
|
+
activateAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IActivateAccount, boolean>], WithCallback<IActivateAccount, boolean>, string, never, never>;
|
|
109
109
|
getActivateAccountStrategy: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IGetActivateAccountStrategy, IGetActivateAccountStrategyResponse>], WithCallback<IGetActivateAccountStrategy, IGetActivateAccountStrategyResponse>, string, never, never>;
|
|
110
110
|
resendActivationEmail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[IResendActivationEmail], IResendActivationEmail, string, never, never>;
|
|
111
111
|
};
|
|
@@ -117,7 +117,7 @@ declare type DispatchedActions = {
|
|
|
117
117
|
setActivateState: (state: Partial<ActivateAccountState>) => void;
|
|
118
118
|
resetActivateState: () => void;
|
|
119
119
|
setActivateStrategyState: (state: Partial<ActivateAccountStrategyState>) => void;
|
|
120
|
-
activateAccount: (payload: IActivateAccount) => void;
|
|
120
|
+
activateAccount: (payload: WithCallback<IActivateAccount>) => void;
|
|
121
121
|
resendActivationEmail: (payload: IResendActivationEmail) => void;
|
|
122
122
|
getActivateAccountStrategy: (payload: WithCallback<IGetActivateAccountStrategy, IGetActivateAccountStrategyResponse>) => void;
|
|
123
123
|
};
|
|
@@ -26,8 +26,9 @@ export declare type createdByUserIdColumn = 'show' | 'hide' | undefined;
|
|
|
26
26
|
export interface IApiTokensData {
|
|
27
27
|
clientId: string;
|
|
28
28
|
createdAt: string;
|
|
29
|
-
secret
|
|
29
|
+
secret?: string;
|
|
30
30
|
description: string;
|
|
31
|
+
metadata?: {};
|
|
31
32
|
}
|
|
32
33
|
export declare type IUserApiTokensData = IApiTokensData;
|
|
33
34
|
export interface ITenantApiTokensData extends IApiTokensData {
|
|
@@ -82,7 +82,7 @@ declare const actions: {
|
|
|
82
82
|
invitationToken?: string | undefined;
|
|
83
83
|
}, void>, string, never, never>;
|
|
84
84
|
postLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[IPostLogin], IPostLogin, string, never, never>;
|
|
85
|
-
login: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[ILogin], ILogin, string, never, never>;
|
|
85
|
+
login: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<ILogin, boolean>], WithCallback<ILogin, boolean>, string, never, never>;
|
|
86
86
|
loginWithMfa: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<ILoginWithMfa, boolean>], WithCallback<ILoginWithMfa, boolean>, string, never, never>;
|
|
87
87
|
recoverMfa: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[IRecoverMFAToken], IRecoverMFAToken, string, never, never>;
|
|
88
88
|
logout: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[((() => void) | undefined)?], (() => void) | undefined, string, never, never>;
|
|
@@ -93,7 +93,7 @@ declare const actions: {
|
|
|
93
93
|
mfaToken: string;
|
|
94
94
|
}, string, never, never>;
|
|
95
95
|
passwordlessPreLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IPasswordlessPreLogin, void>], WithCallback<IPasswordlessPreLogin, void>, string, never, never>;
|
|
96
|
-
passwordlessPostLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[IPasswordlessPostLogin], IPasswordlessPostLogin, string, never, never>;
|
|
96
|
+
passwordlessPostLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<IPasswordlessPostLogin, boolean>], WithCallback<IPasswordlessPostLogin, boolean>, string, never, never>;
|
|
97
97
|
verifyInviteToken: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[IVerifyInviteToken], IVerifyInviteToken, string, never, never>;
|
|
98
98
|
};
|
|
99
99
|
/**
|
|
@@ -112,7 +112,7 @@ declare type DispatchedActions = {
|
|
|
112
112
|
invitationToken?: string;
|
|
113
113
|
}, void>) => void;
|
|
114
114
|
postLogin: (payload: IPostLogin) => void;
|
|
115
|
-
login: (payload: ILogin) => void;
|
|
115
|
+
login: (payload: WithCallback<ILogin>) => void;
|
|
116
116
|
loginWithMfa: (payload: WithCallback<ILoginWithMfa>) => void;
|
|
117
117
|
recoverMfa: (payload: IRecoverMFAToken) => void;
|
|
118
118
|
logout: (payload?: () => void) => void;
|
|
@@ -121,7 +121,7 @@ declare type DispatchedActions = {
|
|
|
121
121
|
mfaToken: string;
|
|
122
122
|
}) => void;
|
|
123
123
|
passwordlessPreLogin: (payload: IPasswordlessPreLogin) => void;
|
|
124
|
-
passwordlessPostLogin: (payload: IPasswordlessPostLogin) => void;
|
|
124
|
+
passwordlessPostLogin: (payload: WithCallback<IPasswordlessPostLogin>) => void;
|
|
125
125
|
verifyInviteToken: (payload: IVerifyInviteToken) => void;
|
|
126
126
|
};
|
|
127
127
|
export declare type LoginActions = DispatchedActions;
|
package/auth/index.d.ts
CHANGED
|
@@ -222,7 +222,7 @@ declare const _default: {
|
|
|
222
222
|
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>;
|
|
223
223
|
loadPasswordConfig: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(import("@frontegg/rest-api").IGetUserPasswordConfig | undefined)?], import("@frontegg/rest-api").IGetUserPasswordConfig | undefined, string, never, never>;
|
|
224
224
|
acceptInvitation: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IAcceptInvitation], import("@frontegg/rest-api").IAcceptInvitation, string, never, never>;
|
|
225
|
-
activateAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IActivateAccount], import("@frontegg/rest-api").IActivateAccount, string, never, never>;
|
|
225
|
+
activateAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IActivateAccount, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").IActivateAccount, boolean>, string, never, never>;
|
|
226
226
|
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>;
|
|
227
227
|
resendActivationEmail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IResendActivationEmail], import("@frontegg/rest-api").IResendActivationEmail, string, never, never>;
|
|
228
228
|
loadSocialLoginsConfiguration: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
@@ -241,7 +241,7 @@ declare const _default: {
|
|
|
241
241
|
invitationToken?: string | undefined;
|
|
242
242
|
}, void>, string, never, never>;
|
|
243
243
|
postLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IPostLogin], import("@frontegg/rest-api").IPostLogin, string, never, never>;
|
|
244
|
-
login: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").ILogin], import("@frontegg/rest-api").ILogin, string, never, never>;
|
|
244
|
+
login: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").ILogin, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").ILogin, boolean>, string, never, never>;
|
|
245
245
|
loginWithMfa: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").ILoginWithMfa, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").ILoginWithMfa, boolean>, string, never, never>;
|
|
246
246
|
recoverMfa: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IRecoverMFAToken], import("@frontegg/rest-api").IRecoverMFAToken, string, never, never>;
|
|
247
247
|
logout: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[((() => void) | undefined)?], (() => void) | undefined, string, never, never>;
|
|
@@ -252,7 +252,7 @@ declare const _default: {
|
|
|
252
252
|
mfaToken: string;
|
|
253
253
|
}, string, never, never>;
|
|
254
254
|
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>;
|
|
255
|
-
passwordlessPostLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IPasswordlessPostLogin], import("@frontegg/rest-api").IPasswordlessPostLogin, string, never, never>;
|
|
255
|
+
passwordlessPostLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IPasswordlessPostLogin, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").IPasswordlessPostLogin, boolean>, string, never, never>;
|
|
256
256
|
verifyInviteToken: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IVerifyInviteToken], import("@frontegg/rest-api").IVerifyInviteToken, string, never, never>;
|
|
257
257
|
setRolesState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import("./RolesState/interfaces").RolesState>], Partial<import("./RolesState/interfaces").RolesState>, string, never, never>;
|
|
258
258
|
resetRolesState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
package/auth/index.js
CHANGED
|
@@ -498,6 +498,7 @@ const initialState = Object.assign({ routes: {
|
|
|
498
498
|
socialLoginCallbackUrl: '/account/social/success',
|
|
499
499
|
signUpUrl: '/account/sign-up',
|
|
500
500
|
oidcRedirectUrl: '/account/oidc/callback',
|
|
501
|
+
samlCallbackUrl: '/account/saml/callback',
|
|
501
502
|
magicLinkCallbackUrl: '/account/login/magic-link',
|
|
502
503
|
hostedLoginRedirectUrl: '/oauth/callback'
|
|
503
504
|
}, onRedirectTo: () => { } }, reinitializeState);
|
|
@@ -915,7 +916,7 @@ function* refreshToken() {
|
|
|
915
916
|
else {
|
|
916
917
|
yield put(actions.setTenantsState({ tenants, loading: false }));
|
|
917
918
|
yield put(actions.setState({ user, isAuthenticated: true }));
|
|
918
|
-
if ([routes.loginUrl, routes.socialLoginCallbackUrl, routes.signUpUrl, routes.oidcRedirectUrl].some(url => url && window.location.pathname.endsWith(url)) ||
|
|
919
|
+
if ([routes.loginUrl, routes.socialLoginCallbackUrl, routes.signUpUrl, routes.oidcRedirectUrl, routes.samlCallbackUrl].some(url => url && window.location.pathname.endsWith(url)) ||
|
|
919
920
|
(window.location.pathname.endsWith(routes.activateUrl) && user.verified)) {
|
|
920
921
|
if (loginState.isNewUser && routes.signUpSuccessUrl && routes.socialLoginCallbackUrl === window.location.pathname) {
|
|
921
922
|
onRedirectTo(routes.signUpSuccessUrl, { refresh: routes.signUpSuccessUrl.startsWith('http') });
|
|
@@ -1001,8 +1002,9 @@ function* passwordlessPreLogin(_a) {
|
|
|
1001
1002
|
callback === null || callback === void 0 ? void 0 : callback();
|
|
1002
1003
|
}
|
|
1003
1004
|
}
|
|
1004
|
-
function* passwordlessPostLogin(
|
|
1005
|
-
var
|
|
1005
|
+
function* passwordlessPostLogin(_a) {
|
|
1006
|
+
var _b;
|
|
1007
|
+
var _c = _a.payload, { callback } = _c, payload = __rest(_c, ["callback"]);
|
|
1006
1008
|
try {
|
|
1007
1009
|
yield put(actions.setLoginState({ loading: true }));
|
|
1008
1010
|
const data = yield call(api.auth.passwordlessPostLogin, payload);
|
|
@@ -1019,9 +1021,10 @@ function* passwordlessPostLogin({ payload }) {
|
|
|
1019
1021
|
yield put(actions.setState({ user, isAuthenticated: true }));
|
|
1020
1022
|
yield afterAuthNavigation();
|
|
1021
1023
|
}
|
|
1024
|
+
callback === null || callback === void 0 ? void 0 : callback(true);
|
|
1022
1025
|
}
|
|
1023
1026
|
catch (e) {
|
|
1024
|
-
yield put(actions.setLoginState({ error: (
|
|
1027
|
+
yield put(actions.setLoginState({ error: (_b = e.message) !== null && _b !== void 0 ? _b : 'Failed to authenticate' }));
|
|
1025
1028
|
}
|
|
1026
1029
|
finally {
|
|
1027
1030
|
yield put(actions.setLoginState({ loading: false }));
|
|
@@ -1105,7 +1108,7 @@ function* postLogin({ payload }) {
|
|
|
1105
1108
|
yield put(actions.setLoginState({ step: LoginStep.loginWithSSOFailed, loading: false }));
|
|
1106
1109
|
}
|
|
1107
1110
|
}
|
|
1108
|
-
function* login({ payload: { email, password, recaptchaToken, invitationToken } }) {
|
|
1111
|
+
function* login({ payload: { email, password, recaptchaToken, invitationToken, callback } }) {
|
|
1109
1112
|
yield put(actions.setLoginState({ loading: true }));
|
|
1110
1113
|
try {
|
|
1111
1114
|
const user = yield call(api.auth.login, {
|
|
@@ -1155,6 +1158,7 @@ function* login({ payload: { email, password, recaptchaToken, invitationToken }
|
|
|
1155
1158
|
yield put(actions.loadTenants());
|
|
1156
1159
|
yield afterAuthNavigation();
|
|
1157
1160
|
}
|
|
1161
|
+
callback === null || callback === void 0 ? void 0 : callback(true);
|
|
1158
1162
|
}
|
|
1159
1163
|
catch (e) {
|
|
1160
1164
|
ContextHolder.setAccessToken(null);
|
|
@@ -2107,7 +2111,8 @@ function* forgotPasswordSagas() {
|
|
|
2107
2111
|
yield takeLeading(actions.loadPasswordConfig, loadPasswordConfig);
|
|
2108
2112
|
}
|
|
2109
2113
|
|
|
2110
|
-
function* activateAccount(
|
|
2114
|
+
function* activateAccount(_a) {
|
|
2115
|
+
var _b = _a.payload, { callback } = _b, payload = __rest(_b, ["callback"]);
|
|
2111
2116
|
yield put(actions.setActivateState({ loading: true }));
|
|
2112
2117
|
try {
|
|
2113
2118
|
const onRedirectTo = ContextHolder.onRedirectTo;
|
|
@@ -2128,6 +2133,7 @@ function* activateAccount({ payload }) {
|
|
|
2128
2133
|
yield put(actions.setState({ user, isAuthenticated: true }));
|
|
2129
2134
|
yield afterAuthNavigation();
|
|
2130
2135
|
}
|
|
2136
|
+
callback === null || callback === void 0 ? void 0 : callback(true);
|
|
2131
2137
|
}
|
|
2132
2138
|
catch (e) {
|
|
2133
2139
|
yield put(actions.setActivateState({ loading: false, error: e.message }));
|
package/auth/reducer.d.ts
CHANGED
|
@@ -196,7 +196,7 @@ declare const actions: {
|
|
|
196
196
|
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>;
|
|
197
197
|
loadPasswordConfig: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[(import("@frontegg/rest-api").IGetUserPasswordConfig | undefined)?], import("@frontegg/rest-api").IGetUserPasswordConfig | undefined, string, never, never>;
|
|
198
198
|
acceptInvitation: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IAcceptInvitation], import("@frontegg/rest-api").IAcceptInvitation, string, never, never>;
|
|
199
|
-
activateAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IActivateAccount], import("@frontegg/rest-api").IActivateAccount, string, never, never>;
|
|
199
|
+
activateAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IActivateAccount, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").IActivateAccount, boolean>, string, never, never>;
|
|
200
200
|
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>;
|
|
201
201
|
resendActivationEmail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IResendActivationEmail], import("@frontegg/rest-api").IResendActivationEmail, string, never, never>;
|
|
202
202
|
loadSocialLoginsConfiguration: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
@@ -215,7 +215,7 @@ declare const actions: {
|
|
|
215
215
|
invitationToken?: string | undefined;
|
|
216
216
|
}, void>, string, never, never>;
|
|
217
217
|
postLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IPostLogin], import("@frontegg/rest-api").IPostLogin, string, never, never>;
|
|
218
|
-
login: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").ILogin], import("@frontegg/rest-api").ILogin, string, never, never>;
|
|
218
|
+
login: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").ILogin, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").ILogin, boolean>, string, never, never>;
|
|
219
219
|
loginWithMfa: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").ILoginWithMfa, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").ILoginWithMfa, boolean>, string, never, never>;
|
|
220
220
|
recoverMfa: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IRecoverMFAToken], import("@frontegg/rest-api").IRecoverMFAToken, string, never, never>;
|
|
221
221
|
logout: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[((() => void) | undefined)?], (() => void) | undefined, string, never, never>;
|
|
@@ -226,7 +226,7 @@ declare const actions: {
|
|
|
226
226
|
mfaToken: string;
|
|
227
227
|
}, string, never, never>;
|
|
228
228
|
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>;
|
|
229
|
-
passwordlessPostLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IPasswordlessPostLogin], import("@frontegg/rest-api").IPasswordlessPostLogin, string, never, never>;
|
|
229
|
+
passwordlessPostLogin: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<import("@frontegg/rest-api").IPasswordlessPostLogin, boolean>], import("../interfaces").WithCallback<import("@frontegg/rest-api").IPasswordlessPostLogin, boolean>, string, never, never>;
|
|
230
230
|
verifyInviteToken: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("@frontegg/rest-api").IVerifyInviteToken], import("@frontegg/rest-api").IVerifyInviteToken, string, never, never>;
|
|
231
231
|
setRolesState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[Partial<import(".").RolesState>], Partial<import(".").RolesState>, string, never, never>;
|
|
232
232
|
resetRolesState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
package/connectivity/index.js
CHANGED
|
@@ -130,6 +130,7 @@ function* loadDataFunction({ payload = channels }) {
|
|
|
130
130
|
return res.reduce((acc, curr, idx) => (Object.assign(Object.assign({}, acc), { [`${payload[idx]}`]: curr })), {});
|
|
131
131
|
})(),
|
|
132
132
|
]);
|
|
133
|
+
const webhooks = yield loadFunction({ payload: { api: 'webhook' }, type: '' });
|
|
133
134
|
const data = values.reduce((acc, curr, idx) => payload[idx]
|
|
134
135
|
? values[values.length - 1][payload[idx]].length
|
|
135
136
|
? Object.assign(Object.assign({}, acc), { [`${payload[idx]}`]: curr, list: [
|
|
@@ -143,7 +144,7 @@ function* loadDataFunction({ payload = channels }) {
|
|
|
143
144
|
image: channels2Platform[payload[idx]].image,
|
|
144
145
|
},
|
|
145
146
|
] }) : acc
|
|
146
|
-
: Object.assign(Object.assign({}, acc), { [`${addApi[idx - payload.length]}`]: curr }), { list: [] });
|
|
147
|
+
: Object.assign(Object.assign({}, acc), { [`${addApi[idx - payload.length]}`]: curr }), { list: [], webhook: webhooks });
|
|
147
148
|
yield put(actions.setConnectivityState(Object.assign(Object.assign({}, data), { error: undefined, isSaving: false, isLoading: false })));
|
|
148
149
|
}
|
|
149
150
|
catch (e) {
|
package/node/auth/index.js
CHANGED
|
@@ -500,6 +500,7 @@ const initialState = Object.assign({ routes: {
|
|
|
500
500
|
socialLoginCallbackUrl: '/account/social/success',
|
|
501
501
|
signUpUrl: '/account/sign-up',
|
|
502
502
|
oidcRedirectUrl: '/account/oidc/callback',
|
|
503
|
+
samlCallbackUrl: '/account/saml/callback',
|
|
503
504
|
magicLinkCallbackUrl: '/account/login/magic-link',
|
|
504
505
|
hostedLoginRedirectUrl: '/oauth/callback'
|
|
505
506
|
}, onRedirectTo: () => { } }, reinitializeState);
|
|
@@ -917,7 +918,7 @@ function* refreshToken() {
|
|
|
917
918
|
else {
|
|
918
919
|
yield effects.put(actions.setTenantsState({ tenants, loading: false }));
|
|
919
920
|
yield effects.put(actions.setState({ user, isAuthenticated: true }));
|
|
920
|
-
if ([routes.loginUrl, routes.socialLoginCallbackUrl, routes.signUpUrl, routes.oidcRedirectUrl].some(url => url && window.location.pathname.endsWith(url)) ||
|
|
921
|
+
if ([routes.loginUrl, routes.socialLoginCallbackUrl, routes.signUpUrl, routes.oidcRedirectUrl, routes.samlCallbackUrl].some(url => url && window.location.pathname.endsWith(url)) ||
|
|
921
922
|
(window.location.pathname.endsWith(routes.activateUrl) && user.verified)) {
|
|
922
923
|
if (loginState.isNewUser && routes.signUpSuccessUrl && routes.socialLoginCallbackUrl === window.location.pathname) {
|
|
923
924
|
onRedirectTo(routes.signUpSuccessUrl, { refresh: routes.signUpSuccessUrl.startsWith('http') });
|
|
@@ -1003,8 +1004,9 @@ function* passwordlessPreLogin(_a) {
|
|
|
1003
1004
|
callback === null || callback === void 0 ? void 0 : callback();
|
|
1004
1005
|
}
|
|
1005
1006
|
}
|
|
1006
|
-
function* passwordlessPostLogin(
|
|
1007
|
-
var
|
|
1007
|
+
function* passwordlessPostLogin(_a) {
|
|
1008
|
+
var _b;
|
|
1009
|
+
var _c = _a.payload, { callback } = _c, payload = tslib.__rest(_c, ["callback"]);
|
|
1008
1010
|
try {
|
|
1009
1011
|
yield effects.put(actions.setLoginState({ loading: true }));
|
|
1010
1012
|
const data = yield effects.call(restApi.api.auth.passwordlessPostLogin, payload);
|
|
@@ -1021,9 +1023,10 @@ function* passwordlessPostLogin({ payload }) {
|
|
|
1021
1023
|
yield effects.put(actions.setState({ user, isAuthenticated: true }));
|
|
1022
1024
|
yield afterAuthNavigation();
|
|
1023
1025
|
}
|
|
1026
|
+
callback === null || callback === void 0 ? void 0 : callback(true);
|
|
1024
1027
|
}
|
|
1025
1028
|
catch (e) {
|
|
1026
|
-
yield effects.put(actions.setLoginState({ error: (
|
|
1029
|
+
yield effects.put(actions.setLoginState({ error: (_b = e.message) !== null && _b !== void 0 ? _b : 'Failed to authenticate' }));
|
|
1027
1030
|
}
|
|
1028
1031
|
finally {
|
|
1029
1032
|
yield effects.put(actions.setLoginState({ loading: false }));
|
|
@@ -1107,7 +1110,7 @@ function* postLogin({ payload }) {
|
|
|
1107
1110
|
yield effects.put(actions.setLoginState({ step: exports.LoginStep.loginWithSSOFailed, loading: false }));
|
|
1108
1111
|
}
|
|
1109
1112
|
}
|
|
1110
|
-
function* login({ payload: { email, password, recaptchaToken, invitationToken } }) {
|
|
1113
|
+
function* login({ payload: { email, password, recaptchaToken, invitationToken, callback } }) {
|
|
1111
1114
|
yield effects.put(actions.setLoginState({ loading: true }));
|
|
1112
1115
|
try {
|
|
1113
1116
|
const user = yield effects.call(restApi.api.auth.login, {
|
|
@@ -1157,6 +1160,7 @@ function* login({ payload: { email, password, recaptchaToken, invitationToken }
|
|
|
1157
1160
|
yield effects.put(actions.loadTenants());
|
|
1158
1161
|
yield afterAuthNavigation();
|
|
1159
1162
|
}
|
|
1163
|
+
callback === null || callback === void 0 ? void 0 : callback(true);
|
|
1160
1164
|
}
|
|
1161
1165
|
catch (e) {
|
|
1162
1166
|
restApi.ContextHolder.setAccessToken(null);
|
|
@@ -2109,7 +2113,8 @@ function* forgotPasswordSagas() {
|
|
|
2109
2113
|
yield effects.takeLeading(actions.loadPasswordConfig, loadPasswordConfig);
|
|
2110
2114
|
}
|
|
2111
2115
|
|
|
2112
|
-
function* activateAccount(
|
|
2116
|
+
function* activateAccount(_a) {
|
|
2117
|
+
var _b = _a.payload, { callback } = _b, payload = tslib.__rest(_b, ["callback"]);
|
|
2113
2118
|
yield effects.put(actions.setActivateState({ loading: true }));
|
|
2114
2119
|
try {
|
|
2115
2120
|
const onRedirectTo = restApi.ContextHolder.onRedirectTo;
|
|
@@ -2130,6 +2135,7 @@ function* activateAccount({ payload }) {
|
|
|
2130
2135
|
yield effects.put(actions.setState({ user, isAuthenticated: true }));
|
|
2131
2136
|
yield afterAuthNavigation();
|
|
2132
2137
|
}
|
|
2138
|
+
callback === null || callback === void 0 ? void 0 : callback(true);
|
|
2133
2139
|
}
|
|
2134
2140
|
catch (e) {
|
|
2135
2141
|
yield effects.put(actions.setActivateState({ loading: false, error: e.message }));
|
|
@@ -133,6 +133,7 @@ function* loadDataFunction({ payload = channels }) {
|
|
|
133
133
|
return res.reduce((acc, curr, idx) => (Object.assign(Object.assign({}, acc), { [`${payload[idx]}`]: curr })), {});
|
|
134
134
|
})(),
|
|
135
135
|
]);
|
|
136
|
+
const webhooks = yield loadFunction({ payload: { api: 'webhook' }, type: '' });
|
|
136
137
|
const data = values.reduce((acc, curr, idx) => payload[idx]
|
|
137
138
|
? values[values.length - 1][payload[idx]].length
|
|
138
139
|
? Object.assign(Object.assign({}, acc), { [`${payload[idx]}`]: curr, list: [
|
|
@@ -146,7 +147,7 @@ function* loadDataFunction({ payload = channels }) {
|
|
|
146
147
|
image: channels2Platform[payload[idx]].image,
|
|
147
148
|
},
|
|
148
149
|
] }) : acc
|
|
149
|
-
: Object.assign(Object.assign({}, acc), { [`${addApi[idx - payload.length]}`]: curr }), { list: [] });
|
|
150
|
+
: Object.assign(Object.assign({}, acc), { [`${addApi[idx - payload.length]}`]: curr }), { list: [], webhook: webhooks });
|
|
150
151
|
yield effects.put(actions.setConnectivityState(Object.assign(Object.assign({}, data), { error: undefined, isSaving: false, isLoading: false })));
|
|
151
152
|
}
|
|
152
153
|
catch (e) {
|
|
@@ -52,7 +52,7 @@ const actions$7 = Object.assign({ loadPlans: toolkit.createAction(`${name$6}/loa
|
|
|
52
52
|
const configInitialState = {
|
|
53
53
|
loading: false,
|
|
54
54
|
error: null,
|
|
55
|
-
fetching:
|
|
55
|
+
fetching: true,
|
|
56
56
|
config: null,
|
|
57
57
|
};
|
|
58
58
|
const reducers$5 = Object.assign({}, createModuleCaseReducers());
|
package/package.json
CHANGED
package/subscriptions/index.js
CHANGED
|
@@ -49,7 +49,7 @@ const actions$7 = Object.assign({ loadPlans: createAction(`${name$6}/loadPlans`)
|
|
|
49
49
|
const configInitialState = {
|
|
50
50
|
loading: false,
|
|
51
51
|
error: null,
|
|
52
|
-
fetching:
|
|
52
|
+
fetching: true,
|
|
53
53
|
config: null,
|
|
54
54
|
};
|
|
55
55
|
const reducers$5 = Object.assign({}, createModuleCaseReducers());
|