strapi-plugin-firebase-authentication 1.1.0 → 1.1.8
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/README.md +51 -17
- package/dist/_chunks/{App-HfsY_18f.js → App-C_pWLYYH.js} +170 -101
- package/dist/_chunks/{App-Bl6D4TFu.mjs → App-Dt8F60Rl.mjs} +39 -8
- package/dist/_chunks/{api-BSejy8nn.js → api-CxfueBVM.js} +1 -1
- package/dist/_chunks/{api-B01IAVEC.mjs → api-T8QRCile.mjs} +1 -1
- package/dist/_chunks/{index-DgfRCyyQ.js → index-BIHS9XB4.js} +2 -2
- package/dist/_chunks/{index-BqF9RRVF.mjs → index-BzSU0Li9.mjs} +1 -1
- package/dist/_chunks/{index-BbVqBI3M.js → index-C87l6qcA.js} +1 -1
- package/dist/_chunks/{index-4hUrKd7Y.mjs → index-Do9Y0scX.mjs} +2 -2
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +153 -145
- package/dist/server/index.mjs +153 -145
- package/dist/server/src/controllers/firebaseController.d.ts +4 -2
- package/dist/server/src/controllers/index.d.ts +0 -1
- package/dist/server/src/controllers/settingsController.d.ts +0 -1
- package/dist/server/src/index.d.ts +3 -11
- package/dist/server/src/routes/index.d.ts +0 -10
- package/dist/server/src/services/firebaseService.d.ts +12 -2
- package/package.json +11 -10
- package/dist/server/src/routes/content-internal-api.d.ts +0 -11
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ A production-ready Strapi v5 plugin that seamlessly integrates Firebase Authenti
|
|
|
42
42
|
- `POST /api/firebase-authentication` - Exchange Firebase token for Strapi JWT
|
|
43
43
|
- `POST /api/firebase-authentication/emailLogin` - Direct email/password login
|
|
44
44
|
- `POST /api/firebase-authentication/forgotPassword` - Request password reset
|
|
45
|
-
- `POST /api/firebase-authentication/resetPassword` -
|
|
45
|
+
- `POST /api/firebase-authentication/resetPassword` - Authenticated password change (requires JWT)
|
|
46
46
|
- `POST /api/firebase-authentication/requestMagicLink` - Passwordless login
|
|
47
47
|
- `GET /api/firebase-authentication/config` - Get public configuration
|
|
48
48
|
|
|
@@ -284,32 +284,66 @@ module.exports = () => ({
|
|
|
284
284
|
|
|
285
285
|
### Public Endpoints
|
|
286
286
|
|
|
287
|
-
| Method | Endpoint | Purpose
|
|
288
|
-
| ------ | ----------------------------------------------- |
|
|
289
|
-
| POST | `/api/firebase-authentication` | Exchange Firebase token for Strapi JWT
|
|
290
|
-
| POST | `/api/firebase-authentication/emailLogin` | Email/password login (no SDK required)
|
|
291
|
-
| POST | `/api/firebase-authentication/forgotPassword` | Request password reset email
|
|
292
|
-
| POST | `/api/firebase-authentication/resetPassword` |
|
|
293
|
-
| POST | `/api/firebase-authentication/requestMagicLink` | Request passwordless login email
|
|
294
|
-
| GET | `/api/firebase-authentication/config` | Get public configuration
|
|
287
|
+
| Method | Endpoint | Purpose |
|
|
288
|
+
| ------ | ----------------------------------------------- | -------------------------------------------- |
|
|
289
|
+
| POST | `/api/firebase-authentication` | Exchange Firebase token for Strapi JWT |
|
|
290
|
+
| POST | `/api/firebase-authentication/emailLogin` | Email/password login (no SDK required) |
|
|
291
|
+
| POST | `/api/firebase-authentication/forgotPassword` | Request password reset email |
|
|
292
|
+
| POST | `/api/firebase-authentication/resetPassword` | Authenticated password change (requires JWT) |
|
|
293
|
+
| POST | `/api/firebase-authentication/requestMagicLink` | Request passwordless login email |
|
|
294
|
+
| GET | `/api/firebase-authentication/config` | Get public configuration |
|
|
295
|
+
|
|
296
|
+
### Password Reset Flow
|
|
297
|
+
|
|
298
|
+
There are two distinct password reset approaches in this plugin:
|
|
299
|
+
|
|
300
|
+
#### 1. Forgot Password Flow (Email-Based)
|
|
301
|
+
|
|
302
|
+
**For users who forgot their password:**
|
|
303
|
+
|
|
304
|
+
1. User requests reset: `POST /api/firebase-authentication/forgotPassword` with `{ "email": "user@example.com" }`
|
|
305
|
+
2. Firebase sends email with link to Firebase's hosted password reset page
|
|
306
|
+
3. User clicks link → Opens Firebase's secure hosted UI
|
|
307
|
+
4. User enters new password on Firebase's page
|
|
308
|
+
5. After success → Redirects to configured continue URL
|
|
309
|
+
6. User logs in normally with new password
|
|
310
|
+
|
|
311
|
+
**Configuration:** Set `passwordResetUrl` in Firebase Authentication settings (this is where users land AFTER resetting their password on Firebase's page).
|
|
312
|
+
|
|
313
|
+
#### 2. Authenticated Password Change
|
|
314
|
+
|
|
315
|
+
**For admin-initiated resets or users changing their own password:**
|
|
316
|
+
|
|
317
|
+
- **Endpoint:** `POST /api/firebase-authentication/resetPassword`
|
|
318
|
+
- **Requires:** Valid JWT in `Authorization` header + `{ "password": "newpassword" }` in body
|
|
319
|
+
- **Use cases:**
|
|
320
|
+
- Admin resetting a user's password via admin panel
|
|
321
|
+
- Authenticated user changing their own password
|
|
322
|
+
- **Returns:** Updated user object + fresh JWT for auto-login
|
|
323
|
+
|
|
324
|
+
**Note:** This endpoint is NOT part of the forgot password email flow. Use `forgotPassword` for email-based password reset.
|
|
295
325
|
|
|
296
326
|
### Admin Endpoints
|
|
297
327
|
|
|
328
|
+
Admin endpoints use the admin API type (no `/api` prefix) and require admin authentication.
|
|
329
|
+
|
|
298
330
|
**User Management:**
|
|
299
331
|
| Method | Endpoint | Purpose |
|
|
300
332
|
|--------|----------|---------|
|
|
301
|
-
| GET | `/
|
|
302
|
-
| POST | `/
|
|
303
|
-
| GET | `/
|
|
304
|
-
| PUT | `/
|
|
305
|
-
| DELETE | `/
|
|
306
|
-
| PUT | `/
|
|
333
|
+
| GET | `/firebase-authentication/users` | List/search users |
|
|
334
|
+
| POST | `/firebase-authentication/users` | Create user |
|
|
335
|
+
| GET | `/firebase-authentication/users/:id` | Get user |
|
|
336
|
+
| PUT | `/firebase-authentication/users/:id` | Update user |
|
|
337
|
+
| DELETE | `/firebase-authentication/users/:id` | Delete user |
|
|
338
|
+
| PUT | `/firebase-authentication/users/resetPassword/:id` | Reset password |
|
|
307
339
|
|
|
308
340
|
**Settings Management:**
|
|
309
341
|
| Method | Endpoint | Purpose |
|
|
310
342
|
|--------|----------|---------|
|
|
311
|
-
| GET
|
|
312
|
-
| POST | `/
|
|
343
|
+
| GET | `/firebase-authentication/settings/firebase-config` | Get Firebase config |
|
|
344
|
+
| POST | `/firebase-authentication/settings/firebase-config` | Upload Firebase config |
|
|
345
|
+
| DELETE | `/firebase-authentication/settings/firebase-config` | Delete Firebase config |
|
|
346
|
+
| POST | `/firebase-authentication/settings/password-config` | Update password/magic link settings |
|
|
313
347
|
|
|
314
348
|
---
|
|
315
349
|
|
|
@@ -7,20 +7,37 @@ const reactTooltip = require("@radix-ui/react-tooltip");
|
|
|
7
7
|
const React = require("react");
|
|
8
8
|
const designSystem = require("@strapi/design-system");
|
|
9
9
|
const reactIntl = require("react-intl");
|
|
10
|
-
const index = require("./index-
|
|
10
|
+
const index = require("./index-BIHS9XB4.js");
|
|
11
11
|
const icons = require("@strapi/icons");
|
|
12
12
|
const styled = require("styled-components");
|
|
13
13
|
const rx = require("react-icons/rx");
|
|
14
14
|
const ai = require("react-icons/ai");
|
|
15
15
|
const md = require("react-icons/md");
|
|
16
|
-
const api = require("./api-
|
|
17
|
-
const
|
|
16
|
+
const api = require("./api-CxfueBVM.js");
|
|
17
|
+
const PhoneInputModule = require("react-phone-input-2");
|
|
18
18
|
require("react-phone-input-2/lib/style.css");
|
|
19
19
|
const validator = require("validator");
|
|
20
20
|
const _interopDefault = (e2) => e2 && e2.__esModule ? e2 : { default: e2 };
|
|
21
|
+
function _interopNamespace(e2) {
|
|
22
|
+
if (e2 && e2.__esModule) return e2;
|
|
23
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
24
|
+
if (e2) {
|
|
25
|
+
for (const k2 in e2) {
|
|
26
|
+
if (k2 !== "default") {
|
|
27
|
+
const d3 = Object.getOwnPropertyDescriptor(e2, k2);
|
|
28
|
+
Object.defineProperty(n, k2, d3.get ? d3 : {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: () => e2[k2]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
n.default = e2;
|
|
36
|
+
return Object.freeze(n);
|
|
37
|
+
}
|
|
21
38
|
const React__default = /* @__PURE__ */ _interopDefault(React);
|
|
22
39
|
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
23
|
-
const
|
|
40
|
+
const PhoneInputModule__namespace = /* @__PURE__ */ _interopNamespace(PhoneInputModule);
|
|
24
41
|
const validator__default = /* @__PURE__ */ _interopDefault(validator);
|
|
25
42
|
function arrayPush$1(array, values) {
|
|
26
43
|
var index2 = -1, length = values.length, offset = array.length;
|
|
@@ -2529,11 +2546,11 @@ const FirebaseTable = ({
|
|
|
2529
2546
|
});
|
|
2530
2547
|
};
|
|
2531
2548
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2532
|
-
/* @__PURE__ */ jsxRuntime.jsx(BulkActionsBar, { paddingLeft: 0, paddingRight: 0, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "row", alignItems: "center", justifyContent: "space-between", children: [
|
|
2533
|
-
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "row", alignItems: "center", gap:
|
|
2549
|
+
/* @__PURE__ */ jsxRuntime.jsx(BulkActionsBar, { paddingLeft: 0, paddingRight: 0, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "row", alignItems: "center", justifyContent: "space-between", wrap: "nowrap", children: [
|
|
2550
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "row", alignItems: "center", gap: 2, wrap: "nowrap", children: [
|
|
2534
2551
|
action,
|
|
2535
2552
|
hasSelection && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2536
|
-
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "omega", fontWeight: "semiBold", children: [
|
|
2553
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "omega", fontWeight: "semiBold", style: { whiteSpace: "nowrap" }, children: [
|
|
2537
2554
|
selectedCount,
|
|
2538
2555
|
" ",
|
|
2539
2556
|
selectedCount === 1 ? "entry" : "entries",
|
|
@@ -2546,10 +2563,20 @@ const FirebaseTable = ({
|
|
|
2546
2563
|
startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {}),
|
|
2547
2564
|
onClick: () => setShowBulkDeleteDialog(true),
|
|
2548
2565
|
size: "S",
|
|
2566
|
+
style: { whiteSpace: "nowrap" },
|
|
2549
2567
|
children: "Delete"
|
|
2550
2568
|
}
|
|
2551
2569
|
),
|
|
2552
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2570
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2571
|
+
designSystem.Button,
|
|
2572
|
+
{
|
|
2573
|
+
variant: "secondary",
|
|
2574
|
+
onClick: clearSelection,
|
|
2575
|
+
size: "S",
|
|
2576
|
+
style: { whiteSpace: "nowrap" },
|
|
2577
|
+
children: "Deselect all"
|
|
2578
|
+
}
|
|
2579
|
+
)
|
|
2553
2580
|
] })
|
|
2554
2581
|
] }),
|
|
2555
2582
|
createAction
|
|
@@ -2676,7 +2703,7 @@ const sendResetEmail = async (userId) => {
|
|
|
2676
2703
|
return result;
|
|
2677
2704
|
};
|
|
2678
2705
|
const getFirebaseConfig = async () => {
|
|
2679
|
-
const url =
|
|
2706
|
+
const url = `/api/${index.PLUGIN_ID}/config`;
|
|
2680
2707
|
try {
|
|
2681
2708
|
const { get: get2 } = admin.getFetchClient();
|
|
2682
2709
|
const { data: config } = await get2(url, {
|
|
@@ -2963,7 +2990,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
|
2963
2990
|
var ys = arrObjKeys(obj, inspect2);
|
|
2964
2991
|
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
2965
2992
|
var protoTag = obj instanceof Object ? "" : "null prototype";
|
|
2966
|
-
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr
|
|
2993
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
|
|
2967
2994
|
var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
|
|
2968
2995
|
var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat$1.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
|
|
2969
2996
|
if (ys.length === 0) {
|
|
@@ -2988,25 +3015,25 @@ function canTrustToString(obj) {
|
|
|
2988
3015
|
return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
|
|
2989
3016
|
}
|
|
2990
3017
|
function isArray$3(obj) {
|
|
2991
|
-
return toStr
|
|
3018
|
+
return toStr(obj) === "[object Array]" && canTrustToString(obj);
|
|
2992
3019
|
}
|
|
2993
3020
|
function isDate(obj) {
|
|
2994
|
-
return toStr
|
|
3021
|
+
return toStr(obj) === "[object Date]" && canTrustToString(obj);
|
|
2995
3022
|
}
|
|
2996
3023
|
function isRegExp$1(obj) {
|
|
2997
|
-
return toStr
|
|
3024
|
+
return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
|
|
2998
3025
|
}
|
|
2999
3026
|
function isError(obj) {
|
|
3000
|
-
return toStr
|
|
3027
|
+
return toStr(obj) === "[object Error]" && canTrustToString(obj);
|
|
3001
3028
|
}
|
|
3002
3029
|
function isString(obj) {
|
|
3003
|
-
return toStr
|
|
3030
|
+
return toStr(obj) === "[object String]" && canTrustToString(obj);
|
|
3004
3031
|
}
|
|
3005
3032
|
function isNumber(obj) {
|
|
3006
|
-
return toStr
|
|
3033
|
+
return toStr(obj) === "[object Number]" && canTrustToString(obj);
|
|
3007
3034
|
}
|
|
3008
3035
|
function isBoolean(obj) {
|
|
3009
|
-
return toStr
|
|
3036
|
+
return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
|
|
3010
3037
|
}
|
|
3011
3038
|
function isSymbol(obj) {
|
|
3012
3039
|
if (hasShammedSymbols) {
|
|
@@ -3042,7 +3069,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
|
|
|
3042
3069
|
function has$3(obj, key) {
|
|
3043
3070
|
return hasOwn$1.call(obj, key);
|
|
3044
3071
|
}
|
|
3045
|
-
function toStr
|
|
3072
|
+
function toStr(obj) {
|
|
3046
3073
|
return objectToString.call(obj);
|
|
3047
3074
|
}
|
|
3048
3075
|
function nameOf(f) {
|
|
@@ -3351,7 +3378,7 @@ var syntax = SyntaxError;
|
|
|
3351
3378
|
var uri = URIError;
|
|
3352
3379
|
var abs$1 = Math.abs;
|
|
3353
3380
|
var floor$1 = Math.floor;
|
|
3354
|
-
var max$
|
|
3381
|
+
var max$1 = Math.max;
|
|
3355
3382
|
var min$1 = Math.min;
|
|
3356
3383
|
var pow$1 = Math.pow;
|
|
3357
3384
|
var round$1 = Math.round;
|
|
@@ -3480,78 +3507,99 @@ function requireObject_getPrototypeOf() {
|
|
|
3480
3507
|
Object_getPrototypeOf = $Object2.getPrototypeOf || null;
|
|
3481
3508
|
return Object_getPrototypeOf;
|
|
3482
3509
|
}
|
|
3483
|
-
var
|
|
3484
|
-
var
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
var
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
arr
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
}
|
|
3497
|
-
var
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
arr
|
|
3501
|
-
}
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
var
|
|
3505
|
-
|
|
3506
|
-
for (var i2 = 0; i2 < arr.length; i2 += 1) {
|
|
3507
|
-
str += arr[i2];
|
|
3508
|
-
if (i2 + 1 < arr.length) {
|
|
3509
|
-
str += joiner;
|
|
3510
|
+
var implementation;
|
|
3511
|
+
var hasRequiredImplementation;
|
|
3512
|
+
function requireImplementation() {
|
|
3513
|
+
if (hasRequiredImplementation) return implementation;
|
|
3514
|
+
hasRequiredImplementation = 1;
|
|
3515
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
3516
|
+
var toStr2 = Object.prototype.toString;
|
|
3517
|
+
var max2 = Math.max;
|
|
3518
|
+
var funcType = "[object Function]";
|
|
3519
|
+
var concatty = function concatty2(a3, b2) {
|
|
3520
|
+
var arr = [];
|
|
3521
|
+
for (var i2 = 0; i2 < a3.length; i2 += 1) {
|
|
3522
|
+
arr[i2] = a3[i2];
|
|
3523
|
+
}
|
|
3524
|
+
for (var j = 0; j < b2.length; j += 1) {
|
|
3525
|
+
arr[j + a3.length] = b2[j];
|
|
3526
|
+
}
|
|
3527
|
+
return arr;
|
|
3528
|
+
};
|
|
3529
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
3530
|
+
var arr = [];
|
|
3531
|
+
for (var i2 = offset, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
|
|
3532
|
+
arr[j] = arrLike[i2];
|
|
3510
3533
|
}
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
var
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
var args = slicy(arguments, 1);
|
|
3520
|
-
var bound;
|
|
3521
|
-
var binder = function() {
|
|
3522
|
-
if (this instanceof bound) {
|
|
3523
|
-
var result = target.apply(
|
|
3524
|
-
this,
|
|
3525
|
-
concatty(args, arguments)
|
|
3526
|
-
);
|
|
3527
|
-
if (Object(result) === result) {
|
|
3528
|
-
return result;
|
|
3534
|
+
return arr;
|
|
3535
|
+
};
|
|
3536
|
+
var joiny = function(arr, joiner) {
|
|
3537
|
+
var str = "";
|
|
3538
|
+
for (var i2 = 0; i2 < arr.length; i2 += 1) {
|
|
3539
|
+
str += arr[i2];
|
|
3540
|
+
if (i2 + 1 < arr.length) {
|
|
3541
|
+
str += joiner;
|
|
3529
3542
|
}
|
|
3530
|
-
return this;
|
|
3531
3543
|
}
|
|
3532
|
-
return
|
|
3533
|
-
that,
|
|
3534
|
-
concatty(args, arguments)
|
|
3535
|
-
);
|
|
3544
|
+
return str;
|
|
3536
3545
|
};
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
var
|
|
3546
|
+
implementation = function bind2(that) {
|
|
3547
|
+
var target = this;
|
|
3548
|
+
if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
|
|
3549
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
3550
|
+
}
|
|
3551
|
+
var args = slicy(arguments, 1);
|
|
3552
|
+
var bound;
|
|
3553
|
+
var binder = function() {
|
|
3554
|
+
if (this instanceof bound) {
|
|
3555
|
+
var result = target.apply(
|
|
3556
|
+
this,
|
|
3557
|
+
concatty(args, arguments)
|
|
3558
|
+
);
|
|
3559
|
+
if (Object(result) === result) {
|
|
3560
|
+
return result;
|
|
3561
|
+
}
|
|
3562
|
+
return this;
|
|
3563
|
+
}
|
|
3564
|
+
return target.apply(
|
|
3565
|
+
that,
|
|
3566
|
+
concatty(args, arguments)
|
|
3567
|
+
);
|
|
3545
3568
|
};
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
};
|
|
3552
|
-
|
|
3553
|
-
var
|
|
3554
|
-
|
|
3569
|
+
var boundLength = max2(0, target.length - args.length);
|
|
3570
|
+
var boundArgs = [];
|
|
3571
|
+
for (var i2 = 0; i2 < boundLength; i2++) {
|
|
3572
|
+
boundArgs[i2] = "$" + i2;
|
|
3573
|
+
}
|
|
3574
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
3575
|
+
if (target.prototype) {
|
|
3576
|
+
var Empty = function Empty2() {
|
|
3577
|
+
};
|
|
3578
|
+
Empty.prototype = target.prototype;
|
|
3579
|
+
bound.prototype = new Empty();
|
|
3580
|
+
Empty.prototype = null;
|
|
3581
|
+
}
|
|
3582
|
+
return bound;
|
|
3583
|
+
};
|
|
3584
|
+
return implementation;
|
|
3585
|
+
}
|
|
3586
|
+
var functionBind;
|
|
3587
|
+
var hasRequiredFunctionBind;
|
|
3588
|
+
function requireFunctionBind() {
|
|
3589
|
+
if (hasRequiredFunctionBind) return functionBind;
|
|
3590
|
+
hasRequiredFunctionBind = 1;
|
|
3591
|
+
var implementation2 = requireImplementation();
|
|
3592
|
+
functionBind = Function.prototype.bind || implementation2;
|
|
3593
|
+
return functionBind;
|
|
3594
|
+
}
|
|
3595
|
+
var functionCall;
|
|
3596
|
+
var hasRequiredFunctionCall;
|
|
3597
|
+
function requireFunctionCall() {
|
|
3598
|
+
if (hasRequiredFunctionCall) return functionCall;
|
|
3599
|
+
hasRequiredFunctionCall = 1;
|
|
3600
|
+
functionCall = Function.prototype.call;
|
|
3601
|
+
return functionCall;
|
|
3602
|
+
}
|
|
3555
3603
|
var functionApply;
|
|
3556
3604
|
var hasRequiredFunctionApply;
|
|
3557
3605
|
function requireFunctionApply() {
|
|
@@ -3561,14 +3609,14 @@ function requireFunctionApply() {
|
|
|
3561
3609
|
return functionApply;
|
|
3562
3610
|
}
|
|
3563
3611
|
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
3564
|
-
var bind$2 =
|
|
3612
|
+
var bind$2 = requireFunctionBind();
|
|
3565
3613
|
var $apply$1 = requireFunctionApply();
|
|
3566
|
-
var $call$2 =
|
|
3614
|
+
var $call$2 = requireFunctionCall();
|
|
3567
3615
|
var $reflectApply = reflectApply;
|
|
3568
3616
|
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
3569
|
-
var bind$1 =
|
|
3617
|
+
var bind$1 = requireFunctionBind();
|
|
3570
3618
|
var $TypeError$4 = type;
|
|
3571
|
-
var $call$1 =
|
|
3619
|
+
var $call$1 = requireFunctionCall();
|
|
3572
3620
|
var $actualApply = actualApply;
|
|
3573
3621
|
var callBindApplyHelpers = function callBindBasic(args) {
|
|
3574
3622
|
if (args.length < 1 || typeof args[0] !== "function") {
|
|
@@ -3634,8 +3682,8 @@ function requireHasown() {
|
|
|
3634
3682
|
hasRequiredHasown = 1;
|
|
3635
3683
|
var call = Function.prototype.call;
|
|
3636
3684
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
3637
|
-
var
|
|
3638
|
-
hasown =
|
|
3685
|
+
var bind2 = requireFunctionBind();
|
|
3686
|
+
hasown = bind2.call(call, $hasOwn);
|
|
3639
3687
|
return hasown;
|
|
3640
3688
|
}
|
|
3641
3689
|
var undefined$1;
|
|
@@ -3649,7 +3697,7 @@ var $TypeError$3 = type;
|
|
|
3649
3697
|
var $URIError = uri;
|
|
3650
3698
|
var abs = abs$1;
|
|
3651
3699
|
var floor = floor$1;
|
|
3652
|
-
var max = max$
|
|
3700
|
+
var max = max$1;
|
|
3653
3701
|
var min = min$1;
|
|
3654
3702
|
var pow = pow$1;
|
|
3655
3703
|
var round = round$1;
|
|
@@ -3683,7 +3731,7 @@ var getProto = requireGetProto();
|
|
|
3683
3731
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
3684
3732
|
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
3685
3733
|
var $apply = requireFunctionApply();
|
|
3686
|
-
var $call =
|
|
3734
|
+
var $call = requireFunctionCall();
|
|
3687
3735
|
var needsEval = {};
|
|
3688
3736
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
3689
3737
|
var INTRINSICS = {
|
|
@@ -3854,13 +3902,13 @@ var LEGACY_ALIASES = {
|
|
|
3854
3902
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3855
3903
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3856
3904
|
};
|
|
3857
|
-
var
|
|
3905
|
+
var bind = requireFunctionBind();
|
|
3858
3906
|
var hasOwn = requireHasown();
|
|
3859
|
-
var $concat =
|
|
3860
|
-
var $spliceApply =
|
|
3861
|
-
var $replace =
|
|
3862
|
-
var $strSlice =
|
|
3863
|
-
var $exec =
|
|
3907
|
+
var $concat = bind.call($call, Array.prototype.concat);
|
|
3908
|
+
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
3909
|
+
var $replace = bind.call($call, String.prototype.replace);
|
|
3910
|
+
var $strSlice = bind.call($call, String.prototype.slice);
|
|
3911
|
+
var $exec = bind.call($call, RegExp.prototype.exec);
|
|
3864
3912
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
3865
3913
|
var reEscapeChar = /\\(\\)?/g;
|
|
3866
3914
|
var stringToPath = function stringToPath2(string) {
|
|
@@ -5358,6 +5406,27 @@ const HomePage = () => {
|
|
|
5358
5406
|
] })
|
|
5359
5407
|
] });
|
|
5360
5408
|
};
|
|
5409
|
+
let PhoneInputTemp = PhoneInputModule__namespace;
|
|
5410
|
+
let unwrapCount = 0;
|
|
5411
|
+
while (PhoneInputTemp && typeof PhoneInputTemp === "object" && PhoneInputTemp.default && unwrapCount < 5) {
|
|
5412
|
+
console.log(`🔧 Unwrapping PhoneInput layer ${unwrapCount}:`, PhoneInputTemp);
|
|
5413
|
+
PhoneInputTemp = PhoneInputTemp.default;
|
|
5414
|
+
unwrapCount++;
|
|
5415
|
+
}
|
|
5416
|
+
const PhoneInput = PhoneInputTemp;
|
|
5417
|
+
console.log("🔍 ==================== PhoneInput Final Check ====================");
|
|
5418
|
+
console.log(" Unwrap iterations:", unwrapCount);
|
|
5419
|
+
console.log(" PhoneInput FINAL:", PhoneInput);
|
|
5420
|
+
console.log(" PhoneInput type:", typeof PhoneInput);
|
|
5421
|
+
console.log(" PhoneInput $$typeof:", PhoneInput?.$$typeof);
|
|
5422
|
+
console.log(" PhoneInput name:", PhoneInput?.name);
|
|
5423
|
+
console.log(" PhoneInput displayName:", PhoneInput?.displayName);
|
|
5424
|
+
console.log(" Is function?:", typeof PhoneInput === "function");
|
|
5425
|
+
console.log(
|
|
5426
|
+
" Is valid React component?:",
|
|
5427
|
+
typeof PhoneInput === "function" || PhoneInput && PhoneInput.$$typeof
|
|
5428
|
+
);
|
|
5429
|
+
console.log("🔍 ================================================================");
|
|
5361
5430
|
const StyledPhoneInputWrapper = styled__default.default.div`
|
|
5362
5431
|
width: 100%;
|
|
5363
5432
|
|
|
@@ -5551,7 +5620,7 @@ const UserFormFields = ({
|
|
|
5551
5620
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { style: { width: "50%" }, error: phoneError || void 0, children: [
|
|
5552
5621
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: "Phone Number" }),
|
|
5553
5622
|
/* @__PURE__ */ jsxRuntime.jsx(StyledPhoneInputWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5554
|
-
|
|
5623
|
+
PhoneInput,
|
|
5555
5624
|
{
|
|
5556
5625
|
value: userData.phoneNumber || "",
|
|
5557
5626
|
onChange: (phone) => onPhoneChange("+" + phone),
|
|
@@ -5,14 +5,14 @@ import { Provider } from "@radix-ui/react-tooltip";
|
|
|
5
5
|
import React, { useState, useCallback, useMemo, useEffect, useRef, useLayoutEffect } from "react";
|
|
6
6
|
import { Link, Flex, Box, Button, Tooltip, Tbody, Tr, Td, Checkbox, Typography, Modal, Table, Thead, Th, SingleSelect, SingleSelectOption, SearchForm, Searchbar, IconButton, Dialog, Tabs, TextInput, Alert, Field, Toggle, Divider } from "@strapi/design-system";
|
|
7
7
|
import { useIntl } from "react-intl";
|
|
8
|
-
import { i as isArguments_1, a as isBufferExports, b as isTypedArray_1, c as isLength_1, d as isFunction_1, _ as _getTag, e as _Stack, f as _equalArrays, g as _equalByTag, h as isObjectLike_1, j as getDefaultExportFromCjs, k as _baseGetTag, l as _MapCache, m as _Symbol, P as PLUGIN_ID, n as getAugmentedNamespace, o as commonjsGlobal } from "./index-
|
|
8
|
+
import { i as isArguments_1, a as isBufferExports, b as isTypedArray_1, c as isLength_1, d as isFunction_1, _ as _getTag, e as _Stack, f as _equalArrays, g as _equalByTag, h as isObjectLike_1, j as getDefaultExportFromCjs, k as _baseGetTag, l as _MapCache, m as _Symbol, P as PLUGIN_ID, n as getAugmentedNamespace, o as commonjsGlobal } from "./index-Do9Y0scX.mjs";
|
|
9
9
|
import { ArrowLeft, Key, Trash, WarningCircle, CaretUp, CaretDown, Search, Plus, Pencil } from "@strapi/icons";
|
|
10
10
|
import styled from "styled-components";
|
|
11
11
|
import { RxCheck, RxCross2 } from "react-icons/rx";
|
|
12
12
|
import { AiOutlineUserAdd, AiFillPhone, AiFillMail, AiFillYahoo, AiFillGithub, AiFillTwitterCircle, AiFillFacebook, AiFillApple, AiFillGoogleCircle } from "react-icons/ai";
|
|
13
13
|
import { MdPassword } from "react-icons/md";
|
|
14
|
-
import { g as getFirebaseConfig$1 } from "./api-
|
|
15
|
-
import
|
|
14
|
+
import { g as getFirebaseConfig$1 } from "./api-T8QRCile.mjs";
|
|
15
|
+
import * as PhoneInputModule from "react-phone-input-2";
|
|
16
16
|
import "react-phone-input-2/lib/style.css";
|
|
17
17
|
import validator from "validator";
|
|
18
18
|
function arrayPush$1(array, values) {
|
|
@@ -2522,11 +2522,11 @@ const FirebaseTable = ({
|
|
|
2522
2522
|
});
|
|
2523
2523
|
};
|
|
2524
2524
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2525
|
-
/* @__PURE__ */ jsx(BulkActionsBar, { paddingLeft: 0, paddingRight: 0, children: /* @__PURE__ */ jsxs(Flex, { direction: "row", alignItems: "center", justifyContent: "space-between", children: [
|
|
2526
|
-
/* @__PURE__ */ jsxs(Flex, { direction: "row", alignItems: "center", gap:
|
|
2525
|
+
/* @__PURE__ */ jsx(BulkActionsBar, { paddingLeft: 0, paddingRight: 0, children: /* @__PURE__ */ jsxs(Flex, { direction: "row", alignItems: "center", justifyContent: "space-between", wrap: "nowrap", children: [
|
|
2526
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "row", alignItems: "center", gap: 2, wrap: "nowrap", children: [
|
|
2527
2527
|
action,
|
|
2528
2528
|
hasSelection && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2529
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "omega", fontWeight: "semiBold", children: [
|
|
2529
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "omega", fontWeight: "semiBold", style: { whiteSpace: "nowrap" }, children: [
|
|
2530
2530
|
selectedCount,
|
|
2531
2531
|
" ",
|
|
2532
2532
|
selectedCount === 1 ? "entry" : "entries",
|
|
@@ -2539,10 +2539,20 @@ const FirebaseTable = ({
|
|
|
2539
2539
|
startIcon: /* @__PURE__ */ jsx(Trash, {}),
|
|
2540
2540
|
onClick: () => setShowBulkDeleteDialog(true),
|
|
2541
2541
|
size: "S",
|
|
2542
|
+
style: { whiteSpace: "nowrap" },
|
|
2542
2543
|
children: "Delete"
|
|
2543
2544
|
}
|
|
2544
2545
|
),
|
|
2545
|
-
/* @__PURE__ */ jsx(
|
|
2546
|
+
/* @__PURE__ */ jsx(
|
|
2547
|
+
Button,
|
|
2548
|
+
{
|
|
2549
|
+
variant: "secondary",
|
|
2550
|
+
onClick: clearSelection,
|
|
2551
|
+
size: "S",
|
|
2552
|
+
style: { whiteSpace: "nowrap" },
|
|
2553
|
+
children: "Deselect all"
|
|
2554
|
+
}
|
|
2555
|
+
)
|
|
2546
2556
|
] })
|
|
2547
2557
|
] }),
|
|
2548
2558
|
createAction
|
|
@@ -2669,7 +2679,7 @@ const sendResetEmail = async (userId) => {
|
|
|
2669
2679
|
return result;
|
|
2670
2680
|
};
|
|
2671
2681
|
const getFirebaseConfig = async () => {
|
|
2672
|
-
const url =
|
|
2682
|
+
const url = `/api/${PLUGIN_ID}/config`;
|
|
2673
2683
|
try {
|
|
2674
2684
|
const { get: get2 } = getFetchClient();
|
|
2675
2685
|
const { data: config } = await get2(url, {
|
|
@@ -5372,6 +5382,27 @@ const HomePage = () => {
|
|
|
5372
5382
|
] })
|
|
5373
5383
|
] });
|
|
5374
5384
|
};
|
|
5385
|
+
let PhoneInputTemp = PhoneInputModule;
|
|
5386
|
+
let unwrapCount = 0;
|
|
5387
|
+
while (PhoneInputTemp && typeof PhoneInputTemp === "object" && PhoneInputTemp.default && unwrapCount < 5) {
|
|
5388
|
+
console.log(`🔧 Unwrapping PhoneInput layer ${unwrapCount}:`, PhoneInputTemp);
|
|
5389
|
+
PhoneInputTemp = PhoneInputTemp.default;
|
|
5390
|
+
unwrapCount++;
|
|
5391
|
+
}
|
|
5392
|
+
const PhoneInput = PhoneInputTemp;
|
|
5393
|
+
console.log("🔍 ==================== PhoneInput Final Check ====================");
|
|
5394
|
+
console.log(" Unwrap iterations:", unwrapCount);
|
|
5395
|
+
console.log(" PhoneInput FINAL:", PhoneInput);
|
|
5396
|
+
console.log(" PhoneInput type:", typeof PhoneInput);
|
|
5397
|
+
console.log(" PhoneInput $$typeof:", PhoneInput?.$$typeof);
|
|
5398
|
+
console.log(" PhoneInput name:", PhoneInput?.name);
|
|
5399
|
+
console.log(" PhoneInput displayName:", PhoneInput?.displayName);
|
|
5400
|
+
console.log(" Is function?:", typeof PhoneInput === "function");
|
|
5401
|
+
console.log(
|
|
5402
|
+
" Is valid React component?:",
|
|
5403
|
+
typeof PhoneInput === "function" || PhoneInput && PhoneInput.$$typeof
|
|
5404
|
+
);
|
|
5405
|
+
console.log("🔍 ================================================================");
|
|
5375
5406
|
const StyledPhoneInputWrapper = styled.div`
|
|
5376
5407
|
width: 100%;
|
|
5377
5408
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const admin = require("@strapi/strapi/admin");
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-BIHS9XB4.js");
|
|
4
4
|
const saveFirebaseConfig = async (json, firebaseWebApiKey, passwordConfig) => {
|
|
5
5
|
const url = `/${index.PLUGIN_ID}/settings/firebase-config`;
|
|
6
6
|
const { post } = admin.getFetchClient();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getFetchClient } from "@strapi/strapi/admin";
|
|
2
|
-
import { P as PLUGIN_ID } from "./index-
|
|
2
|
+
import { P as PLUGIN_ID } from "./index-Do9Y0scX.mjs";
|
|
3
3
|
const saveFirebaseConfig = async (json, firebaseWebApiKey, passwordConfig) => {
|
|
4
4
|
const url = `/${PLUGIN_ID}/settings/firebase-config`;
|
|
5
5
|
const { post } = getFetchClient();
|
|
@@ -739,7 +739,7 @@ const index = {
|
|
|
739
739
|
id: `${PLUGIN_ID}.page.title`,
|
|
740
740
|
defaultMessage: PLUGIN_ID
|
|
741
741
|
},
|
|
742
|
-
Component: () => Promise.resolve().then(() => require("./App-
|
|
742
|
+
Component: () => Promise.resolve().then(() => require("./App-C_pWLYYH.js")).then((mod) => ({
|
|
743
743
|
default: mod.App
|
|
744
744
|
})),
|
|
745
745
|
permissions: PERMISSIONS["menu-link"]
|
|
@@ -761,7 +761,7 @@ const index = {
|
|
|
761
761
|
id: "settings",
|
|
762
762
|
to: `/settings/${PLUGIN_ID}`,
|
|
763
763
|
async Component() {
|
|
764
|
-
const component = await Promise.resolve().then(() => require("./index-
|
|
764
|
+
const component = await Promise.resolve().then(() => require("./index-C87l6qcA.js"));
|
|
765
765
|
return component.default;
|
|
766
766
|
},
|
|
767
767
|
permissions: PERMISSIONS["menu-link"]
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
3
|
import { Flex, Box, Typography, JSONInput, Button, TextInput, Badge, Textarea, Toggle, NumberInput, Modal } from "@strapi/design-system";
|
|
4
4
|
import { useNotification, Page } from "@strapi/strapi/admin";
|
|
5
|
-
import { g as getFirebaseConfig, s as saveFirebaseConfig, d as delFirebaseConfig, a as savePasswordSettings } from "./api-
|
|
5
|
+
import { g as getFirebaseConfig, s as saveFirebaseConfig, d as delFirebaseConfig, a as savePasswordSettings } from "./api-T8QRCile.mjs";
|
|
6
6
|
import { useNavigate } from "react-router-dom";
|
|
7
7
|
function SettingsPage() {
|
|
8
8
|
const { toggleNotification } = useNotification();
|