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