@frontegg/redux-store 5.48.0 → 5.51.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/SSOState/index.d.ts +9 -1
- package/auth/SSOState/interfaces.d.ts +5 -1
- package/auth/index.d.ts +7 -0
- package/auth/index.js +31 -11
- package/auth/reducer.d.ts +7 -0
- package/node/auth/index.js +1 -1
- package/node/{index-7ba717da.js → index-60f5f9e5.js} +31 -11
- package/node/index.js +1 -1
- package/node/subscriptions/index.js +4 -0
- package/node/toolkit/index.js +1 -1
- package/package.json +2 -2
- package/subscriptions/general.interfaces.d.ts +1 -0
- package/subscriptions/index.js +4 -0
package/auth/SSOState/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateSamlGroupPayload, DeleteSamlGroupPayload, SaveSSOConfigurationFilePayload, SaveSSOConfigurationPayload, ValidateSSODomainPayload, SSOState, SSOStateIndicator, UpdateSSOAuthorizationRolesPayload, SaveSSODomainPayload, UpdateSSOConfigurationPayload, DeleteSSOConfigurationPayload, SaveSSOConfigurationPayloadV2, UpdateSSODefaultRolesPayload, SetSSOGroupsPayload, SaveSSOConfigurationByMetadataPayload, UpdateSSOConfigurationByMetadataPayload } from './interfaces';
|
|
1
|
+
import { CreateSamlGroupPayload, DeleteSamlGroupPayload, SaveSSOConfigurationFilePayload, SaveSSOConfigurationPayload, ValidateSSODomainPayload, SSOState, SSOStateIndicator, UpdateSSOAuthorizationRolesPayload, SaveSSODomainPayload, UpdateSSOConfigurationPayload, DeleteSSOConfigurationPayload, SaveSSOConfigurationPayloadV2, UpdateSSODefaultRolesPayload, SetSSOGroupsPayload, SaveSSOConfigurationByMetadataPayload, UpdateSSOConfigurationByMetadataPayload, UpdateSSOGroupsPayload } from './interfaces';
|
|
2
2
|
import { WithCallback } from '../../interfaces';
|
|
3
3
|
import { IOidcPostLogin } from '@frontegg/rest-api';
|
|
4
4
|
declare const ssoState: SSOState;
|
|
@@ -136,6 +136,13 @@ declare const actions: {
|
|
|
136
136
|
groupsToAdd: import("@frontegg/rest-api").ICreateSamlGroup[];
|
|
137
137
|
groupsToDelete: string[];
|
|
138
138
|
}, boolean>, string, never, never>;
|
|
139
|
+
updateSSOGroups: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<{
|
|
140
|
+
ssoConfigId: string;
|
|
141
|
+
changedGroups: import("@frontegg/rest-api").IUpdateSamlGroup[];
|
|
142
|
+
}, boolean>], WithCallback<{
|
|
143
|
+
ssoConfigId: string;
|
|
144
|
+
changedGroups: import("@frontegg/rest-api").IUpdateSamlGroup[];
|
|
145
|
+
}, boolean>, string, never, never>;
|
|
139
146
|
saveSSOConfigurationByMetadata: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[WithCallback<{
|
|
140
147
|
configFile: File;
|
|
141
148
|
}, import("@frontegg/rest-api").ISSOConfiguration>], WithCallback<{
|
|
@@ -195,6 +202,7 @@ declare type DispatchedActions = {
|
|
|
195
202
|
validateSSODomainV2: (payload: ValidateSSODomainPayload) => void;
|
|
196
203
|
setSSODefaultRoles: (payload: UpdateSSODefaultRolesPayload) => void;
|
|
197
204
|
setSSOGroups: (payload: SetSSOGroupsPayload) => void;
|
|
205
|
+
updateSSOGroups: (payload: UpdateSSOGroupsPayload) => void;
|
|
198
206
|
saveSSOConfigurationByMetadata: (payload: SaveSSOConfigurationByMetadataPayload) => void;
|
|
199
207
|
updateSSOConfigurationByMetadata: (payload: UpdateSSOConfigurationByMetadataPayload) => void;
|
|
200
208
|
setSSOLoader: (payload: SSOStateIndicator) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICreateSamlGroup, ISamlConfiguration, ISamlRolesGroup, IOidcConfiguration, ITeamUserRole, ICreateSSODomain, ISSODomain, IUpdateSamlConfiguration, ISamlMetadata, IUpdateSSOConfiguration, ISSOConfiguration } from '@frontegg/rest-api';
|
|
1
|
+
import { ICreateSamlGroup, ISamlConfiguration, ISamlRolesGroup, IOidcConfiguration, ITeamUserRole, ICreateSSODomain, ISSODomain, IUpdateSamlConfiguration, ISamlMetadata, IUpdateSSOConfiguration, ISSOConfiguration, IUpdateSamlGroup } from '@frontegg/rest-api';
|
|
2
2
|
import { WithCallback } from '../../interfaces';
|
|
3
3
|
export { ISSOConfiguration, ISSODomain };
|
|
4
4
|
export interface SSOState {
|
|
@@ -42,6 +42,10 @@ export declare enum SamlVendors {
|
|
|
42
42
|
Google = "google",
|
|
43
43
|
Oidc = "oidc"
|
|
44
44
|
}
|
|
45
|
+
export declare type UpdateSSOGroupsPayload = WithCallback<{
|
|
46
|
+
ssoConfigId: string;
|
|
47
|
+
changedGroups: IUpdateSamlGroup[];
|
|
48
|
+
}>;
|
|
45
49
|
export declare type SetSSOGroupsPayload = WithCallback<{
|
|
46
50
|
ssoConfigId: string;
|
|
47
51
|
groupsToAdd: ICreateSamlGroup[];
|
package/auth/index.d.ts
CHANGED
|
@@ -171,6 +171,13 @@ declare const _default: {
|
|
|
171
171
|
groupsToAdd: import("@frontegg/rest-api").ICreateSamlGroup[];
|
|
172
172
|
groupsToDelete: string[];
|
|
173
173
|
}, boolean>, string, never, never>;
|
|
174
|
+
updateSSOGroups: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<{
|
|
175
|
+
ssoConfigId: string;
|
|
176
|
+
changedGroups: import("@frontegg/rest-api").IUpdateSamlGroup[];
|
|
177
|
+
}, boolean>], import("../interfaces").WithCallback<{
|
|
178
|
+
ssoConfigId: string;
|
|
179
|
+
changedGroups: import("@frontegg/rest-api").IUpdateSamlGroup[];
|
|
180
|
+
}, boolean>, string, never, never>;
|
|
174
181
|
saveSSOConfigurationByMetadata: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<{
|
|
175
182
|
configFile: File;
|
|
176
183
|
}, import("@frontegg/rest-api/dist/auth/interfaces").ISSOConfiguration>], import("../interfaces").WithCallback<{
|
package/auth/index.js
CHANGED
|
@@ -204,6 +204,7 @@ const actions$b = {
|
|
|
204
204
|
validateSSODomainV2: createAction(`${authStoreName}/validateSSODomainV2`, (payload) => ({ payload })),
|
|
205
205
|
setSSODefaultRoles: createAction(`${authStoreName}/setSSODefaultRoles`, (payload) => ({ payload })),
|
|
206
206
|
setSSOGroups: createAction(`${authStoreName}/setSSOGroups`, (payload) => ({ payload })),
|
|
207
|
+
updateSSOGroups: createAction(`${authStoreName}/updateSSOGroups`, (payload) => ({ payload })),
|
|
207
208
|
saveSSOConfigurationByMetadata: createAction(`${authStoreName}/saveSSOConfigurationByMetadata`, (payload) => ({ payload })),
|
|
208
209
|
updateSSOConfigurationByMetadata: createAction(`${authStoreName}/updateSSOConfigurationByMetadata`, (payload) => ({ payload })),
|
|
209
210
|
loadSSOConfigurations: createAction(`${authStoreName}/loadSSOConfigurations`),
|
|
@@ -976,9 +977,16 @@ function* refreshToken() {
|
|
|
976
977
|
else {
|
|
977
978
|
yield put(actions.setTenantsState({ tenants, loading: false }));
|
|
978
979
|
yield put(actions.setState({ user, isAuthenticated: true }));
|
|
979
|
-
if ([
|
|
980
|
-
.
|
|
981
|
-
|
|
980
|
+
if ([
|
|
981
|
+
routes.loginUrl,
|
|
982
|
+
routes.socialLoginCallbackUrl,
|
|
983
|
+
routes.signUpUrl,
|
|
984
|
+
routes.oidcRedirectUrl,
|
|
985
|
+
routes.samlCallbackUrl,
|
|
986
|
+
].some((url) => url && window.location.pathname.endsWith(url))) {
|
|
987
|
+
if (loginState.isNewUser &&
|
|
988
|
+
routes.signUpSuccessUrl &&
|
|
989
|
+
routes.socialLoginCallbackUrl === window.location.pathname) {
|
|
982
990
|
onRedirectTo(routes.signUpSuccessUrl, { refresh: routes.signUpSuccessUrl.startsWith('http') });
|
|
983
991
|
}
|
|
984
992
|
else {
|
|
@@ -1173,14 +1181,14 @@ function* verifyInviteToken({ payload }) {
|
|
|
1173
1181
|
yield put(actions.setLoginState({ loading: false }));
|
|
1174
1182
|
}
|
|
1175
1183
|
}
|
|
1176
|
-
function* preLogin({ payload: { email, recaptchaToken, invitationToken, callback
|
|
1184
|
+
function* preLogin({ payload: { email, recaptchaToken, invitationToken, callback }, }) {
|
|
1177
1185
|
yield put(actions.setLoginState({ loading: true }));
|
|
1178
1186
|
try {
|
|
1179
1187
|
const onRedirectTo = yield select(({ auth: { onRedirectTo } }) => onRedirectTo);
|
|
1180
1188
|
let { address, idpType } = yield call(api.auth.preLoginV2, { email });
|
|
1181
1189
|
if (address) {
|
|
1182
1190
|
if (idpType === SamlVendors.Oidc && !address.includes('redirect_uri')) {
|
|
1183
|
-
const { routes: { oidcRedirectUrl } } = yield select(({ auth: { routes } }) => ({ routes }));
|
|
1191
|
+
const { routes: { oidcRedirectUrl }, } = yield select(({ auth: { routes } }) => ({ routes }));
|
|
1184
1192
|
address += `&redirect_uri=${window.location.origin}${oidcRedirectUrl}`;
|
|
1185
1193
|
}
|
|
1186
1194
|
yield put(actions.setLoginState({ step: LoginStep.redirectToSSO, loading: false, ssoRedirectUrl: address }));
|
|
@@ -1198,7 +1206,7 @@ function* preLogin({ payload: { email, recaptchaToken, invitationToken, callback
|
|
|
1198
1206
|
}
|
|
1199
1207
|
function* ssoPreloginFailed(_a) {
|
|
1200
1208
|
var { callback } = _a, body = __rest(_a, ["callback"]);
|
|
1201
|
-
const publicPolicy = yield select(({ auth: { securityPolicyState: { publicPolicy: { policy: publicPolicy } } } }) => publicPolicy);
|
|
1209
|
+
const publicPolicy = yield select(({ auth: { securityPolicyState: { publicPolicy: { policy: publicPolicy }, }, }, }) => publicPolicy);
|
|
1202
1210
|
if (!(publicPolicy === null || publicPolicy === void 0 ? void 0 : publicPolicy.authStrategy)) {
|
|
1203
1211
|
yield put(actions.setLoginState({ step: LoginStep.loginWithPassword, loading: false }));
|
|
1204
1212
|
callback === null || callback === void 0 ? void 0 : callback();
|
|
@@ -1236,7 +1244,7 @@ function* postLogin({ payload }) {
|
|
|
1236
1244
|
yield put(actions.setLoginState({ step: LoginStep.loginWithSSOFailed, loading: false }));
|
|
1237
1245
|
}
|
|
1238
1246
|
}
|
|
1239
|
-
function* login({ payload: { email, password, recaptchaToken, invitationToken, callback
|
|
1247
|
+
function* login({ payload: { email, password, recaptchaToken, invitationToken, callback }, }) {
|
|
1240
1248
|
yield put(actions.setLoginState({ loading: true }));
|
|
1241
1249
|
try {
|
|
1242
1250
|
const user = yield call(api.auth.login, {
|
|
@@ -1335,8 +1343,7 @@ function* logout({ payload }) {
|
|
|
1335
1343
|
try {
|
|
1336
1344
|
yield call(api.auth.logout);
|
|
1337
1345
|
}
|
|
1338
|
-
catch (_a) {
|
|
1339
|
-
}
|
|
1346
|
+
catch (_a) { }
|
|
1340
1347
|
yield put(actions.resetState());
|
|
1341
1348
|
yield put(actions.requestAuthorize(true));
|
|
1342
1349
|
payload === null || payload === void 0 ? void 0 : payload();
|
|
@@ -1345,8 +1352,7 @@ function* silentLogout({ payload }) {
|
|
|
1345
1352
|
try {
|
|
1346
1353
|
yield call(api.auth.logout);
|
|
1347
1354
|
}
|
|
1348
|
-
catch (_a) {
|
|
1349
|
-
}
|
|
1355
|
+
catch (_a) { }
|
|
1350
1356
|
setTimeout(() => payload === null || payload === void 0 ? void 0 : payload(), 500);
|
|
1351
1357
|
}
|
|
1352
1358
|
function* loginSagas() {
|
|
@@ -1922,6 +1928,19 @@ function* setSSOGroups({ payload: { groupsToAdd, groupsToDelete, ssoConfigId, ca
|
|
|
1922
1928
|
yield put(actions.setSSOLoader({ key: SSOStateKeys.SAVE_SSO_GROUPS, value: false }));
|
|
1923
1929
|
}
|
|
1924
1930
|
}
|
|
1931
|
+
function* updateSSOGroups({ payload: { ssoConfigId, changedGroups, callback } }) {
|
|
1932
|
+
try {
|
|
1933
|
+
yield all(changedGroups.map((group) => call(api.auth.updateSSOGroup, ssoConfigId, group)));
|
|
1934
|
+
callback === null || callback === void 0 ? void 0 : callback(true);
|
|
1935
|
+
}
|
|
1936
|
+
catch (error) {
|
|
1937
|
+
yield put(actions.setSSOError({ key: SSOStateKeys.SAVE_SSO_GROUPS, value: error.message }));
|
|
1938
|
+
callback === null || callback === void 0 ? void 0 : callback(null, error);
|
|
1939
|
+
}
|
|
1940
|
+
finally {
|
|
1941
|
+
yield put(actions.setSSOLoader({ key: SSOStateKeys.SAVE_SSO_GROUPS, value: false }));
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1925
1944
|
function* ssoSagas() {
|
|
1926
1945
|
yield takeEvery(actions.loadSSOConfigurationsV2, loadSSOConfigurationsV2);
|
|
1927
1946
|
yield takeEvery(actions.saveSSOConfigurationV2, saveSSOConfigurationV2);
|
|
@@ -1931,6 +1950,7 @@ function* ssoSagas() {
|
|
|
1931
1950
|
yield takeEvery(actions.updateSSOConfiguration, updateSSOConfiguration);
|
|
1932
1951
|
yield takeEvery(actions.deleteSSOConfiguration, deleteSSOConfiguration);
|
|
1933
1952
|
yield takeEvery(actions.setSSOGroups, setSSOGroups);
|
|
1953
|
+
yield takeEvery(actions.updateSSOGroups, updateSSOGroups);
|
|
1934
1954
|
yield takeEvery(actions.setSSODefaultRoles, setSSODefaultRoles);
|
|
1935
1955
|
yield takeEvery(actions.saveSSOConfigurationByMetadata, saveSSOConfigurationByMetadata);
|
|
1936
1956
|
yield takeEvery(actions.updateSSOConfigurationByMetadata, updateSSOConfigurationByMetadata);
|
package/auth/reducer.d.ts
CHANGED
|
@@ -144,6 +144,13 @@ declare const actions: {
|
|
|
144
144
|
groupsToAdd: import("@frontegg/rest-api").ICreateSamlGroup[];
|
|
145
145
|
groupsToDelete: string[];
|
|
146
146
|
}, boolean>, string, never, never>;
|
|
147
|
+
updateSSOGroups: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<{
|
|
148
|
+
ssoConfigId: string;
|
|
149
|
+
changedGroups: import("@frontegg/rest-api").IUpdateSamlGroup[];
|
|
150
|
+
}, boolean>], import("../interfaces").WithCallback<{
|
|
151
|
+
ssoConfigId: string;
|
|
152
|
+
changedGroups: import("@frontegg/rest-api").IUpdateSamlGroup[];
|
|
153
|
+
}, boolean>, string, never, never>;
|
|
147
154
|
saveSSOConfigurationByMetadata: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[import("../interfaces").WithCallback<{
|
|
148
155
|
configFile: File;
|
|
149
156
|
}, import("@frontegg/rest-api").ISSOConfiguration>], import("../interfaces").WithCallback<{
|
package/node/auth/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var auth_index = require('../index-
|
|
5
|
+
var auth_index = require('../index-60f5f9e5.js');
|
|
6
6
|
var constants = require('../constants-52e37c08.js');
|
|
7
7
|
var restApi = require('@frontegg/rest-api');
|
|
8
8
|
require('@reduxjs/toolkit');
|
|
@@ -213,6 +213,7 @@ const actions$b = {
|
|
|
213
213
|
validateSSODomainV2: toolkit.createAction(`${constants.authStoreName}/validateSSODomainV2`, (payload) => ({ payload })),
|
|
214
214
|
setSSODefaultRoles: toolkit.createAction(`${constants.authStoreName}/setSSODefaultRoles`, (payload) => ({ payload })),
|
|
215
215
|
setSSOGroups: toolkit.createAction(`${constants.authStoreName}/setSSOGroups`, (payload) => ({ payload })),
|
|
216
|
+
updateSSOGroups: toolkit.createAction(`${constants.authStoreName}/updateSSOGroups`, (payload) => ({ payload })),
|
|
216
217
|
saveSSOConfigurationByMetadata: toolkit.createAction(`${constants.authStoreName}/saveSSOConfigurationByMetadata`, (payload) => ({ payload })),
|
|
217
218
|
updateSSOConfigurationByMetadata: toolkit.createAction(`${constants.authStoreName}/updateSSOConfigurationByMetadata`, (payload) => ({ payload })),
|
|
218
219
|
loadSSOConfigurations: toolkit.createAction(`${constants.authStoreName}/loadSSOConfigurations`),
|
|
@@ -985,9 +986,16 @@ function* refreshToken() {
|
|
|
985
986
|
else {
|
|
986
987
|
yield effects.put(actions.setTenantsState({ tenants, loading: false }));
|
|
987
988
|
yield effects.put(actions.setState({ user, isAuthenticated: true }));
|
|
988
|
-
if ([
|
|
989
|
-
.
|
|
990
|
-
|
|
989
|
+
if ([
|
|
990
|
+
routes.loginUrl,
|
|
991
|
+
routes.socialLoginCallbackUrl,
|
|
992
|
+
routes.signUpUrl,
|
|
993
|
+
routes.oidcRedirectUrl,
|
|
994
|
+
routes.samlCallbackUrl,
|
|
995
|
+
].some((url) => url && window.location.pathname.endsWith(url))) {
|
|
996
|
+
if (loginState.isNewUser &&
|
|
997
|
+
routes.signUpSuccessUrl &&
|
|
998
|
+
routes.socialLoginCallbackUrl === window.location.pathname) {
|
|
991
999
|
onRedirectTo(routes.signUpSuccessUrl, { refresh: routes.signUpSuccessUrl.startsWith('http') });
|
|
992
1000
|
}
|
|
993
1001
|
else {
|
|
@@ -1182,14 +1190,14 @@ function* verifyInviteToken({ payload }) {
|
|
|
1182
1190
|
yield effects.put(actions.setLoginState({ loading: false }));
|
|
1183
1191
|
}
|
|
1184
1192
|
}
|
|
1185
|
-
function* preLogin({ payload: { email, recaptchaToken, invitationToken, callback
|
|
1193
|
+
function* preLogin({ payload: { email, recaptchaToken, invitationToken, callback }, }) {
|
|
1186
1194
|
yield effects.put(actions.setLoginState({ loading: true }));
|
|
1187
1195
|
try {
|
|
1188
1196
|
const onRedirectTo = yield effects.select(({ auth: { onRedirectTo } }) => onRedirectTo);
|
|
1189
1197
|
let { address, idpType } = yield effects.call(restApi.api.auth.preLoginV2, { email });
|
|
1190
1198
|
if (address) {
|
|
1191
1199
|
if (idpType === exports.SamlVendors.Oidc && !address.includes('redirect_uri')) {
|
|
1192
|
-
const { routes: { oidcRedirectUrl } } = yield effects.select(({ auth: { routes } }) => ({ routes }));
|
|
1200
|
+
const { routes: { oidcRedirectUrl }, } = yield effects.select(({ auth: { routes } }) => ({ routes }));
|
|
1193
1201
|
address += `&redirect_uri=${window.location.origin}${oidcRedirectUrl}`;
|
|
1194
1202
|
}
|
|
1195
1203
|
yield effects.put(actions.setLoginState({ step: exports.LoginStep.redirectToSSO, loading: false, ssoRedirectUrl: address }));
|
|
@@ -1207,7 +1215,7 @@ function* preLogin({ payload: { email, recaptchaToken, invitationToken, callback
|
|
|
1207
1215
|
}
|
|
1208
1216
|
function* ssoPreloginFailed(_a) {
|
|
1209
1217
|
var { callback } = _a, body = tslib.__rest(_a, ["callback"]);
|
|
1210
|
-
const publicPolicy = yield effects.select(({ auth: { securityPolicyState: { publicPolicy: { policy: publicPolicy } } } }) => publicPolicy);
|
|
1218
|
+
const publicPolicy = yield effects.select(({ auth: { securityPolicyState: { publicPolicy: { policy: publicPolicy }, }, }, }) => publicPolicy);
|
|
1211
1219
|
if (!(publicPolicy === null || publicPolicy === void 0 ? void 0 : publicPolicy.authStrategy)) {
|
|
1212
1220
|
yield effects.put(actions.setLoginState({ step: exports.LoginStep.loginWithPassword, loading: false }));
|
|
1213
1221
|
callback === null || callback === void 0 ? void 0 : callback();
|
|
@@ -1245,7 +1253,7 @@ function* postLogin({ payload }) {
|
|
|
1245
1253
|
yield effects.put(actions.setLoginState({ step: exports.LoginStep.loginWithSSOFailed, loading: false }));
|
|
1246
1254
|
}
|
|
1247
1255
|
}
|
|
1248
|
-
function* login({ payload: { email, password, recaptchaToken, invitationToken, callback
|
|
1256
|
+
function* login({ payload: { email, password, recaptchaToken, invitationToken, callback }, }) {
|
|
1249
1257
|
yield effects.put(actions.setLoginState({ loading: true }));
|
|
1250
1258
|
try {
|
|
1251
1259
|
const user = yield effects.call(restApi.api.auth.login, {
|
|
@@ -1344,8 +1352,7 @@ function* logout({ payload }) {
|
|
|
1344
1352
|
try {
|
|
1345
1353
|
yield effects.call(restApi.api.auth.logout);
|
|
1346
1354
|
}
|
|
1347
|
-
catch (_a) {
|
|
1348
|
-
}
|
|
1355
|
+
catch (_a) { }
|
|
1349
1356
|
yield effects.put(actions.resetState());
|
|
1350
1357
|
yield effects.put(actions.requestAuthorize(true));
|
|
1351
1358
|
payload === null || payload === void 0 ? void 0 : payload();
|
|
@@ -1354,8 +1361,7 @@ function* silentLogout({ payload }) {
|
|
|
1354
1361
|
try {
|
|
1355
1362
|
yield effects.call(restApi.api.auth.logout);
|
|
1356
1363
|
}
|
|
1357
|
-
catch (_a) {
|
|
1358
|
-
}
|
|
1364
|
+
catch (_a) { }
|
|
1359
1365
|
setTimeout(() => payload === null || payload === void 0 ? void 0 : payload(), 500);
|
|
1360
1366
|
}
|
|
1361
1367
|
function* loginSagas() {
|
|
@@ -1931,6 +1937,19 @@ function* setSSOGroups({ payload: { groupsToAdd, groupsToDelete, ssoConfigId, ca
|
|
|
1931
1937
|
yield effects.put(actions.setSSOLoader({ key: exports.SSOStateKeys.SAVE_SSO_GROUPS, value: false }));
|
|
1932
1938
|
}
|
|
1933
1939
|
}
|
|
1940
|
+
function* updateSSOGroups({ payload: { ssoConfigId, changedGroups, callback } }) {
|
|
1941
|
+
try {
|
|
1942
|
+
yield effects.all(changedGroups.map((group) => effects.call(restApi.api.auth.updateSSOGroup, ssoConfigId, group)));
|
|
1943
|
+
callback === null || callback === void 0 ? void 0 : callback(true);
|
|
1944
|
+
}
|
|
1945
|
+
catch (error) {
|
|
1946
|
+
yield effects.put(actions.setSSOError({ key: exports.SSOStateKeys.SAVE_SSO_GROUPS, value: error.message }));
|
|
1947
|
+
callback === null || callback === void 0 ? void 0 : callback(null, error);
|
|
1948
|
+
}
|
|
1949
|
+
finally {
|
|
1950
|
+
yield effects.put(actions.setSSOLoader({ key: exports.SSOStateKeys.SAVE_SSO_GROUPS, value: false }));
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
1934
1953
|
function* ssoSagas() {
|
|
1935
1954
|
yield effects.takeEvery(actions.loadSSOConfigurationsV2, loadSSOConfigurationsV2);
|
|
1936
1955
|
yield effects.takeEvery(actions.saveSSOConfigurationV2, saveSSOConfigurationV2);
|
|
@@ -1940,6 +1959,7 @@ function* ssoSagas() {
|
|
|
1940
1959
|
yield effects.takeEvery(actions.updateSSOConfiguration, updateSSOConfiguration);
|
|
1941
1960
|
yield effects.takeEvery(actions.deleteSSOConfiguration, deleteSSOConfiguration);
|
|
1942
1961
|
yield effects.takeEvery(actions.setSSOGroups, setSSOGroups);
|
|
1962
|
+
yield effects.takeEvery(actions.updateSSOGroups, updateSSOGroups);
|
|
1943
1963
|
yield effects.takeEvery(actions.setSSODefaultRoles, setSSODefaultRoles);
|
|
1944
1964
|
yield effects.takeEvery(actions.saveSSOConfigurationByMetadata, saveSSOConfigurationByMetadata);
|
|
1945
1965
|
yield effects.takeEvery(actions.updateSSOConfigurationByMetadata, updateSSOConfigurationByMetadata);
|
package/node/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var auth_index = require('./index-
|
|
5
|
+
var auth_index = require('./index-60f5f9e5.js');
|
|
6
6
|
var audits_index = require('./audits/index.js');
|
|
7
7
|
var connectivity_index = require('./connectivity/index.js');
|
|
8
8
|
var subscriptions_index = require('./subscriptions/index.js');
|
|
@@ -283,6 +283,7 @@ const planResponseMock = [
|
|
|
283
283
|
currency: 'usd',
|
|
284
284
|
amount: 10000,
|
|
285
285
|
},
|
|
286
|
+
slug: 'premium',
|
|
286
287
|
},
|
|
287
288
|
{
|
|
288
289
|
id: 'prod_J60duauCpXfcur',
|
|
@@ -295,6 +296,7 @@ const planResponseMock = [
|
|
|
295
296
|
currency: 'usd',
|
|
296
297
|
amount: 0,
|
|
297
298
|
},
|
|
299
|
+
slug: 'free',
|
|
298
300
|
},
|
|
299
301
|
];
|
|
300
302
|
const invoicesMock = [
|
|
@@ -480,6 +482,7 @@ function* loadSummaries(tenantId, forceActive) {
|
|
|
480
482
|
price: ((_a = planResponse.price) === null || _a === void 0 ? void 0 : _a.amount) || 0,
|
|
481
483
|
currency: ((_b = planResponse.price) === null || _b === void 0 ? void 0 : _b.currency) || 'usd',
|
|
482
484
|
recurringInterval: 'month',
|
|
485
|
+
slug: planResponse.slug,
|
|
483
486
|
},
|
|
484
487
|
}
|
|
485
488
|
: {}))));
|
|
@@ -761,6 +764,7 @@ function* loadPlans() {
|
|
|
761
764
|
price: ((_a = item.price) === null || _a === void 0 ? void 0 : _a.amount) || 0,
|
|
762
765
|
currency: ((_b = item.price) === null || _b === void 0 ? void 0 : _b.currency) || 'usd',
|
|
763
766
|
recurringInterval: 'month',
|
|
767
|
+
slug: item.slug,
|
|
764
768
|
});
|
|
765
769
|
});
|
|
766
770
|
yield effects.put(actions$8.setState({
|
package/node/toolkit/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var auth_index = require('../index-
|
|
5
|
+
var auth_index = require('../index-60f5f9e5.js');
|
|
6
6
|
var toolkit = require('@reduxjs/toolkit');
|
|
7
7
|
var createSagaMiddleware = require('redux-saga');
|
|
8
8
|
var effects = require('redux-saga/effects');
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/redux-store",
|
|
3
3
|
"libName": "FronteggReduxStore",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.51.0",
|
|
5
5
|
"author": "Frontegg LTD",
|
|
6
6
|
"main": "./node/index.js",
|
|
7
7
|
"module": "./index.js",
|
|
8
8
|
"types": "./index.d.ts",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@frontegg/rest-api": "2.10.
|
|
10
|
+
"@frontegg/rest-api": "2.10.67",
|
|
11
11
|
"@reduxjs/toolkit": "^1.5.0",
|
|
12
12
|
"redux-saga": "^1.1.0",
|
|
13
13
|
"tslib": "^2.3.1",
|
package/subscriptions/index.js
CHANGED
|
@@ -280,6 +280,7 @@ const planResponseMock = [
|
|
|
280
280
|
currency: 'usd',
|
|
281
281
|
amount: 10000,
|
|
282
282
|
},
|
|
283
|
+
slug: 'premium',
|
|
283
284
|
},
|
|
284
285
|
{
|
|
285
286
|
id: 'prod_J60duauCpXfcur',
|
|
@@ -292,6 +293,7 @@ const planResponseMock = [
|
|
|
292
293
|
currency: 'usd',
|
|
293
294
|
amount: 0,
|
|
294
295
|
},
|
|
296
|
+
slug: 'free',
|
|
295
297
|
},
|
|
296
298
|
];
|
|
297
299
|
const invoicesMock = [
|
|
@@ -477,6 +479,7 @@ function* loadSummaries(tenantId, forceActive) {
|
|
|
477
479
|
price: ((_a = planResponse.price) === null || _a === void 0 ? void 0 : _a.amount) || 0,
|
|
478
480
|
currency: ((_b = planResponse.price) === null || _b === void 0 ? void 0 : _b.currency) || 'usd',
|
|
479
481
|
recurringInterval: 'month',
|
|
482
|
+
slug: planResponse.slug,
|
|
480
483
|
},
|
|
481
484
|
}
|
|
482
485
|
: {}))));
|
|
@@ -758,6 +761,7 @@ function* loadPlans() {
|
|
|
758
761
|
price: ((_a = item.price) === null || _a === void 0 ? void 0 : _a.amount) || 0,
|
|
759
762
|
currency: ((_b = item.price) === null || _b === void 0 ? void 0 : _b.currency) || 'usd',
|
|
760
763
|
recurringInterval: 'month',
|
|
764
|
+
slug: item.slug,
|
|
761
765
|
});
|
|
762
766
|
});
|
|
763
767
|
yield put(actions$8.setState({
|