@frontegg/redux-store 5.19.0 → 5.22.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/AcceptInvitationState/index.d.ts +2 -0
- package/auth/AccountSettingsState/index.d.ts +10 -0
- package/auth/ActivateState/index.d.ts +6 -1
- package/auth/ActivateState/interfaces.d.ts +6 -1
- package/auth/ApiTokensState/index.d.ts +2 -0
- package/auth/ForgotPasswordState/index.d.ts +2 -0
- package/auth/LoginState/index.d.ts +2 -0
- package/auth/LoginState/interfaces.d.ts +2 -0
- package/auth/LoginState/saga.d.ts +2 -0
- package/auth/MfaState/index.d.ts +6 -6
- package/auth/ProfileState/index.d.ts +2 -0
- package/auth/ResetPhoneNumberState/index.d.ts +96 -0
- package/auth/ResetPhoneNumberState/interfaces.d.ts +18 -0
- package/auth/ResetPhoneNumberState/saga.d.ts +17 -0
- package/auth/RolesState/index.d.ts +2 -0
- package/auth/SSOState/index.d.ts +2 -0
- package/auth/SecurityPolicyState/index.d.ts +9 -0
- package/auth/SignUp/index.d.ts +2 -0
- package/auth/SocialLogins/index.d.ts +2 -8
- package/auth/TeamState/index.d.ts +2 -0
- package/auth/TenantsState/index.d.ts +2 -8
- package/auth/index.d.ts +14 -0
- package/auth/index.js +127 -17
- package/auth/interfaces.d.ts +15 -1
- package/auth/reducer.d.ts +14 -1
- package/auth/utils.d.ts +4 -0
- package/index.js +2 -2
- package/node/auth/index.js +137 -24
- package/node/index.js +15 -0
- package/node/subscriptions/index.js +167 -127
- package/package.json +2 -2
- package/subscriptions/ManagedSubscriptions/index.d.ts +10 -0
- package/subscriptions/ManagedSubscriptions/interfaces.d.ts +28 -0
- package/subscriptions/ManagedSubscriptions/saga.d.ts +1 -0
- package/subscriptions/index.d.ts +7 -0
- package/subscriptions/index.js +168 -128
- package/subscriptions/interfaces.d.ts +4 -0
- package/subscriptions/reducer.d.ts +7 -0
- package/toolkit/index.d.ts +1 -1
package/node/auth/index.js
CHANGED
|
@@ -45,6 +45,7 @@ exports.LoginStep = void 0;
|
|
|
45
45
|
(function (LoginStep) {
|
|
46
46
|
LoginStep["preLogin"] = "preLogin";
|
|
47
47
|
LoginStep["magicLinkPreLoginSuccess"] = "magicLinkPreLoginSuccess";
|
|
48
|
+
LoginStep["loginWithSmsOtc"] = "loginWithSmsOtc";
|
|
48
49
|
LoginStep["loginWithOtc"] = "loginWithOtc";
|
|
49
50
|
LoginStep["loginWithPassword"] = "loginWithPassword";
|
|
50
51
|
LoginStep["loginWithTwoFactor"] = "loginWithTwoFactor";
|
|
@@ -61,11 +62,11 @@ const loginState = {
|
|
|
61
62
|
email: '',
|
|
62
63
|
tenants: [],
|
|
63
64
|
};
|
|
64
|
-
const reducers$
|
|
65
|
+
const reducers$f = {
|
|
65
66
|
setLoginState: typeReducerForKey('loginState'),
|
|
66
67
|
resetLoginState: resetStateByKey('loginState', { loginState }),
|
|
67
68
|
};
|
|
68
|
-
const actions$
|
|
69
|
+
const actions$g = {
|
|
69
70
|
requestAuthorize: toolkit.createAction(`${constants.authStoreName}/requestAuthorize`, (payload = false) => ({ payload })),
|
|
70
71
|
requestHostedLoginAuthorize: toolkit.createAction(`${constants.authStoreName}/requestHostedLoginAuthorize`),
|
|
71
72
|
handleHostedLoginCallback: toolkit.createAction(`${constants.authStoreName}/handleHostedLoginCallback`, (payload) => ({ payload })),
|
|
@@ -88,6 +89,7 @@ exports.ActivateAccountStep = void 0;
|
|
|
88
89
|
ActivateAccountStep["activating"] = "activating";
|
|
89
90
|
ActivateAccountStep["success"] = "success";
|
|
90
91
|
ActivateAccountStep["resend"] = "resend";
|
|
92
|
+
ActivateAccountStep["activatingForm"] = "activatingForm";
|
|
91
93
|
})(exports.ActivateAccountStep || (exports.ActivateAccountStep = {}));
|
|
92
94
|
|
|
93
95
|
const activateState = {
|
|
@@ -98,13 +100,14 @@ const activateState = {
|
|
|
98
100
|
loading: false,
|
|
99
101
|
},
|
|
100
102
|
};
|
|
101
|
-
const reducers$
|
|
103
|
+
const reducers$e = {
|
|
102
104
|
setActivateState: typeReducerForKey('activateState'),
|
|
103
105
|
resetActivateState: resetStateByKey('activateState', { activateState }),
|
|
104
106
|
setActivateStrategyState: typeReducerNestedKey('activateState', 'activationStrategy'),
|
|
105
107
|
};
|
|
106
|
-
const actions$
|
|
108
|
+
const actions$f = {
|
|
107
109
|
activateAccount: toolkit.createAction(`${constants.authStoreName}/activateAccount`, (payload) => ({ payload })),
|
|
110
|
+
preActivateAccount: toolkit.createAction(`${constants.authStoreName}/preActivateAccount`, (payload) => ({ payload })),
|
|
108
111
|
getActivateAccountStrategy: toolkit.createAction(`${constants.authStoreName}/getActivateAccountStrategy`, (payload) => ({ payload })),
|
|
109
112
|
resendActivationEmail: toolkit.createAction(`${constants.authStoreName}/resendActivationEmail`, (payload) => ({
|
|
110
113
|
payload,
|
|
@@ -123,13 +126,13 @@ exports.AcceptInvitationStep = void 0;
|
|
|
123
126
|
const acceptInvitationState = {
|
|
124
127
|
step: exports.AcceptInvitationStep.validate,
|
|
125
128
|
};
|
|
126
|
-
const reducers$
|
|
129
|
+
const reducers$d = {
|
|
127
130
|
setAcceptInvitationState: typeReducerForKey('acceptInvitationState'),
|
|
128
131
|
resetAcceptInvitationState: resetStateByKey('acceptInvitationState', {
|
|
129
132
|
acceptInvitationState,
|
|
130
133
|
}),
|
|
131
134
|
};
|
|
132
|
-
const actions$
|
|
135
|
+
const actions$e = {
|
|
133
136
|
acceptInvitation: toolkit.createAction(`${constants.authStoreName}/acceptInvitation`, (payload) => ({ payload })),
|
|
134
137
|
};
|
|
135
138
|
|
|
@@ -145,11 +148,11 @@ const forgotPasswordState = {
|
|
|
145
148
|
email: '',
|
|
146
149
|
passwordConfig: null,
|
|
147
150
|
};
|
|
148
|
-
const reducers$
|
|
151
|
+
const reducers$c = {
|
|
149
152
|
setForgotPasswordState: typeReducerForKey('forgotPasswordState'),
|
|
150
153
|
resetForgotPasswordState: resetStateByKey('forgotPasswordState', { forgotPasswordState }),
|
|
151
154
|
};
|
|
152
|
-
const actions$
|
|
155
|
+
const actions$d = {
|
|
153
156
|
forgotPassword: toolkit.createAction(`${constants.authStoreName}/forgotPassword`, (payload) => ({ payload })),
|
|
154
157
|
resetPassword: toolkit.createAction(`${constants.authStoreName}/resetPassword`, (payload) => ({ payload })),
|
|
155
158
|
loadPasswordConfig: toolkit.createAction(`${constants.authStoreName}/loadPasswordConfig`, (payload) => ({
|
|
@@ -157,6 +160,27 @@ const actions$c = {
|
|
|
157
160
|
})),
|
|
158
161
|
};
|
|
159
162
|
|
|
163
|
+
exports.ResetPhoneNumberStep = void 0;
|
|
164
|
+
(function (ResetPhoneNumberStep) {
|
|
165
|
+
ResetPhoneNumberStep["ResetPhoneNumber"] = "ResetPhoneNumber";
|
|
166
|
+
ResetPhoneNumberStep["VerifyResetPhoneNumber"] = "VerifyResetPhoneNumber";
|
|
167
|
+
ResetPhoneNumberStep["ChangePhoneNumber"] = "ChangePhoneNumber";
|
|
168
|
+
})(exports.ResetPhoneNumberStep || (exports.ResetPhoneNumberStep = {}));
|
|
169
|
+
|
|
170
|
+
const resetPhoneNumberState = {
|
|
171
|
+
step: exports.ResetPhoneNumberStep.ResetPhoneNumber,
|
|
172
|
+
loading: false,
|
|
173
|
+
};
|
|
174
|
+
const reducers$b = {
|
|
175
|
+
setResetPhoneNumberState: typeReducerForKey('resetPhoneNumberState'),
|
|
176
|
+
resetResetPhoneNumberState: resetStateByKey('resetPhoneNumberState', { resetPhoneNumberState }),
|
|
177
|
+
};
|
|
178
|
+
const actions$c = {
|
|
179
|
+
resetPhoneNumber: toolkit.createAction(`${constants.authStoreName}/resetPhoneNumber`, (payload) => ({ payload })),
|
|
180
|
+
verifyResetPhoneNumber: toolkit.createAction(`${constants.authStoreName}/verifyResetPhoneNumber`, (payload) => ({ payload })),
|
|
181
|
+
changePhoneNumber: toolkit.createAction(`${constants.authStoreName}/changePhoneNumber`, (payload) => ({ payload })),
|
|
182
|
+
};
|
|
183
|
+
|
|
160
184
|
const ssoState = {
|
|
161
185
|
firstLoad: true,
|
|
162
186
|
loading: true,
|
|
@@ -488,6 +512,7 @@ const reinitializeState = {
|
|
|
488
512
|
accountSettingsState,
|
|
489
513
|
tenantsState,
|
|
490
514
|
rolesState,
|
|
515
|
+
resetPhoneNumberState
|
|
491
516
|
};
|
|
492
517
|
const initialState = Object.assign({ routes: {
|
|
493
518
|
authenticatedUrl: '/',
|
|
@@ -496,6 +521,7 @@ const initialState = Object.assign({ routes: {
|
|
|
496
521
|
activateUrl: '/account/activate',
|
|
497
522
|
acceptInvitationUrl: '/account/invitation/accept',
|
|
498
523
|
forgetPasswordUrl: '/account/forget-password',
|
|
524
|
+
resetPhoneNumberUrl: '/account/reset-phone-number',
|
|
499
525
|
resetPasswordUrl: '/account/reset-password',
|
|
500
526
|
socialLoginCallbackUrl: '/account/social/success',
|
|
501
527
|
signUpUrl: '/account/sign-up',
|
|
@@ -508,9 +534,9 @@ const initialState = Object.assign({ routes: {
|
|
|
508
534
|
const { reducer, actions: sliceActions } = toolkit.createSlice({
|
|
509
535
|
name: constants.authStoreName,
|
|
510
536
|
initialState,
|
|
511
|
-
reducers: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ resetState: (state) => (Object.assign(Object.assign({}, state), reinitializeState)), setState: (state, { payload }) => (Object.assign(Object.assign({}, state), payload)), setUser: typeReducer('user') }, reducers$
|
|
537
|
+
reducers: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ resetState: (state) => (Object.assign(Object.assign({}, state), reinitializeState)), setState: (state, { payload }) => (Object.assign(Object.assign({}, state), payload)), setUser: typeReducer('user') }, reducers$f), reducers$6), reducers$e), reducers$d), reducers$c), reducers$b), reducers$5), reducers$9), reducers$a), reducers$8), reducers$7), reducers$4), reducers$3), reducers$2), reducers$1), reducers),
|
|
512
538
|
});
|
|
513
|
-
const actions = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, sliceActions), actions$
|
|
539
|
+
const actions = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, sliceActions), actions$g), actions$7), actions$f), actions$e), actions$d), actions$c), actions$6), actions$a), actions$b), actions$9), actions$8), actions$5), actions$4), actions$3), actions$2), actions$1);
|
|
514
540
|
|
|
515
541
|
exports.SSOStateKeys = void 0;
|
|
516
542
|
(function (SSOStateKeys) {
|
|
@@ -830,6 +856,12 @@ function* signUpSaga() {
|
|
|
830
856
|
yield effects.takeLeading(actions.resetSignUpStateSoft, resetSignUpStateSoft);
|
|
831
857
|
}
|
|
832
858
|
|
|
859
|
+
const authStrategyLoginStepMap = {
|
|
860
|
+
[restApi.AuthStrategyEnum.Code]: exports.LoginStep.loginWithOtc,
|
|
861
|
+
[restApi.AuthStrategyEnum.EmailAndPassword]: exports.LoginStep.loginWithPassword,
|
|
862
|
+
[restApi.AuthStrategyEnum.MagicLink]: exports.LoginStep.magicLinkPreLoginSuccess,
|
|
863
|
+
[restApi.AuthStrategyEnum.SmsCode]: exports.LoginStep.loginWithSmsOtc,
|
|
864
|
+
};
|
|
833
865
|
function* afterAuthNavigation() {
|
|
834
866
|
var _a;
|
|
835
867
|
const onRedirectTo = restApi.ContextHolder.onRedirectTo;
|
|
@@ -918,8 +950,8 @@ function* refreshToken() {
|
|
|
918
950
|
else {
|
|
919
951
|
yield effects.put(actions.setTenantsState({ tenants, loading: false }));
|
|
920
952
|
yield effects.put(actions.setState({ user, isAuthenticated: true }));
|
|
921
|
-
if ([routes.loginUrl, routes.socialLoginCallbackUrl, routes.signUpUrl, routes.oidcRedirectUrl, routes.samlCallbackUrl]
|
|
922
|
-
(window.location.pathname.endsWith(
|
|
953
|
+
if ([routes.loginUrl, routes.socialLoginCallbackUrl, routes.signUpUrl, routes.oidcRedirectUrl, routes.samlCallbackUrl]
|
|
954
|
+
.some(url => url && window.location.pathname.endsWith(url))) {
|
|
923
955
|
if (loginState.isNewUser && routes.signUpSuccessUrl && routes.socialLoginCallbackUrl === window.location.pathname) {
|
|
924
956
|
onRedirectTo(routes.signUpSuccessUrl, { refresh: routes.signUpSuccessUrl.startsWith('http') });
|
|
925
957
|
}
|
|
@@ -993,10 +1025,16 @@ function* handleHostedLoginCallback({ payload }) {
|
|
|
993
1025
|
function* passwordlessPreLogin(_a) {
|
|
994
1026
|
var _b = _a.payload, { callback } = _b, payload = tslib.__rest(_b, ["callback"]);
|
|
995
1027
|
try {
|
|
1028
|
+
const { onRedirectTo, routes } = yield effects.select(({ auth: { onRedirectTo, routes } }) => ({ onRedirectTo, routes }));
|
|
996
1029
|
yield effects.put(actions.setLoginState({ loading: true }));
|
|
997
|
-
yield effects.call(restApi.api.auth.passwordlessPreLogin, payload);
|
|
998
|
-
const step = payload.type
|
|
999
|
-
|
|
1030
|
+
const preloginRes = yield effects.call(restApi.api.auth.passwordlessPreLogin, payload);
|
|
1031
|
+
const step = authStrategyLoginStepMap[payload.type];
|
|
1032
|
+
if (step === exports.LoginStep.loginWithSmsOtc && preloginRes.resetPhoneNumberToken) {
|
|
1033
|
+
yield effects.put(actions.setResetPhoneNumberState({ resetPhoneNumberToken: preloginRes.resetPhoneNumberToken, step: exports.ResetPhoneNumberStep.VerifyResetPhoneNumber }));
|
|
1034
|
+
onRedirectTo(routes.resetPhoneNumberUrl);
|
|
1035
|
+
return;
|
|
1036
|
+
}
|
|
1037
|
+
yield effects.put(actions.setLoginState({ step, loading: false, email: payload.email, phoneNumber: preloginRes === null || preloginRes === void 0 ? void 0 : preloginRes.phoneNumber }));
|
|
1000
1038
|
callback === null || callback === void 0 ? void 0 : callback();
|
|
1001
1039
|
}
|
|
1002
1040
|
catch (e) {
|
|
@@ -1082,7 +1120,7 @@ function* ssoPreloginFailed(_a) {
|
|
|
1082
1120
|
yield effects.put(actions.setLoginState({ step: exports.LoginStep.loginWithPassword, loading: false }));
|
|
1083
1121
|
callback === null || callback === void 0 ? void 0 : callback();
|
|
1084
1122
|
}
|
|
1085
|
-
else if ([restApi.AuthStrategyEnum.MagicLink, restApi.AuthStrategyEnum.Code].includes(publicPolicy === null || publicPolicy === void 0 ? void 0 : publicPolicy.authStrategy)) {
|
|
1123
|
+
else if ([restApi.AuthStrategyEnum.MagicLink, restApi.AuthStrategyEnum.Code, restApi.AuthStrategyEnum.SmsCode].includes(publicPolicy === null || publicPolicy === void 0 ? void 0 : publicPolicy.authStrategy)) {
|
|
1086
1124
|
yield effects.put(actions.passwordlessPreLogin(Object.assign(Object.assign({}, body), { type: publicPolicy === null || publicPolicy === void 0 ? void 0 : publicPolicy.authStrategy, callback })));
|
|
1087
1125
|
}
|
|
1088
1126
|
else {
|
|
@@ -2113,6 +2151,23 @@ function* forgotPasswordSagas() {
|
|
|
2113
2151
|
yield effects.takeLeading(actions.loadPasswordConfig, loadPasswordConfig);
|
|
2114
2152
|
}
|
|
2115
2153
|
|
|
2154
|
+
function* preActivateAccount({ payload: { userId, token } }) {
|
|
2155
|
+
yield effects.put(actions.setActivateState({ loading: true, step: exports.ActivateAccountStep.activating }));
|
|
2156
|
+
try {
|
|
2157
|
+
const { isAuthenticated } = yield effects.select((state) => state.auth);
|
|
2158
|
+
if (isAuthenticated) {
|
|
2159
|
+
yield effects.put(actions.silentLogout());
|
|
2160
|
+
}
|
|
2161
|
+
const strategy = yield effects.call(restApi.api.auth.getActivateAccountStrategy, { userId, token });
|
|
2162
|
+
yield effects.put(actions.setActivateStrategyState({ strategy, loading: false, error: undefined }));
|
|
2163
|
+
if (strategy.shouldSetPassword) {
|
|
2164
|
+
yield effects.put(actions.setActivateState({ loading: false, step: exports.ActivateAccountStep.activatingForm }));
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2167
|
+
catch (e) {
|
|
2168
|
+
yield effects.put(actions.setActivateState({ loading: false, error: e.message }));
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2116
2171
|
function* activateAccount(_a) {
|
|
2117
2172
|
var _b = _a.payload, { callback } = _b, payload = tslib.__rest(_b, ["callback"]);
|
|
2118
2173
|
yield effects.put(actions.setActivateState({ loading: true }));
|
|
@@ -2170,6 +2225,7 @@ function* resendActivationEmailFunction({ payload }) {
|
|
|
2170
2225
|
}
|
|
2171
2226
|
function* activateSagas() {
|
|
2172
2227
|
yield effects.takeLeading(actions.activateAccount, activateAccount);
|
|
2228
|
+
yield effects.takeLeading(actions.preActivateAccount, preActivateAccount);
|
|
2173
2229
|
yield effects.takeLeading(actions.getActivateAccountStrategy, getActivateAccountStrategy);
|
|
2174
2230
|
yield effects.takeLeading(actions.resendActivationEmail, resendActivationEmailFunction);
|
|
2175
2231
|
}
|
|
@@ -3275,12 +3331,66 @@ function* rolesSagas() {
|
|
|
3275
3331
|
yield effects.takeEvery(actions.attachPermissionToRoles, attachPermissionToRoles);
|
|
3276
3332
|
}
|
|
3277
3333
|
|
|
3334
|
+
function* resetPhoneNumber(_a) {
|
|
3335
|
+
var _b = _a.payload, { callback } = _b, body = tslib.__rest(_b, ["callback"]);
|
|
3336
|
+
yield effects.put(actions.setResetPhoneNumberState({ loading: true }));
|
|
3337
|
+
try {
|
|
3338
|
+
const res = yield effects.call(restApi.api.auth.resetPhoneNumber, body);
|
|
3339
|
+
yield effects.put(actions.setResetPhoneNumberState({ loading: false, error: undefined, resetPhoneNumberToken: res.resetPhoneNumberToken, step: exports.ResetPhoneNumberStep.VerifyResetPhoneNumber }));
|
|
3340
|
+
yield effects.put(actions.setLoginState({ email: body.email }));
|
|
3341
|
+
}
|
|
3342
|
+
catch (e) {
|
|
3343
|
+
yield effects.put(actions.setResetPhoneNumberState({ loading: false, error: e.message }));
|
|
3344
|
+
callback === null || callback === void 0 ? void 0 : callback(null, e);
|
|
3345
|
+
}
|
|
3346
|
+
}
|
|
3347
|
+
function* verifyResetPhoneNumber(_a) {
|
|
3348
|
+
var _b = _a.payload, { callback } = _b, body = tslib.__rest(_b, ["callback"]);
|
|
3349
|
+
yield effects.put(actions.setResetPhoneNumberState({ loading: true }));
|
|
3350
|
+
try {
|
|
3351
|
+
const res = yield effects.call(restApi.api.auth.verifyResetPhoneNumber, body);
|
|
3352
|
+
yield effects.put(actions.setResetPhoneNumberState({ loading: false, error: undefined, changePhoneNumberToken: res.changePhoneNumberToken, step: exports.ResetPhoneNumberStep.ChangePhoneNumber }));
|
|
3353
|
+
callback === null || callback === void 0 ? void 0 : callback(true);
|
|
3354
|
+
}
|
|
3355
|
+
catch (e) {
|
|
3356
|
+
yield effects.put(actions.setResetPhoneNumberState({ loading: false, error: e.message }));
|
|
3357
|
+
callback === null || callback === void 0 ? void 0 : callback(null, e);
|
|
3358
|
+
}
|
|
3359
|
+
}
|
|
3360
|
+
function* changePhoneNumber(_a) {
|
|
3361
|
+
var _b = _a.payload, { callback } = _b, body = tslib.__rest(_b, ["callback"]);
|
|
3362
|
+
yield effects.put(actions.setResetPhoneNumberState({ loading: true }));
|
|
3363
|
+
try {
|
|
3364
|
+
const { onRedirectTo, routes } = yield effects.select(({ auth: { onRedirectTo, routes } }) => ({ onRedirectTo, routes }));
|
|
3365
|
+
yield effects.call(restApi.api.auth.changePhoneNumber, { phoneNumber: body.phoneNumber, changePhoneNumberToken: body.changePhoneNumberToken });
|
|
3366
|
+
yield effects.put(actions.setLoginState({ step: exports.LoginStep.loginWithSmsOtc }));
|
|
3367
|
+
yield effects.put(actions.passwordlessPreLogin({
|
|
3368
|
+
type: restApi.AuthStrategyEnum.SmsCode,
|
|
3369
|
+
email: body.email,
|
|
3370
|
+
recaptchaToken: body.recaptchaToken,
|
|
3371
|
+
}));
|
|
3372
|
+
onRedirectTo(routes.loginUrl);
|
|
3373
|
+
yield effects.put(actions.setResetPhoneNumberState({ loading: false }));
|
|
3374
|
+
callback === null || callback === void 0 ? void 0 : callback(true);
|
|
3375
|
+
}
|
|
3376
|
+
catch (e) {
|
|
3377
|
+
yield effects.put(actions.setResetPhoneNumberState({ loading: false, error: e.message }));
|
|
3378
|
+
callback === null || callback === void 0 ? void 0 : callback(null, e);
|
|
3379
|
+
}
|
|
3380
|
+
}
|
|
3381
|
+
function* resetPhoneNumberSagas() {
|
|
3382
|
+
yield effects.takeLeading(actions.resetPhoneNumber, resetPhoneNumber);
|
|
3383
|
+
yield effects.takeLeading(actions.verifyResetPhoneNumber, verifyResetPhoneNumber);
|
|
3384
|
+
yield effects.takeLeading(actions.changePhoneNumber, changePhoneNumber);
|
|
3385
|
+
}
|
|
3386
|
+
|
|
3278
3387
|
function* sagas() {
|
|
3279
3388
|
yield effects.all([
|
|
3280
3389
|
effects.call(loginSagas),
|
|
3281
3390
|
effects.call(activateSagas),
|
|
3282
3391
|
effects.call(acceptInvitationSagas),
|
|
3283
3392
|
effects.call(forgotPasswordSagas),
|
|
3393
|
+
effects.call(resetPhoneNumberSagas),
|
|
3284
3394
|
effects.call(ssoSagas$1),
|
|
3285
3395
|
effects.call(ssoSagas),
|
|
3286
3396
|
effects.call(profileSagas),
|
|
@@ -3331,14 +3441,14 @@ Object.defineProperty(exports, 'AuthStrategyEnum', {
|
|
|
3331
3441
|
}
|
|
3332
3442
|
});
|
|
3333
3443
|
exports.authStoreName = constants.authStoreName;
|
|
3334
|
-
exports.acceptInvitationActions = actions$
|
|
3335
|
-
exports.acceptInvitationReducers = reducers$
|
|
3444
|
+
exports.acceptInvitationActions = actions$e;
|
|
3445
|
+
exports.acceptInvitationReducers = reducers$d;
|
|
3336
3446
|
exports.acceptInvitationState = acceptInvitationState;
|
|
3337
3447
|
exports.accountSettingsActions = actions$3;
|
|
3338
3448
|
exports.accountSettingsReducers = reducers$2;
|
|
3339
3449
|
exports.accountSettingsState = accountSettingsState;
|
|
3340
|
-
exports.activateAccountActions = actions$
|
|
3341
|
-
exports.activateAccountReducers = reducers$
|
|
3450
|
+
exports.activateAccountActions = actions$f;
|
|
3451
|
+
exports.activateAccountReducers = reducers$e;
|
|
3342
3452
|
exports.activateState = activateState;
|
|
3343
3453
|
exports.apiTokensActions = actions$5;
|
|
3344
3454
|
exports.apiTokensReducers = reducers$4;
|
|
@@ -3349,11 +3459,11 @@ exports.authMockSagas = mockSagas;
|
|
|
3349
3459
|
exports.authReducers = reducer;
|
|
3350
3460
|
exports.authSagas = sagas;
|
|
3351
3461
|
exports['default'] = authStore;
|
|
3352
|
-
exports.forgotPasswordActions = actions$
|
|
3353
|
-
exports.forgotPasswordReducers = reducers$
|
|
3462
|
+
exports.forgotPasswordActions = actions$d;
|
|
3463
|
+
exports.forgotPasswordReducers = reducers$c;
|
|
3354
3464
|
exports.forgotPasswordState = forgotPasswordState;
|
|
3355
|
-
exports.loginActions = actions$
|
|
3356
|
-
exports.loginReducers = reducers$
|
|
3465
|
+
exports.loginActions = actions$g;
|
|
3466
|
+
exports.loginReducers = reducers$f;
|
|
3357
3467
|
exports.loginState = loginState;
|
|
3358
3468
|
exports.mfaActions = actions$9;
|
|
3359
3469
|
exports.mfaReducers = reducers$8;
|
|
@@ -3361,6 +3471,9 @@ exports.mfaState = mfaState;
|
|
|
3361
3471
|
exports.profileActions = actions$a;
|
|
3362
3472
|
exports.profileReducers = reducers$9;
|
|
3363
3473
|
exports.profileState = profileState;
|
|
3474
|
+
exports.resetPhoneNumberActions = actions$c;
|
|
3475
|
+
exports.resetPhoneNumberReducers = reducers$b;
|
|
3476
|
+
exports.resetPhoneNumberState = resetPhoneNumberState;
|
|
3364
3477
|
exports.rolesActions = actions$1;
|
|
3365
3478
|
exports.rolesReducers = reducers;
|
|
3366
3479
|
exports.rolesState = rolesState;
|
package/node/index.js
CHANGED
|
@@ -60,6 +60,12 @@ Object.defineProperty(exports, 'MFAStep', {
|
|
|
60
60
|
return auth_index.MFAStep;
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
|
+
Object.defineProperty(exports, 'ResetPhoneNumberStep', {
|
|
64
|
+
enumerable: true,
|
|
65
|
+
get: function () {
|
|
66
|
+
return auth_index.ResetPhoneNumberStep;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
63
69
|
Object.defineProperty(exports, 'SSOStateKeys', {
|
|
64
70
|
enumerable: true,
|
|
65
71
|
get: function () {
|
|
@@ -114,6 +120,9 @@ exports.mfaState = auth_index.mfaState;
|
|
|
114
120
|
exports.profileActions = auth_index.profileActions;
|
|
115
121
|
exports.profileReducers = auth_index.profileReducers;
|
|
116
122
|
exports.profileState = auth_index.profileState;
|
|
123
|
+
exports.resetPhoneNumberActions = auth_index.resetPhoneNumberActions;
|
|
124
|
+
exports.resetPhoneNumberReducers = auth_index.resetPhoneNumberReducers;
|
|
125
|
+
exports.resetPhoneNumberState = auth_index.resetPhoneNumberState;
|
|
117
126
|
exports.rolesActions = auth_index.rolesActions;
|
|
118
127
|
exports.rolesReducers = auth_index.rolesReducers;
|
|
119
128
|
exports.rolesState = auth_index.rolesState;
|
|
@@ -164,6 +173,12 @@ Object.defineProperty(exports, 'CheckoutStatus', {
|
|
|
164
173
|
return subscriptions_index.CheckoutStatus;
|
|
165
174
|
}
|
|
166
175
|
});
|
|
176
|
+
Object.defineProperty(exports, 'ManagedSubscriptionStatus', {
|
|
177
|
+
enumerable: true,
|
|
178
|
+
get: function () {
|
|
179
|
+
return subscriptions_index.ManagedSubscriptionStatus;
|
|
180
|
+
}
|
|
181
|
+
});
|
|
167
182
|
Object.defineProperty(exports, 'PaymentMethodType', {
|
|
168
183
|
enumerable: true,
|
|
169
184
|
get: function () {
|