@frontegg/react-hooks 7.0.0-alpha.1 → 7.0.0-alpha.3
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/FronteggProvider/FronteggProvider.d.ts +12 -0
- package/FronteggProvider/FronteggProvider.js +140 -0
- package/FronteggProvider/index.d.ts +1 -12
- package/FronteggProvider/index.js +1 -133
- package/FronteggStoreContext/FronteggStoreContext.d.ts +9 -0
- package/FronteggStoreContext/FronteggStoreContext.js +16 -0
- package/FronteggStoreContext/index.d.ts +1 -13
- package/FronteggStoreContext/index.js +1 -14
- package/audits/auditLogs.d.ts +2 -4
- package/audits/auditLogs.js +8 -6
- package/audits/auditsMetadata.d.ts +2 -4
- package/audits/auditsMetadata.js +8 -6
- package/audits/hooks.d.ts +0 -8
- package/audits/hooks.js +6 -30
- package/auth/acceptInvitation.js +10 -5
- package/auth/activateAccount.js +10 -4
- package/auth/{MSP/allAccounts.d.ts → allAccounts.d.ts} +2 -4
- package/auth/allAccounts.js +20 -0
- package/auth/apiTokens.d.ts +0 -2
- package/auth/apiTokens.js +8 -6
- package/auth/applications.d.ts +3 -0
- package/auth/applications.js +9 -0
- package/auth/customLogin.d.ts +2 -5
- package/auth/customLogin.js +10 -11
- package/auth/entitlements.d.ts +32 -13
- package/auth/entitlements.js +103 -21
- package/auth/forgotPassword.d.ts +0 -2
- package/auth/forgotPassword.js +8 -6
- package/auth/groups.d.ts +0 -4
- package/auth/groups.js +12 -13
- package/auth/hooks.d.ts +44 -12
- package/auth/hooks.js +73 -62
- package/auth/impersonate.d.ts +0 -2
- package/auth/impersonate.js +7 -6
- package/auth/index.d.ts +16 -16
- package/auth/index.js +16 -16
- package/auth/login.d.ts +1 -3
- package/auth/login.js +7 -6
- package/auth/mfa.d.ts +1 -1
- package/auth/mfa.js +13 -4
- package/auth/passkeys.d.ts +1 -4
- package/auth/passkeys.js +7 -6
- package/auth/profile.d.ts +2 -4
- package/auth/profile.js +9 -8
- package/auth/provisioning.d.ts +1 -3
- package/auth/provisioning.js +7 -6
- package/auth/resetPhoneNumber.d.ts +1 -3
- package/auth/resetPhoneNumber.js +7 -6
- package/auth/roles.d.ts +1 -3
- package/auth/roles.js +7 -6
- package/auth/security/index.d.ts +4 -0
- package/auth/security/index.js +4 -0
- package/auth/security/restrictions.d.ts +0 -2
- package/auth/security/restrictions.js +10 -10
- package/auth/security/securityCenter.d.ts +1 -4
- package/auth/security/securityCenter.js +8 -6
- package/auth/security/securityPolicy.d.ts +5 -11
- package/auth/security/securityPolicy.js +19 -30
- package/auth/security/sessionsPolicy.d.ts +1 -3
- package/auth/security/sessionsPolicy.js +8 -6
- package/auth/sessions.d.ts +1 -3
- package/auth/sessions.js +7 -6
- package/auth/signup.d.ts +1 -1
- package/auth/signup.js +13 -4
- package/auth/sms.d.ts +3 -0
- package/auth/sms.js +8 -0
- package/auth/socialLogin.d.ts +1 -1
- package/auth/socialLogin.js +10 -4
- package/auth/sso.d.ts +1 -1
- package/auth/sso.js +10 -4
- package/auth/stepUp.d.ts +16 -0
- package/auth/stepUp.js +51 -0
- package/auth/team.d.ts +9 -1
- package/auth/team.js +22 -4
- package/auth/tenants.d.ts +1 -3
- package/auth/tenants.js +8 -6
- package/common/CustomComponentHolder.js +3 -1
- package/common/index.d.ts +1 -0
- package/common/index.js +3 -3
- package/connectivity/hooks.d.ts +2 -5
- package/connectivity/hooks.js +6 -9
- package/index.d.ts +2 -2
- package/index.js +3 -3
- package/node/FronteggProvider/FronteggProvider.js +148 -0
- package/node/FronteggProvider/index.js +9 -134
- package/node/FronteggStoreContext/FronteggStoreContext.js +28 -0
- package/node/FronteggStoreContext/index.js +11 -35
- package/node/audits/auditLogs.js +8 -6
- package/node/audits/auditsMetadata.js +8 -6
- package/node/audits/hooks.js +7 -34
- package/node/auth/acceptInvitation.js +7 -5
- package/node/auth/activateAccount.js +7 -4
- package/node/auth/allAccounts.js +27 -0
- package/node/auth/apiTokens.js +8 -6
- package/node/auth/applications.js +17 -0
- package/node/auth/customLogin.js +11 -12
- package/node/auth/entitlements.js +106 -22
- package/node/auth/forgotPassword.js +8 -6
- package/node/auth/groups.js +12 -12
- package/node/auth/hooks.js +77 -67
- package/node/auth/impersonate.js +7 -6
- package/node/auth/index.js +107 -93
- package/node/auth/login.js +7 -6
- package/node/auth/mfa.js +10 -4
- package/node/auth/passkeys.js +7 -6
- package/node/auth/profile.js +10 -9
- package/node/auth/provisioning.js +7 -6
- package/node/auth/resetPhoneNumber.js +7 -6
- package/node/auth/roles.js +7 -6
- package/node/auth/security/index.js +49 -0
- package/node/auth/security/restrictions.js +10 -10
- package/node/auth/security/securityCenter.js +8 -6
- package/node/auth/security/securityPolicy.js +16 -30
- package/node/auth/security/sessionsPolicy.js +8 -6
- package/node/auth/sessions.js +7 -6
- package/node/auth/signup.js +10 -4
- package/node/auth/sms.js +16 -0
- package/node/auth/socialLogin.js +7 -4
- package/node/auth/sso.js +7 -4
- package/node/auth/stepUp.js +62 -0
- package/node/auth/team.js +25 -4
- package/node/auth/tenants.js +8 -6
- package/node/common/CustomComponentHolder.js +3 -1
- package/node/common/index.js +2 -2
- package/node/connectivity/hooks.js +5 -8
- package/node/index.js +16 -16
- package/node/subscriptions/hooks.js +84 -51
- package/node/tests/hooks.tsc-test.js +339 -0
- package/node/useSnapshot/index.js +137 -0
- package/node/vendor/hooks.js +5 -6
- package/package.json +3 -3
- package/subscriptions/hooks.d.ts +32 -10
- package/subscriptions/hooks.js +81 -49
- package/tests/hooks.tsc-test.js +338 -0
- package/useSnapshot/index.d.ts +78 -0
- package/useSnapshot/index.js +128 -0
- package/useSnapshot/package.json +6 -0
- package/vendor/hooks.d.ts +0 -1
- package/vendor/hooks.js +9 -7
- package/auth/MSP/allAccounts.js +0 -15
- package/node/auth/MSP/allAccounts.js +0 -24
package/node/auth/index.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
|
+
useAuthState: true,
|
|
7
8
|
useAuth: true,
|
|
8
9
|
useAuthActions: true,
|
|
9
10
|
useOnRedirectTo: true,
|
|
@@ -11,7 +12,8 @@ var _exportNames = {
|
|
|
11
12
|
useIsAuthenticated: true,
|
|
12
13
|
useAuthUser: true,
|
|
13
14
|
useAuthUserOrNull: true,
|
|
14
|
-
useLoginWithRedirect: true
|
|
15
|
+
useLoginWithRedirect: true,
|
|
16
|
+
useLoginWithRedirectV2: true
|
|
15
17
|
};
|
|
16
18
|
Object.defineProperty(exports, "useAuth", {
|
|
17
19
|
enumerable: true,
|
|
@@ -31,6 +33,12 @@ Object.defineProperty(exports, "useAuthRoutes", {
|
|
|
31
33
|
return _hooks.useAuthRoutes;
|
|
32
34
|
}
|
|
33
35
|
});
|
|
36
|
+
Object.defineProperty(exports, "useAuthState", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _hooks.useAuthState;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
34
42
|
Object.defineProperty(exports, "useAuthUser", {
|
|
35
43
|
enumerable: true,
|
|
36
44
|
get: function () {
|
|
@@ -55,6 +63,12 @@ Object.defineProperty(exports, "useLoginWithRedirect", {
|
|
|
55
63
|
return _hooks.useLoginWithRedirect;
|
|
56
64
|
}
|
|
57
65
|
});
|
|
66
|
+
Object.defineProperty(exports, "useLoginWithRedirectV2", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _hooks.useLoginWithRedirectV2;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
58
72
|
Object.defineProperty(exports, "useOnRedirectTo", {
|
|
59
73
|
enumerable: true,
|
|
60
74
|
get: function () {
|
|
@@ -86,6 +100,18 @@ Object.keys(_activateAccount).forEach(function (key) {
|
|
|
86
100
|
}
|
|
87
101
|
});
|
|
88
102
|
});
|
|
103
|
+
var _allAccounts = require("./allAccounts");
|
|
104
|
+
Object.keys(_allAccounts).forEach(function (key) {
|
|
105
|
+
if (key === "default" || key === "__esModule") return;
|
|
106
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
107
|
+
if (key in exports && exports[key] === _allAccounts[key]) return;
|
|
108
|
+
Object.defineProperty(exports, key, {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () {
|
|
111
|
+
return _allAccounts[key];
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
});
|
|
89
115
|
var _apiTokens = require("./apiTokens");
|
|
90
116
|
Object.keys(_apiTokens).forEach(function (key) {
|
|
91
117
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -98,135 +124,135 @@ Object.keys(_apiTokens).forEach(function (key) {
|
|
|
98
124
|
}
|
|
99
125
|
});
|
|
100
126
|
});
|
|
101
|
-
var
|
|
102
|
-
Object.keys(
|
|
127
|
+
var _customLogin = require("./customLogin");
|
|
128
|
+
Object.keys(_customLogin).forEach(function (key) {
|
|
103
129
|
if (key === "default" || key === "__esModule") return;
|
|
104
130
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
105
|
-
if (key in exports && exports[key] ===
|
|
131
|
+
if (key in exports && exports[key] === _customLogin[key]) return;
|
|
106
132
|
Object.defineProperty(exports, key, {
|
|
107
133
|
enumerable: true,
|
|
108
134
|
get: function () {
|
|
109
|
-
return
|
|
135
|
+
return _customLogin[key];
|
|
110
136
|
}
|
|
111
137
|
});
|
|
112
138
|
});
|
|
113
|
-
var
|
|
114
|
-
Object.keys(
|
|
139
|
+
var _entitlements = require("./entitlements");
|
|
140
|
+
Object.keys(_entitlements).forEach(function (key) {
|
|
115
141
|
if (key === "default" || key === "__esModule") return;
|
|
116
142
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
117
|
-
if (key in exports && exports[key] ===
|
|
143
|
+
if (key in exports && exports[key] === _entitlements[key]) return;
|
|
118
144
|
Object.defineProperty(exports, key, {
|
|
119
145
|
enumerable: true,
|
|
120
146
|
get: function () {
|
|
121
|
-
return
|
|
147
|
+
return _entitlements[key];
|
|
122
148
|
}
|
|
123
149
|
});
|
|
124
150
|
});
|
|
125
|
-
var
|
|
126
|
-
Object.keys(
|
|
151
|
+
var _forgotPassword = require("./forgotPassword");
|
|
152
|
+
Object.keys(_forgotPassword).forEach(function (key) {
|
|
127
153
|
if (key === "default" || key === "__esModule") return;
|
|
128
154
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
129
|
-
if (key in exports && exports[key] ===
|
|
155
|
+
if (key in exports && exports[key] === _forgotPassword[key]) return;
|
|
130
156
|
Object.defineProperty(exports, key, {
|
|
131
157
|
enumerable: true,
|
|
132
158
|
get: function () {
|
|
133
|
-
return
|
|
159
|
+
return _forgotPassword[key];
|
|
134
160
|
}
|
|
135
161
|
});
|
|
136
162
|
});
|
|
137
|
-
var
|
|
138
|
-
Object.keys(
|
|
163
|
+
var _groups = require("./groups");
|
|
164
|
+
Object.keys(_groups).forEach(function (key) {
|
|
139
165
|
if (key === "default" || key === "__esModule") return;
|
|
140
166
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
141
|
-
if (key in exports && exports[key] ===
|
|
167
|
+
if (key in exports && exports[key] === _groups[key]) return;
|
|
142
168
|
Object.defineProperty(exports, key, {
|
|
143
169
|
enumerable: true,
|
|
144
170
|
get: function () {
|
|
145
|
-
return
|
|
171
|
+
return _groups[key];
|
|
146
172
|
}
|
|
147
173
|
});
|
|
148
174
|
});
|
|
149
|
-
var
|
|
150
|
-
Object.keys(
|
|
175
|
+
var _impersonate = require("./impersonate");
|
|
176
|
+
Object.keys(_impersonate).forEach(function (key) {
|
|
151
177
|
if (key === "default" || key === "__esModule") return;
|
|
152
178
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
153
|
-
if (key in exports && exports[key] ===
|
|
179
|
+
if (key in exports && exports[key] === _impersonate[key]) return;
|
|
154
180
|
Object.defineProperty(exports, key, {
|
|
155
181
|
enumerable: true,
|
|
156
182
|
get: function () {
|
|
157
|
-
return
|
|
183
|
+
return _impersonate[key];
|
|
158
184
|
}
|
|
159
185
|
});
|
|
160
186
|
});
|
|
161
|
-
var
|
|
162
|
-
Object.keys(
|
|
187
|
+
var _login = require("./login");
|
|
188
|
+
Object.keys(_login).forEach(function (key) {
|
|
163
189
|
if (key === "default" || key === "__esModule") return;
|
|
164
190
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
165
|
-
if (key in exports && exports[key] ===
|
|
191
|
+
if (key in exports && exports[key] === _login[key]) return;
|
|
166
192
|
Object.defineProperty(exports, key, {
|
|
167
193
|
enumerable: true,
|
|
168
194
|
get: function () {
|
|
169
|
-
return
|
|
195
|
+
return _login[key];
|
|
170
196
|
}
|
|
171
197
|
});
|
|
172
198
|
});
|
|
173
|
-
var
|
|
174
|
-
Object.keys(
|
|
199
|
+
var _mfa = require("./mfa");
|
|
200
|
+
Object.keys(_mfa).forEach(function (key) {
|
|
175
201
|
if (key === "default" || key === "__esModule") return;
|
|
176
202
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
177
|
-
if (key in exports && exports[key] ===
|
|
203
|
+
if (key in exports && exports[key] === _mfa[key]) return;
|
|
178
204
|
Object.defineProperty(exports, key, {
|
|
179
205
|
enumerable: true,
|
|
180
206
|
get: function () {
|
|
181
|
-
return
|
|
207
|
+
return _mfa[key];
|
|
182
208
|
}
|
|
183
209
|
});
|
|
184
210
|
});
|
|
185
|
-
var
|
|
186
|
-
Object.keys(
|
|
211
|
+
var _passkeys = require("./passkeys");
|
|
212
|
+
Object.keys(_passkeys).forEach(function (key) {
|
|
187
213
|
if (key === "default" || key === "__esModule") return;
|
|
188
214
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
189
|
-
if (key in exports && exports[key] ===
|
|
215
|
+
if (key in exports && exports[key] === _passkeys[key]) return;
|
|
190
216
|
Object.defineProperty(exports, key, {
|
|
191
217
|
enumerable: true,
|
|
192
218
|
get: function () {
|
|
193
|
-
return
|
|
219
|
+
return _passkeys[key];
|
|
194
220
|
}
|
|
195
221
|
});
|
|
196
222
|
});
|
|
197
|
-
var
|
|
198
|
-
Object.keys(
|
|
223
|
+
var _profile = require("./profile");
|
|
224
|
+
Object.keys(_profile).forEach(function (key) {
|
|
199
225
|
if (key === "default" || key === "__esModule") return;
|
|
200
226
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
201
|
-
if (key in exports && exports[key] ===
|
|
227
|
+
if (key in exports && exports[key] === _profile[key]) return;
|
|
202
228
|
Object.defineProperty(exports, key, {
|
|
203
229
|
enumerable: true,
|
|
204
230
|
get: function () {
|
|
205
|
-
return
|
|
231
|
+
return _profile[key];
|
|
206
232
|
}
|
|
207
233
|
});
|
|
208
234
|
});
|
|
209
|
-
var
|
|
210
|
-
Object.keys(
|
|
235
|
+
var _provisioning = require("./provisioning");
|
|
236
|
+
Object.keys(_provisioning).forEach(function (key) {
|
|
211
237
|
if (key === "default" || key === "__esModule") return;
|
|
212
238
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
213
|
-
if (key in exports && exports[key] ===
|
|
239
|
+
if (key in exports && exports[key] === _provisioning[key]) return;
|
|
214
240
|
Object.defineProperty(exports, key, {
|
|
215
241
|
enumerable: true,
|
|
216
242
|
get: function () {
|
|
217
|
-
return
|
|
243
|
+
return _provisioning[key];
|
|
218
244
|
}
|
|
219
245
|
});
|
|
220
246
|
});
|
|
221
|
-
var
|
|
222
|
-
Object.keys(
|
|
247
|
+
var _resetPhoneNumber = require("./resetPhoneNumber");
|
|
248
|
+
Object.keys(_resetPhoneNumber).forEach(function (key) {
|
|
223
249
|
if (key === "default" || key === "__esModule") return;
|
|
224
250
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
225
|
-
if (key in exports && exports[key] ===
|
|
251
|
+
if (key in exports && exports[key] === _resetPhoneNumber[key]) return;
|
|
226
252
|
Object.defineProperty(exports, key, {
|
|
227
253
|
enumerable: true,
|
|
228
254
|
get: function () {
|
|
229
|
-
return
|
|
255
|
+
return _resetPhoneNumber[key];
|
|
230
256
|
}
|
|
231
257
|
});
|
|
232
258
|
});
|
|
@@ -254,123 +280,111 @@ Object.keys(_sessions).forEach(function (key) {
|
|
|
254
280
|
}
|
|
255
281
|
});
|
|
256
282
|
});
|
|
257
|
-
var
|
|
258
|
-
Object.keys(
|
|
259
|
-
if (key === "default" || key === "__esModule") return;
|
|
260
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
261
|
-
if (key in exports && exports[key] === _sessionsPolicy[key]) return;
|
|
262
|
-
Object.defineProperty(exports, key, {
|
|
263
|
-
enumerable: true,
|
|
264
|
-
get: function () {
|
|
265
|
-
return _sessionsPolicy[key];
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
});
|
|
269
|
-
var _restrictions = require("./security/restrictions");
|
|
270
|
-
Object.keys(_restrictions).forEach(function (key) {
|
|
283
|
+
var _signup = require("./signup");
|
|
284
|
+
Object.keys(_signup).forEach(function (key) {
|
|
271
285
|
if (key === "default" || key === "__esModule") return;
|
|
272
286
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
273
|
-
if (key in exports && exports[key] ===
|
|
287
|
+
if (key in exports && exports[key] === _signup[key]) return;
|
|
274
288
|
Object.defineProperty(exports, key, {
|
|
275
289
|
enumerable: true,
|
|
276
290
|
get: function () {
|
|
277
|
-
return
|
|
291
|
+
return _signup[key];
|
|
278
292
|
}
|
|
279
293
|
});
|
|
280
294
|
});
|
|
281
|
-
var
|
|
282
|
-
Object.keys(
|
|
295
|
+
var _sms = require("./sms");
|
|
296
|
+
Object.keys(_sms).forEach(function (key) {
|
|
283
297
|
if (key === "default" || key === "__esModule") return;
|
|
284
298
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
285
|
-
if (key in exports && exports[key] ===
|
|
299
|
+
if (key in exports && exports[key] === _sms[key]) return;
|
|
286
300
|
Object.defineProperty(exports, key, {
|
|
287
301
|
enumerable: true,
|
|
288
302
|
get: function () {
|
|
289
|
-
return
|
|
303
|
+
return _sms[key];
|
|
290
304
|
}
|
|
291
305
|
});
|
|
292
306
|
});
|
|
293
|
-
var
|
|
294
|
-
Object.keys(
|
|
307
|
+
var _socialLogin = require("./socialLogin");
|
|
308
|
+
Object.keys(_socialLogin).forEach(function (key) {
|
|
295
309
|
if (key === "default" || key === "__esModule") return;
|
|
296
310
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
297
|
-
if (key in exports && exports[key] ===
|
|
311
|
+
if (key in exports && exports[key] === _socialLogin[key]) return;
|
|
298
312
|
Object.defineProperty(exports, key, {
|
|
299
313
|
enumerable: true,
|
|
300
314
|
get: function () {
|
|
301
|
-
return
|
|
315
|
+
return _socialLogin[key];
|
|
302
316
|
}
|
|
303
317
|
});
|
|
304
318
|
});
|
|
305
|
-
var
|
|
306
|
-
Object.keys(
|
|
319
|
+
var _sso = require("./sso");
|
|
320
|
+
Object.keys(_sso).forEach(function (key) {
|
|
307
321
|
if (key === "default" || key === "__esModule") return;
|
|
308
322
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
309
|
-
if (key in exports && exports[key] ===
|
|
323
|
+
if (key in exports && exports[key] === _sso[key]) return;
|
|
310
324
|
Object.defineProperty(exports, key, {
|
|
311
325
|
enumerable: true,
|
|
312
326
|
get: function () {
|
|
313
|
-
return
|
|
327
|
+
return _sso[key];
|
|
314
328
|
}
|
|
315
329
|
});
|
|
316
330
|
});
|
|
317
|
-
var
|
|
318
|
-
Object.keys(
|
|
331
|
+
var _stepUp = require("./stepUp");
|
|
332
|
+
Object.keys(_stepUp).forEach(function (key) {
|
|
319
333
|
if (key === "default" || key === "__esModule") return;
|
|
320
334
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
321
|
-
if (key in exports && exports[key] ===
|
|
335
|
+
if (key in exports && exports[key] === _stepUp[key]) return;
|
|
322
336
|
Object.defineProperty(exports, key, {
|
|
323
337
|
enumerable: true,
|
|
324
338
|
get: function () {
|
|
325
|
-
return
|
|
339
|
+
return _stepUp[key];
|
|
326
340
|
}
|
|
327
341
|
});
|
|
328
342
|
});
|
|
329
|
-
var
|
|
330
|
-
Object.keys(
|
|
343
|
+
var _team = require("./team");
|
|
344
|
+
Object.keys(_team).forEach(function (key) {
|
|
331
345
|
if (key === "default" || key === "__esModule") return;
|
|
332
346
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
333
|
-
if (key in exports && exports[key] ===
|
|
347
|
+
if (key in exports && exports[key] === _team[key]) return;
|
|
334
348
|
Object.defineProperty(exports, key, {
|
|
335
349
|
enumerable: true,
|
|
336
350
|
get: function () {
|
|
337
|
-
return
|
|
351
|
+
return _team[key];
|
|
338
352
|
}
|
|
339
353
|
});
|
|
340
354
|
});
|
|
341
|
-
var
|
|
342
|
-
Object.keys(
|
|
355
|
+
var _security = require("./security");
|
|
356
|
+
Object.keys(_security).forEach(function (key) {
|
|
343
357
|
if (key === "default" || key === "__esModule") return;
|
|
344
358
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
345
|
-
if (key in exports && exports[key] ===
|
|
359
|
+
if (key in exports && exports[key] === _security[key]) return;
|
|
346
360
|
Object.defineProperty(exports, key, {
|
|
347
361
|
enumerable: true,
|
|
348
362
|
get: function () {
|
|
349
|
-
return
|
|
363
|
+
return _security[key];
|
|
350
364
|
}
|
|
351
365
|
});
|
|
352
366
|
});
|
|
353
|
-
var
|
|
354
|
-
Object.keys(
|
|
367
|
+
var _tenants = require("./tenants");
|
|
368
|
+
Object.keys(_tenants).forEach(function (key) {
|
|
355
369
|
if (key === "default" || key === "__esModule") return;
|
|
356
370
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
357
|
-
if (key in exports && exports[key] ===
|
|
371
|
+
if (key in exports && exports[key] === _tenants[key]) return;
|
|
358
372
|
Object.defineProperty(exports, key, {
|
|
359
373
|
enumerable: true,
|
|
360
374
|
get: function () {
|
|
361
|
-
return
|
|
375
|
+
return _tenants[key];
|
|
362
376
|
}
|
|
363
377
|
});
|
|
364
378
|
});
|
|
365
|
-
var
|
|
366
|
-
Object.keys(
|
|
379
|
+
var _applications = require("./applications");
|
|
380
|
+
Object.keys(_applications).forEach(function (key) {
|
|
367
381
|
if (key === "default" || key === "__esModule") return;
|
|
368
382
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
369
|
-
if (key in exports && exports[key] ===
|
|
383
|
+
if (key in exports && exports[key] === _applications[key]) return;
|
|
370
384
|
Object.defineProperty(exports, key, {
|
|
371
385
|
enumerable: true,
|
|
372
386
|
get: function () {
|
|
373
|
-
return
|
|
387
|
+
return _applications[key];
|
|
374
388
|
}
|
|
375
389
|
});
|
|
376
390
|
});
|
package/node/auth/login.js
CHANGED
|
@@ -5,11 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useLoginActions = void 0;
|
|
7
7
|
exports.useLoginState = useLoginState;
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return (0, _hooks.stateHookGenerator)(stateMapper, 'loginState');
|
|
8
|
+
var _useSnapshot = require("../useSnapshot");
|
|
9
|
+
var _FronteggStoreContext = require("../FronteggStoreContext");
|
|
10
|
+
function useLoginState() {
|
|
11
|
+
return (0, _useSnapshot.useSnapshot)((0, _FronteggStoreContext.useStore)().store.auth.loginState);
|
|
13
12
|
}
|
|
14
|
-
const useLoginActions = () =>
|
|
13
|
+
const useLoginActions = () => {
|
|
14
|
+
return (0, _FronteggStoreContext.useStore)().stateActions.auth.loginActions;
|
|
15
|
+
};
|
|
15
16
|
exports.useLoginActions = useLoginActions;
|
package/node/auth/mfa.js
CHANGED
|
@@ -5,11 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useMfaActions = void 0;
|
|
7
7
|
exports.useMfaState = useMfaState;
|
|
8
|
-
var
|
|
9
|
-
var
|
|
8
|
+
var _useSnapshot = require("../useSnapshot");
|
|
9
|
+
var _FronteggStoreContext = require("../FronteggStoreContext");
|
|
10
10
|
const defaultMapper = state => state;
|
|
11
|
+
// @deprecated use useMfaState() instead
|
|
11
12
|
function useMfaState(stateMapper = defaultMapper) {
|
|
12
|
-
|
|
13
|
+
const {
|
|
14
|
+
mfaState
|
|
15
|
+
} = (0, _FronteggStoreContext.useStore)().store.auth;
|
|
16
|
+
return stateMapper((0, _useSnapshot.useSnapshot)(mfaState));
|
|
13
17
|
}
|
|
14
|
-
const useMfaActions = () =>
|
|
18
|
+
const useMfaActions = () => {
|
|
19
|
+
return (0, _FronteggStoreContext.useStore)().stateActions.auth.mfaActions;
|
|
20
|
+
};
|
|
15
21
|
exports.useMfaActions = useMfaActions;
|
package/node/auth/passkeys.js
CHANGED
|
@@ -5,11 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.usePasskeysActions = void 0;
|
|
7
7
|
exports.usePasskeysState = usePasskeysState;
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return (0, _hooks.stateHookGenerator)(stateMapper, 'passkeysState');
|
|
8
|
+
var _useSnapshot = require("../useSnapshot");
|
|
9
|
+
var _FronteggStoreContext = require("../FronteggStoreContext");
|
|
10
|
+
function usePasskeysState() {
|
|
11
|
+
return (0, _useSnapshot.useSnapshot)((0, _FronteggStoreContext.useStore)().store.auth.passkeysState);
|
|
13
12
|
}
|
|
14
|
-
const usePasskeysActions = () =>
|
|
13
|
+
const usePasskeysActions = () => {
|
|
14
|
+
return (0, _FronteggStoreContext.useStore)().stateActions.auth.passkeysActions;
|
|
15
|
+
};
|
|
15
16
|
exports.usePasskeysActions = usePasskeysActions;
|
package/node/auth/profile.js
CHANGED
|
@@ -6,8 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useProfileActions = exports.reloadProfileIfNeeded = void 0;
|
|
7
7
|
exports.useProfileState = useProfileState;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var
|
|
10
|
-
var
|
|
9
|
+
var _useSnapshot = require("../useSnapshot");
|
|
10
|
+
var _FronteggStoreContext = require("../FronteggStoreContext");
|
|
11
|
+
function useProfileState() {
|
|
12
|
+
return (0, _useSnapshot.useSnapshot)((0, _FronteggStoreContext.useStore)().store.auth.profileState);
|
|
13
|
+
}
|
|
14
|
+
const useProfileActions = () => {
|
|
15
|
+
return (0, _FronteggStoreContext.useStore)().stateActions.auth.profileActions;
|
|
16
|
+
};
|
|
17
|
+
exports.useProfileActions = useProfileActions;
|
|
11
18
|
const reloadProfileIfNeeded = () => {
|
|
12
19
|
const {
|
|
13
20
|
loading
|
|
@@ -19,10 +26,4 @@ const reloadProfileIfNeeded = () => {
|
|
|
19
26
|
!loading && loadProfile();
|
|
20
27
|
}, []);
|
|
21
28
|
};
|
|
22
|
-
exports.reloadProfileIfNeeded = reloadProfileIfNeeded;
|
|
23
|
-
const defaultMapper = state => state;
|
|
24
|
-
function useProfileState(stateMapper = defaultMapper) {
|
|
25
|
-
return (0, _hooks.stateHookGenerator)(stateMapper, 'profileState');
|
|
26
|
-
}
|
|
27
|
-
const useProfileActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.profileActions, _reduxStore.profileReducers);
|
|
28
|
-
exports.useProfileActions = useProfileActions;
|
|
29
|
+
exports.reloadProfileIfNeeded = reloadProfileIfNeeded;
|
|
@@ -5,11 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useProvisioningActions = void 0;
|
|
7
7
|
exports.useProvisioningState = useProvisioningState;
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return (0, _hooks.stateHookGenerator)(stateMapper, 'provisioningState');
|
|
8
|
+
var _useSnapshot = require("../useSnapshot");
|
|
9
|
+
var _FronteggStoreContext = require("../FronteggStoreContext");
|
|
10
|
+
function useProvisioningState() {
|
|
11
|
+
return (0, _useSnapshot.useSnapshot)((0, _FronteggStoreContext.useStore)().store.auth.provisioningState);
|
|
13
12
|
}
|
|
14
|
-
const useProvisioningActions = () =>
|
|
13
|
+
const useProvisioningActions = () => {
|
|
14
|
+
return (0, _FronteggStoreContext.useStore)().stateActions.auth.provisioningActions;
|
|
15
|
+
};
|
|
15
16
|
exports.useProvisioningActions = useProvisioningActions;
|
|
@@ -5,11 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useResetPhoneNumberActions = void 0;
|
|
7
7
|
exports.useResetPhoneNumberState = useResetPhoneNumberState;
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return (0, _hooks.stateHookGenerator)(stateMapper, 'resetPhoneNumberState');
|
|
8
|
+
var _useSnapshot = require("../useSnapshot");
|
|
9
|
+
var _FronteggStoreContext = require("../FronteggStoreContext");
|
|
10
|
+
function useResetPhoneNumberState() {
|
|
11
|
+
return (0, _useSnapshot.useSnapshot)((0, _FronteggStoreContext.useStore)().store.auth.resetPhoneNumberState);
|
|
13
12
|
}
|
|
14
|
-
const useResetPhoneNumberActions = () =>
|
|
13
|
+
const useResetPhoneNumberActions = () => {
|
|
14
|
+
return (0, _FronteggStoreContext.useStore)().stateActions.auth.resetPhoneNumberActions;
|
|
15
|
+
};
|
|
15
16
|
exports.useResetPhoneNumberActions = useResetPhoneNumberActions;
|
package/node/auth/roles.js
CHANGED
|
@@ -5,11 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useRolesActions = void 0;
|
|
7
7
|
exports.useRolesState = useRolesState;
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return (0, _hooks.stateHookGenerator)(stateMapper, 'rolesState');
|
|
8
|
+
var _useSnapshot = require("../useSnapshot");
|
|
9
|
+
var _FronteggStoreContext = require("../FronteggStoreContext");
|
|
10
|
+
function useRolesState() {
|
|
11
|
+
return (0, _useSnapshot.useSnapshot)((0, _FronteggStoreContext.useStore)().store.auth.rolesState);
|
|
13
12
|
}
|
|
14
|
-
const useRolesActions = () =>
|
|
13
|
+
const useRolesActions = () => {
|
|
14
|
+
return (0, _FronteggStoreContext.useStore)().stateActions.auth.rolesActions;
|
|
15
|
+
};
|
|
15
16
|
exports.useRolesActions = useRolesActions;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _restrictions = require("./restrictions");
|
|
7
|
+
Object.keys(_restrictions).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _restrictions[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _restrictions[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _securityCenter = require("./securityCenter");
|
|
18
|
+
Object.keys(_securityCenter).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _securityCenter[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _securityCenter[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _securityPolicy = require("./securityPolicy");
|
|
29
|
+
Object.keys(_securityPolicy).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _securityPolicy[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _securityPolicy[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
var _sessionsPolicy = require("./sessionsPolicy");
|
|
40
|
+
Object.keys(_sessionsPolicy).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _sessionsPolicy[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _sessionsPolicy[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
@@ -5,14 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useRestrictionsActions = exports.useIpRestrictions = exports.useEmailDomainRestrictions = void 0;
|
|
7
7
|
exports.useRestrictionsState = useRestrictionsState;
|
|
8
|
-
var _reduxStore = require("@frontegg/redux-store");
|
|
9
8
|
var _react = require("react");
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
function useRestrictionsState(
|
|
13
|
-
|
|
9
|
+
var _FronteggStoreContext = require("../../FronteggStoreContext");
|
|
10
|
+
var _useSnapshot = require("../../useSnapshot");
|
|
11
|
+
function useRestrictionsState() {
|
|
12
|
+
const state = (0, _FronteggStoreContext.useStore)().store.auth.restrictionsState;
|
|
13
|
+
return (0, _useSnapshot.useSnapshot)(state);
|
|
14
14
|
}
|
|
15
|
-
const useRestrictionsActions = () =>
|
|
15
|
+
const useRestrictionsActions = () => {
|
|
16
|
+
return (0, _FronteggStoreContext.useStore)().stateActions.auth.restrictionsActions;
|
|
17
|
+
};
|
|
16
18
|
exports.useRestrictionsActions = useRestrictionsActions;
|
|
17
19
|
const useIpRestrictions = (loadOnMount = false) => {
|
|
18
20
|
const {
|
|
@@ -23,13 +25,12 @@ const useIpRestrictions = (loadOnMount = false) => {
|
|
|
23
25
|
pagination,
|
|
24
26
|
totalPages,
|
|
25
27
|
userIpValid
|
|
26
|
-
} = useRestrictionsState(
|
|
28
|
+
} = useRestrictionsState().ipRestrictions;
|
|
27
29
|
const {
|
|
28
30
|
loadIpRestrictions
|
|
29
31
|
} = useRestrictionsActions();
|
|
30
32
|
(0, _react.useEffect)(() => {
|
|
31
33
|
(loadOnMount || !data) && loadIpRestrictions();
|
|
32
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
33
34
|
}, [loadOnMount, loadIpRestrictions]);
|
|
34
35
|
return {
|
|
35
36
|
loading,
|
|
@@ -48,13 +49,12 @@ const useEmailDomainRestrictions = (loadOnMount = false) => {
|
|
|
48
49
|
data,
|
|
49
50
|
saving,
|
|
50
51
|
error
|
|
51
|
-
} = useRestrictionsState(
|
|
52
|
+
} = useRestrictionsState().emailDomainRestrictions;
|
|
52
53
|
const {
|
|
53
54
|
loadEmailDomainRestrictions
|
|
54
55
|
} = useRestrictionsActions();
|
|
55
56
|
(0, _react.useEffect)(() => {
|
|
56
57
|
(loadOnMount || !data) && loadEmailDomainRestrictions();
|
|
57
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
58
58
|
}, [loadOnMount, loadEmailDomainRestrictions]);
|
|
59
59
|
return {
|
|
60
60
|
loading,
|