strapi-plugin-firebase-authentication 1.1.12 → 1.2.1
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/dist/_chunks/{App-BqjE8BHb.js → App-CAgq2cOo.js} +369 -288
- package/dist/_chunks/{App-BY1gNGKH.mjs → App-CyeC5fLT.mjs} +291 -210
- package/dist/_chunks/api-BL-wXuSb.js +56776 -0
- package/dist/_chunks/api-Bjer83Qp.mjs +56759 -0
- package/dist/_chunks/index-Bg-lGlji.mjs +2758 -0
- package/dist/_chunks/{index-C4t4JZZ_.js → index-CTenjpqN.js} +285 -172
- package/dist/_chunks/{index-D8pv1Q6h.mjs → index-Kidqhaeq.mjs} +268 -155
- package/dist/_chunks/index-Rervtuh1.js +2757 -0
- package/dist/admin/index.js +1 -3
- package/dist/admin/index.mjs +2 -4
- package/dist/admin/src/components/user-management/ResendVerification/ResendVerification.d.ts +9 -0
- package/dist/admin/src/components/user-management/index.d.ts +1 -0
- package/dist/admin/src/pages/Settings/api.d.ts +4 -0
- package/dist/admin/src/pages/utils/api.d.ts +2 -1
- package/dist/server/index.js +1008 -332
- package/dist/server/index.mjs +1008 -332
- package/dist/server/src/config/index.d.ts +1 -1
- package/dist/server/src/content-types/index.d.ts +16 -0
- package/dist/server/src/controllers/firebaseController.d.ts +16 -1
- package/dist/server/src/controllers/index.d.ts +3 -0
- package/dist/server/src/controllers/userController.d.ts +1 -0
- package/dist/server/src/index.d.ts +51 -5
- package/dist/server/src/policies/index.d.ts +3 -1
- package/dist/server/src/policies/is-authenticated.d.ts +6 -0
- package/dist/server/src/routes/content-api.d.ts +10 -2
- package/dist/server/src/routes/index.d.ts +10 -2
- package/dist/server/src/services/emailService.d.ts +10 -0
- package/dist/server/src/services/firebaseService.d.ts +21 -1
- package/dist/server/src/services/index.d.ts +18 -1
- package/dist/server/src/services/settingsService.d.ts +2 -0
- package/dist/server/src/services/tokenService.d.ts +21 -0
- package/dist/server/src/services/userService.d.ts +5 -0
- package/dist/server/src/templates/defaults/email-verification.d.ts +2 -0
- package/dist/server/src/templates/defaults/index.d.ts +1 -0
- package/dist/server/src/templates/types.d.ts +3 -1
- package/package.json +8 -8
- package/dist/_chunks/api-DQCdqlCd.js +0 -35
- package/dist/_chunks/api-D_4cdJU5.mjs +0 -36
- package/dist/_chunks/index-DlPxMuSK.js +0 -814
- package/dist/_chunks/index-DtGfwf9S.mjs +0 -815
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { T, R, E, J as Jm, N as Nn, G as G0, I as Is, M as M1, D as D1, i as i1, t as t1, g as getFirebaseConfig, s as saveFirebaseConfig, f as delFirebaseConfig, j as savePasswordSettings } from "./api-Bjer83Qp.mjs";
|
|
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-D_4cdJU5.mjs";
|
|
6
5
|
import { useNavigate } from "react-router-dom";
|
|
7
6
|
function SettingsPage() {
|
|
8
7
|
const { toggleNotification } = useNotification();
|
|
@@ -20,6 +19,10 @@ function SettingsPage() {
|
|
|
20
19
|
const [magicLinkUrl, setMagicLinkUrl] = useState("http://localhost:1338/verify-magic-link.html");
|
|
21
20
|
const [magicLinkEmailSubject, setMagicLinkEmailSubject] = useState("Sign in to Your Application");
|
|
22
21
|
const [magicLinkExpiryHours, setMagicLinkExpiryHours] = useState(1);
|
|
22
|
+
const [emailVerificationUrl, setEmailVerificationUrl] = useState(
|
|
23
|
+
"http://localhost:3000/verify-email"
|
|
24
|
+
);
|
|
25
|
+
const [emailVerificationEmailSubject, setEmailVerificationEmailSubject] = useState("Verify Your Email");
|
|
23
26
|
const [loading, setLoading] = useState(true);
|
|
24
27
|
const [showEditModal, setShowEditModal] = useState(false);
|
|
25
28
|
const [editWebApiKey, setEditWebApiKey] = useState("");
|
|
@@ -46,6 +49,8 @@ function SettingsPage() {
|
|
|
46
49
|
setMagicLinkUrl(data?.magicLinkUrl || "http://localhost:1338/verify-magic-link.html");
|
|
47
50
|
setMagicLinkEmailSubject(data?.magicLinkEmailSubject || "Sign in to Your Application");
|
|
48
51
|
setMagicLinkExpiryHours(data?.magicLinkExpiryHours || 1);
|
|
52
|
+
setEmailVerificationUrl(data?.emailVerificationUrl || "http://localhost:3000/verify-email");
|
|
53
|
+
setEmailVerificationEmailSubject(data?.emailVerificationEmailSubject || "Verify Your Email");
|
|
49
54
|
}).catch((error) => {
|
|
50
55
|
setLoading(false);
|
|
51
56
|
console.error("Error retrieving Firebase config:", error);
|
|
@@ -71,6 +76,8 @@ function SettingsPage() {
|
|
|
71
76
|
setMagicLinkUrl("http://localhost:1338/verify-magic-link.html");
|
|
72
77
|
setMagicLinkEmailSubject("Sign in to Your Application");
|
|
73
78
|
setMagicLinkExpiryHours(1);
|
|
79
|
+
setEmailVerificationUrl("http://localhost:3000/verify-email");
|
|
80
|
+
setEmailVerificationEmailSubject("Verify Your Email");
|
|
74
81
|
setLoading(false);
|
|
75
82
|
toggleNotification({
|
|
76
83
|
type: "success",
|
|
@@ -96,7 +103,9 @@ function SettingsPage() {
|
|
|
96
103
|
enableMagicLink,
|
|
97
104
|
magicLinkUrl,
|
|
98
105
|
magicLinkEmailSubject,
|
|
99
|
-
magicLinkExpiryHours
|
|
106
|
+
magicLinkExpiryHours,
|
|
107
|
+
emailVerificationUrl,
|
|
108
|
+
emailVerificationEmailSubject
|
|
100
109
|
});
|
|
101
110
|
if (!data || !data.firebase_config_json) {
|
|
102
111
|
throw new Error("Invalid response from server");
|
|
@@ -127,7 +136,9 @@ function SettingsPage() {
|
|
|
127
136
|
enableMagicLink,
|
|
128
137
|
magicLinkUrl,
|
|
129
138
|
magicLinkEmailSubject,
|
|
130
|
-
magicLinkExpiryHours
|
|
139
|
+
magicLinkExpiryHours,
|
|
140
|
+
emailVerificationUrl,
|
|
141
|
+
emailVerificationEmailSubject
|
|
131
142
|
});
|
|
132
143
|
if (data) {
|
|
133
144
|
setPasswordRequirementsRegex(data.passwordRequirementsRegex || passwordRequirementsRegex);
|
|
@@ -138,6 +149,8 @@ function SettingsPage() {
|
|
|
138
149
|
setMagicLinkUrl(data.magicLinkUrl || magicLinkUrl);
|
|
139
150
|
setMagicLinkEmailSubject(data.magicLinkEmailSubject || magicLinkEmailSubject);
|
|
140
151
|
setMagicLinkExpiryHours(data.magicLinkExpiryHours || magicLinkExpiryHours);
|
|
152
|
+
setEmailVerificationUrl(data.emailVerificationUrl || emailVerificationUrl);
|
|
153
|
+
setEmailVerificationEmailSubject(data.emailVerificationEmailSubject || emailVerificationEmailSubject);
|
|
141
154
|
}
|
|
142
155
|
setLoading(false);
|
|
143
156
|
toggleNotification({
|
|
@@ -164,13 +177,17 @@ function SettingsPage() {
|
|
|
164
177
|
enableMagicLink,
|
|
165
178
|
magicLinkUrl,
|
|
166
179
|
magicLinkEmailSubject,
|
|
167
|
-
magicLinkExpiryHours
|
|
180
|
+
magicLinkExpiryHours,
|
|
181
|
+
emailVerificationUrl,
|
|
182
|
+
emailVerificationEmailSubject
|
|
168
183
|
});
|
|
169
184
|
if (data) {
|
|
170
185
|
setEnableMagicLink(data.enableMagicLink || enableMagicLink);
|
|
171
186
|
setMagicLinkUrl(data.magicLinkUrl || magicLinkUrl);
|
|
172
187
|
setMagicLinkEmailSubject(data.magicLinkEmailSubject || magicLinkEmailSubject);
|
|
173
188
|
setMagicLinkExpiryHours(data.magicLinkExpiryHours || magicLinkExpiryHours);
|
|
189
|
+
setEmailVerificationUrl(data.emailVerificationUrl || emailVerificationUrl);
|
|
190
|
+
setEmailVerificationEmailSubject(data.emailVerificationEmailSubject || emailVerificationEmailSubject);
|
|
174
191
|
}
|
|
175
192
|
setLoading(false);
|
|
176
193
|
toggleNotification({
|
|
@@ -186,6 +203,39 @@ function SettingsPage() {
|
|
|
186
203
|
setLoading(false);
|
|
187
204
|
}
|
|
188
205
|
};
|
|
206
|
+
const handleSaveEmailVerificationSettings = async () => {
|
|
207
|
+
try {
|
|
208
|
+
setLoading(true);
|
|
209
|
+
const data = await savePasswordSettings({
|
|
210
|
+
passwordRequirementsRegex,
|
|
211
|
+
passwordRequirementsMessage,
|
|
212
|
+
passwordResetUrl,
|
|
213
|
+
passwordResetEmailSubject,
|
|
214
|
+
enableMagicLink,
|
|
215
|
+
magicLinkUrl,
|
|
216
|
+
magicLinkEmailSubject,
|
|
217
|
+
magicLinkExpiryHours,
|
|
218
|
+
emailVerificationUrl,
|
|
219
|
+
emailVerificationEmailSubject
|
|
220
|
+
});
|
|
221
|
+
if (data) {
|
|
222
|
+
setEmailVerificationUrl(data.emailVerificationUrl || emailVerificationUrl);
|
|
223
|
+
setEmailVerificationEmailSubject(data.emailVerificationEmailSubject || emailVerificationEmailSubject);
|
|
224
|
+
}
|
|
225
|
+
setLoading(false);
|
|
226
|
+
toggleNotification({
|
|
227
|
+
type: "success",
|
|
228
|
+
message: "Email verification settings saved successfully"
|
|
229
|
+
});
|
|
230
|
+
} catch (error) {
|
|
231
|
+
console.error("Error saving email verification settings:", error);
|
|
232
|
+
toggleNotification({
|
|
233
|
+
type: "warning",
|
|
234
|
+
message: "Failed to save email verification settings"
|
|
235
|
+
});
|
|
236
|
+
setLoading(false);
|
|
237
|
+
}
|
|
238
|
+
};
|
|
189
239
|
const handleAddWebApiKey = () => {
|
|
190
240
|
setEditWebApiKey("");
|
|
191
241
|
setShowEditModal(true);
|
|
@@ -206,7 +256,9 @@ function SettingsPage() {
|
|
|
206
256
|
enableMagicLink,
|
|
207
257
|
magicLinkUrl,
|
|
208
258
|
magicLinkEmailSubject,
|
|
209
|
-
magicLinkExpiryHours
|
|
259
|
+
magicLinkExpiryHours,
|
|
260
|
+
emailVerificationUrl,
|
|
261
|
+
emailVerificationEmailSubject
|
|
210
262
|
});
|
|
211
263
|
if (!data || !data.firebase_config_json) {
|
|
212
264
|
throw new Error("Invalid response from server");
|
|
@@ -239,7 +291,9 @@ function SettingsPage() {
|
|
|
239
291
|
enableMagicLink,
|
|
240
292
|
magicLinkUrl,
|
|
241
293
|
magicLinkEmailSubject,
|
|
242
|
-
magicLinkExpiryHours
|
|
294
|
+
magicLinkExpiryHours,
|
|
295
|
+
emailVerificationUrl,
|
|
296
|
+
emailVerificationEmailSubject
|
|
243
297
|
});
|
|
244
298
|
if (!data || !data.firebase_config_json) {
|
|
245
299
|
throw new Error("Invalid response from server");
|
|
@@ -273,11 +327,11 @@ function SettingsPage() {
|
|
|
273
327
|
}
|
|
274
328
|
};
|
|
275
329
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
276
|
-
/* @__PURE__ */ jsx(
|
|
277
|
-
/* @__PURE__ */ jsxs(
|
|
278
|
-
/* @__PURE__ */ jsx(
|
|
330
|
+
/* @__PURE__ */ jsx(T, { style: { padding: 32 }, direction: "column", alignItems: "flex-start", gap: 4, children: /* @__PURE__ */ jsxs(R, { style: { width: "100%" }, children: [
|
|
331
|
+
/* @__PURE__ */ jsxs(R, { marginBottom: 6, padding: 4, background: "neutral0", borderRadius: "4px", shadow: "filterShadow", children: [
|
|
332
|
+
/* @__PURE__ */ jsx(E, { variant: "alpha", as: "h2", style: { display: "block", marginBottom: "8px" }, children: "Firebase Authentication" }),
|
|
279
333
|
/* @__PURE__ */ jsx(
|
|
280
|
-
|
|
334
|
+
E,
|
|
281
335
|
{
|
|
282
336
|
variant: "omega",
|
|
283
337
|
textColor: "neutral600",
|
|
@@ -287,9 +341,9 @@ function SettingsPage() {
|
|
|
287
341
|
),
|
|
288
342
|
(() => {
|
|
289
343
|
return !firebaseJsonValue || !firebaseJsonValue.firebaseConfigJson ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
290
|
-
/* @__PURE__ */ jsxs(
|
|
344
|
+
/* @__PURE__ */ jsxs(R, { children: [
|
|
291
345
|
/* @__PURE__ */ jsx(
|
|
292
|
-
|
|
346
|
+
E,
|
|
293
347
|
{
|
|
294
348
|
variant: "omega",
|
|
295
349
|
fontWeight: "bold",
|
|
@@ -298,7 +352,7 @@ function SettingsPage() {
|
|
|
298
352
|
}
|
|
299
353
|
),
|
|
300
354
|
/* @__PURE__ */ jsx(
|
|
301
|
-
|
|
355
|
+
Jm,
|
|
302
356
|
{
|
|
303
357
|
value: firebaseJsonValueInput,
|
|
304
358
|
height: 400,
|
|
@@ -308,9 +362,9 @@ function SettingsPage() {
|
|
|
308
362
|
}
|
|
309
363
|
)
|
|
310
364
|
] }),
|
|
311
|
-
/* @__PURE__ */ jsxs(
|
|
365
|
+
/* @__PURE__ */ jsxs(R, { marginTop: 4, children: [
|
|
312
366
|
/* @__PURE__ */ jsxs(
|
|
313
|
-
|
|
367
|
+
Nn,
|
|
314
368
|
{
|
|
315
369
|
variant: "tertiary",
|
|
316
370
|
onClick: () => setShowOptionalSettings(!showOptionalSettings),
|
|
@@ -321,11 +375,11 @@ function SettingsPage() {
|
|
|
321
375
|
]
|
|
322
376
|
}
|
|
323
377
|
),
|
|
324
|
-
showOptionalSettings && /* @__PURE__ */ jsxs(
|
|
325
|
-
/* @__PURE__ */ jsx(
|
|
326
|
-
/* @__PURE__ */ jsxs(
|
|
378
|
+
showOptionalSettings && /* @__PURE__ */ jsxs(R, { padding: 3, background: "neutral100", borderRadius: "4px", children: [
|
|
379
|
+
/* @__PURE__ */ jsx(E, { variant: "omega", marginBottom: 3, children: "The Web API Key is only needed if you want to use the emailLogin endpoint. Most users should authenticate with Firebase Client SDK instead." }),
|
|
380
|
+
/* @__PURE__ */ jsxs(R, { marginTop: 3, children: [
|
|
327
381
|
/* @__PURE__ */ jsx(
|
|
328
|
-
|
|
382
|
+
E,
|
|
329
383
|
{
|
|
330
384
|
variant: "omega",
|
|
331
385
|
fontWeight: "bold",
|
|
@@ -334,7 +388,7 @@ function SettingsPage() {
|
|
|
334
388
|
}
|
|
335
389
|
),
|
|
336
390
|
/* @__PURE__ */ jsx(
|
|
337
|
-
|
|
391
|
+
G0,
|
|
338
392
|
{
|
|
339
393
|
name: "firebaseWebApiKey",
|
|
340
394
|
value: firebaseWebApiKey,
|
|
@@ -344,10 +398,10 @@ function SettingsPage() {
|
|
|
344
398
|
}
|
|
345
399
|
)
|
|
346
400
|
] }),
|
|
347
|
-
/* @__PURE__ */ jsxs(
|
|
348
|
-
/* @__PURE__ */ jsx(
|
|
401
|
+
/* @__PURE__ */ jsxs(R, { marginTop: 3, padding: 2, background: "primary100", borderRadius: "4px", children: [
|
|
402
|
+
/* @__PURE__ */ jsx(E, { variant: "omega", fontWeight: "bold", children: "📍 Where to find your Web API Key:" }),
|
|
349
403
|
/* @__PURE__ */ jsxs("ol", { style: { marginLeft: 20, marginTop: 8 }, children: [
|
|
350
|
-
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
404
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(E, { variant: "omega", children: [
|
|
351
405
|
"Go to",
|
|
352
406
|
" ",
|
|
353
407
|
/* @__PURE__ */ jsx(
|
|
@@ -360,25 +414,25 @@ function SettingsPage() {
|
|
|
360
414
|
}
|
|
361
415
|
)
|
|
362
416
|
] }) }),
|
|
363
|
-
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
364
|
-
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
417
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(E, { variant: "omega", children: "Select your project" }) }),
|
|
418
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(E, { variant: "omega", children: [
|
|
365
419
|
"Click the gear icon → ",
|
|
366
420
|
/* @__PURE__ */ jsx("strong", { children: "Project Settings" })
|
|
367
421
|
] }) }),
|
|
368
|
-
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
422
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(E, { variant: "omega", children: [
|
|
369
423
|
"In the ",
|
|
370
424
|
/* @__PURE__ */ jsx("strong", { children: "General" }),
|
|
371
425
|
" tab, scroll down to ",
|
|
372
426
|
/* @__PURE__ */ jsx("strong", { children: "Your apps" })
|
|
373
427
|
] }) }),
|
|
374
|
-
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
428
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(E, { variant: "omega", children: [
|
|
375
429
|
"Find ",
|
|
376
430
|
/* @__PURE__ */ jsx("strong", { children: "Web API Key" }),
|
|
377
431
|
" (looks like: AIzaSyB3Xd...)"
|
|
378
432
|
] }) })
|
|
379
433
|
] })
|
|
380
434
|
] }),
|
|
381
|
-
/* @__PURE__ */ jsx(
|
|
435
|
+
/* @__PURE__ */ jsx(R, { marginTop: 3, padding: 2, background: "warning100", borderRadius: "4px", children: /* @__PURE__ */ jsxs(E, { variant: "omega", textColor: "warning700", children: [
|
|
382
436
|
"⚠️ ",
|
|
383
437
|
/* @__PURE__ */ jsx("strong", { children: "Recommendation:" }),
|
|
384
438
|
" Instead of using emailLogin endpoint, authenticate users on the client side using Firebase SDK and exchange the ID token. This is more secure and doesn't require the Web API Key configuration."
|
|
@@ -386,7 +440,7 @@ function SettingsPage() {
|
|
|
386
440
|
] })
|
|
387
441
|
] }),
|
|
388
442
|
/* @__PURE__ */ jsx(
|
|
389
|
-
|
|
443
|
+
T,
|
|
390
444
|
{
|
|
391
445
|
style: {
|
|
392
446
|
marginTop: 24,
|
|
@@ -394,7 +448,7 @@ function SettingsPage() {
|
|
|
394
448
|
},
|
|
395
449
|
justifyContent: "flex-end",
|
|
396
450
|
children: /* @__PURE__ */ jsx(
|
|
397
|
-
|
|
451
|
+
Nn,
|
|
398
452
|
{
|
|
399
453
|
size: "L",
|
|
400
454
|
onClick: handleFirebaseJsonSubmit,
|
|
@@ -404,14 +458,14 @@ function SettingsPage() {
|
|
|
404
458
|
)
|
|
405
459
|
}
|
|
406
460
|
),
|
|
407
|
-
/* @__PURE__ */ jsxs(
|
|
408
|
-
/* @__PURE__ */ jsx(
|
|
409
|
-
/* @__PURE__ */ jsxs(
|
|
410
|
-
/* @__PURE__ */ jsx(
|
|
411
|
-
/* @__PURE__ */ jsx(
|
|
461
|
+
/* @__PURE__ */ jsxs(R, { marginTop: 6, paddingTop: 4, style: { borderTop: "1px solid #eaeaef" }, children: [
|
|
462
|
+
/* @__PURE__ */ jsx(E, { variant: "beta", marginBottom: 3, children: "How to setup Firebase Service Account JSON:" }),
|
|
463
|
+
/* @__PURE__ */ jsxs(R, { padding: 3, background: "warning100", borderRadius: "4px", marginBottom: 4, children: [
|
|
464
|
+
/* @__PURE__ */ jsx(E, { variant: "omega", fontWeight: "bold", textColor: "warning700", children: "⚠️ Security Warning" }),
|
|
465
|
+
/* @__PURE__ */ jsx(E, { variant: "omega", textColor: "warning700", marginTop: 1, children: "The Service Account JSON contains sensitive credentials with full admin access to your Firebase project. Never commit this file to version control or share it publicly." })
|
|
412
466
|
] }),
|
|
413
|
-
/* @__PURE__ */ jsx(
|
|
414
|
-
/* @__PURE__ */ jsx("li", { style: { marginTop: 16 }, children: /* @__PURE__ */ jsxs(
|
|
467
|
+
/* @__PURE__ */ jsx(R, { marginLeft: 4, children: /* @__PURE__ */ jsxs("ol", { style: { listStyle: "decimal", paddingLeft: "20px" }, children: [
|
|
468
|
+
/* @__PURE__ */ jsx("li", { style: { marginTop: 16 }, children: /* @__PURE__ */ jsxs(E, { children: [
|
|
415
469
|
"Go to the",
|
|
416
470
|
" ",
|
|
417
471
|
/* @__PURE__ */ jsx(
|
|
@@ -426,40 +480,40 @@ function SettingsPage() {
|
|
|
426
480
|
" ",
|
|
427
481
|
"in your Firebase Console (Project Settings → Service Accounts)"
|
|
428
482
|
] }) }),
|
|
429
|
-
/* @__PURE__ */ jsx("li", { style: { marginTop: 16 }, children: /* @__PURE__ */ jsxs(
|
|
483
|
+
/* @__PURE__ */ jsx("li", { style: { marginTop: 16 }, children: /* @__PURE__ */ jsxs(E, { children: [
|
|
430
484
|
"Click the ",
|
|
431
485
|
/* @__PURE__ */ jsx("strong", { children: '"Generate New Private Key"' }),
|
|
432
486
|
" button"
|
|
433
487
|
] }) }),
|
|
434
|
-
/* @__PURE__ */ jsx("li", { style: { marginTop: 16 }, children: /* @__PURE__ */ jsxs(
|
|
488
|
+
/* @__PURE__ */ jsx("li", { style: { marginTop: 16 }, children: /* @__PURE__ */ jsxs(E, { children: [
|
|
435
489
|
"Confirm by clicking ",
|
|
436
490
|
/* @__PURE__ */ jsx("strong", { children: '"Generate Key"' }),
|
|
437
491
|
" in the confirmation dialog"
|
|
438
492
|
] }) }),
|
|
439
|
-
/* @__PURE__ */ jsx("li", { style: { marginTop: 16 }, children: /* @__PURE__ */ jsxs(
|
|
493
|
+
/* @__PURE__ */ jsx("li", { style: { marginTop: 16 }, children: /* @__PURE__ */ jsxs(E, { children: [
|
|
440
494
|
"A JSON file will be downloaded (e.g.,",
|
|
441
495
|
" ",
|
|
442
496
|
/* @__PURE__ */ jsx("code", { children: "your-project-firebase-adminsdk-xxxxx.json" }),
|
|
443
497
|
")"
|
|
444
498
|
] }) }),
|
|
445
|
-
/* @__PURE__ */ jsx("li", { style: { marginTop: 16 }, children: /* @__PURE__ */ jsxs(
|
|
499
|
+
/* @__PURE__ */ jsx("li", { style: { marginTop: 16 }, children: /* @__PURE__ */ jsxs(E, { children: [
|
|
446
500
|
"Open the downloaded JSON file, copy its ",
|
|
447
501
|
/* @__PURE__ */ jsx("strong", { children: "entire contents" }),
|
|
448
502
|
', and paste it in the "Firebase Service Account JSON" field above'
|
|
449
503
|
] }) }),
|
|
450
|
-
/* @__PURE__ */ jsx("li", { style: { marginTop: 16 }, children: /* @__PURE__ */ jsxs(
|
|
504
|
+
/* @__PURE__ */ jsx("li", { style: { marginTop: 16 }, children: /* @__PURE__ */ jsxs(E, { children: [
|
|
451
505
|
"Click ",
|
|
452
506
|
/* @__PURE__ */ jsx("strong", { children: "Submit" }),
|
|
453
507
|
" to save your configuration"
|
|
454
508
|
] }) }),
|
|
455
|
-
/* @__PURE__ */ jsx("li", { style: { marginTop: 16 }, children: /* @__PURE__ */ jsxs(
|
|
509
|
+
/* @__PURE__ */ jsx("li", { style: { marginTop: 16 }, children: /* @__PURE__ */ jsxs(E, { children: [
|
|
456
510
|
/* @__PURE__ */ jsx("em", { children: "(Optional)" }),
|
|
457
511
|
' If you need email/password authentication, expand "Optional: Email/Password Authentication" and add your Web API Key'
|
|
458
512
|
] }) })
|
|
459
513
|
] }) }),
|
|
460
|
-
/* @__PURE__ */ jsxs(
|
|
461
|
-
/* @__PURE__ */ jsx(
|
|
462
|
-
/* @__PURE__ */ jsxs(
|
|
514
|
+
/* @__PURE__ */ jsxs(R, { marginTop: 4, padding: 3, background: "neutral100", borderRadius: "4px", children: [
|
|
515
|
+
/* @__PURE__ */ jsx(E, { variant: "omega", fontWeight: "bold", children: "📝 Note: Service Account JSON vs Web App Config" }),
|
|
516
|
+
/* @__PURE__ */ jsxs(E, { variant: "omega", marginTop: 2, children: [
|
|
463
517
|
/* @__PURE__ */ jsx("strong", { children: "Service Account JSON" }),
|
|
464
518
|
" (what you need here): Contains",
|
|
465
519
|
" ",
|
|
@@ -470,7 +524,7 @@ function SettingsPage() {
|
|
|
470
524
|
/* @__PURE__ */ jsx("strong", { children: "Service Accounts tab" }),
|
|
471
525
|
"."
|
|
472
526
|
] }),
|
|
473
|
-
/* @__PURE__ */ jsxs(
|
|
527
|
+
/* @__PURE__ */ jsxs(E, { variant: "omega", marginTop: 2, children: [
|
|
474
528
|
/* @__PURE__ */ jsx("strong", { children: "Web App Config" }),
|
|
475
529
|
" (NOT what you need): Contains ",
|
|
476
530
|
/* @__PURE__ */ jsx("code", { children: "apiKey" }),
|
|
@@ -481,16 +535,16 @@ function SettingsPage() {
|
|
|
481
535
|
] })
|
|
482
536
|
] })
|
|
483
537
|
] })
|
|
484
|
-
] }) : /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
|
|
485
|
-
/* @__PURE__ */ jsxs(
|
|
486
|
-
/* @__PURE__ */ jsx(
|
|
487
|
-
/* @__PURE__ */ jsx(
|
|
538
|
+
] }) : /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(R, { padding: 4, background: "neutral0", children: [
|
|
539
|
+
/* @__PURE__ */ jsxs(R, { marginBottom: 4, children: [
|
|
540
|
+
/* @__PURE__ */ jsx(E, { variant: "delta", fontWeight: "bold", style: { marginBottom: "8px" }, children: "Service Account Configuration" }),
|
|
541
|
+
/* @__PURE__ */ jsx(R, { marginBottom: 3, children: /* @__PURE__ */ jsxs(E, { variant: "pi", textColor: "neutral600", component: "span", children: [
|
|
488
542
|
/* @__PURE__ */ jsx("strong", { children: "Required" }),
|
|
489
543
|
" - Enables Firebase Admin SDK for server-side authentication"
|
|
490
544
|
] }) }),
|
|
491
|
-
/* @__PURE__ */ jsxs(
|
|
492
|
-
/* @__PURE__ */ jsxs(
|
|
493
|
-
/* @__PURE__ */ jsxs(
|
|
545
|
+
/* @__PURE__ */ jsxs(T, { gap: 2, alignItems: "center", justifyContent: "space-between", children: [
|
|
546
|
+
/* @__PURE__ */ jsxs(T, { gap: 2, alignItems: "center", children: [
|
|
547
|
+
/* @__PURE__ */ jsxs(E, { variant: "omega", textColor: "neutral600", children: [
|
|
494
548
|
"Project:",
|
|
495
549
|
" ",
|
|
496
550
|
firebaseJsonValue?.firebaseConfigJson && (() => {
|
|
@@ -502,32 +556,32 @@ function SettingsPage() {
|
|
|
502
556
|
}
|
|
503
557
|
})()
|
|
504
558
|
] }),
|
|
505
|
-
/* @__PURE__ */ jsx(
|
|
559
|
+
/* @__PURE__ */ jsx(Is, { backgroundColor: "success200", textColor: "success700", size: "S", children: "✓ CONFIGURED" })
|
|
506
560
|
] }),
|
|
507
|
-
/* @__PURE__ */ jsx(
|
|
561
|
+
/* @__PURE__ */ jsx(Nn, { variant: "danger-light", size: "S", onClick: handleDeleteFirebaseJsonConfig, children: "Delete Config" })
|
|
508
562
|
] })
|
|
509
563
|
] }),
|
|
510
|
-
/* @__PURE__ */ jsxs(
|
|
511
|
-
/* @__PURE__ */ jsx(
|
|
512
|
-
/* @__PURE__ */ jsx(
|
|
564
|
+
/* @__PURE__ */ jsxs(R, { paddingTop: 4, style: { borderTop: "1px solid #eaeaef" }, children: [
|
|
565
|
+
/* @__PURE__ */ jsx(E, { variant: "delta", fontWeight: "bold", style: { marginBottom: "8px" }, children: "Web API Key Configuration" }),
|
|
566
|
+
/* @__PURE__ */ jsx(R, { marginBottom: 3, children: /* @__PURE__ */ jsxs(E, { variant: "pi", textColor: "neutral600", component: "span", children: [
|
|
513
567
|
/* @__PURE__ */ jsx("strong", { children: "Optional" }),
|
|
514
568
|
" - Only needed for email/password login via emailLogin endpoint"
|
|
515
569
|
] }) }),
|
|
516
|
-
/* @__PURE__ */ jsxs(
|
|
517
|
-
/* @__PURE__ */ jsxs(
|
|
518
|
-
firebaseWebApiKey?.trim() && /* @__PURE__ */ jsx(
|
|
519
|
-
firebaseWebApiKey?.trim() ? /* @__PURE__ */ jsx(
|
|
570
|
+
/* @__PURE__ */ jsxs(T, { gap: 2, alignItems: "center", justifyContent: "space-between", children: [
|
|
571
|
+
/* @__PURE__ */ jsxs(T, { gap: 2, alignItems: "center", children: [
|
|
572
|
+
firebaseWebApiKey?.trim() && /* @__PURE__ */ jsx(E, { variant: "omega", textColor: "neutral600", children: `${firebaseWebApiKey.substring(0, 10)}...` }),
|
|
573
|
+
firebaseWebApiKey?.trim() ? /* @__PURE__ */ jsx(Is, { backgroundColor: "success200", textColor: "success700", size: "S", children: "✓ CONFIGURED" }) : /* @__PURE__ */ jsx(Is, { backgroundColor: "neutral200", textColor: "neutral700", size: "S", children: "NOT SET" })
|
|
520
574
|
] }),
|
|
521
|
-
firebaseWebApiKey?.trim() ? /* @__PURE__ */ jsx(
|
|
575
|
+
firebaseWebApiKey?.trim() ? /* @__PURE__ */ jsx(Nn, { variant: "danger-light", size: "S", onClick: handleRemoveWebApiKey, children: "Delete Config" }) : /* @__PURE__ */ jsx(Nn, { variant: "secondary", size: "S", onClick: handleAddWebApiKey, children: "+ Add Web API Key" })
|
|
522
576
|
] })
|
|
523
577
|
] })
|
|
524
578
|
] }) });
|
|
525
579
|
})()
|
|
526
580
|
] }),
|
|
527
|
-
/* @__PURE__ */ jsxs(
|
|
528
|
-
/* @__PURE__ */ jsx(
|
|
581
|
+
/* @__PURE__ */ jsxs(R, { padding: 4, background: "neutral0", borderRadius: "4px", shadow: "filterShadow", marginBottom: 6, children: [
|
|
582
|
+
/* @__PURE__ */ jsx(E, { variant: "alpha", as: "h2", style: { display: "block", marginBottom: "8px" }, children: "Password Reset Settings" }),
|
|
529
583
|
/* @__PURE__ */ jsx(
|
|
530
|
-
|
|
584
|
+
E,
|
|
531
585
|
{
|
|
532
586
|
variant: "omega",
|
|
533
587
|
textColor: "neutral600",
|
|
@@ -535,10 +589,10 @@ function SettingsPage() {
|
|
|
535
589
|
children: "Configure password requirements and email settings for password reset functionality"
|
|
536
590
|
}
|
|
537
591
|
),
|
|
538
|
-
/* @__PURE__ */ jsxs(
|
|
539
|
-
/* @__PURE__ */ jsx(
|
|
592
|
+
/* @__PURE__ */ jsxs(R, { marginBottom: 3, children: [
|
|
593
|
+
/* @__PURE__ */ jsx(E, { variant: "omega", fontWeight: "bold", style: { display: "block", marginBottom: "8px" }, children: "Password Requirements (Regex)" }),
|
|
540
594
|
/* @__PURE__ */ jsx(
|
|
541
|
-
|
|
595
|
+
G0,
|
|
542
596
|
{
|
|
543
597
|
name: "passwordRequirementsRegex",
|
|
544
598
|
value: passwordRequirementsRegex,
|
|
@@ -548,10 +602,10 @@ function SettingsPage() {
|
|
|
548
602
|
}
|
|
549
603
|
)
|
|
550
604
|
] }),
|
|
551
|
-
/* @__PURE__ */ jsxs(
|
|
552
|
-
/* @__PURE__ */ jsx(
|
|
605
|
+
/* @__PURE__ */ jsxs(R, { marginBottom: 3, children: [
|
|
606
|
+
/* @__PURE__ */ jsx(E, { variant: "omega", fontWeight: "bold", style: { display: "block", marginBottom: "8px" }, children: "Password Requirements Message" }),
|
|
553
607
|
/* @__PURE__ */ jsx(
|
|
554
|
-
|
|
608
|
+
M1,
|
|
555
609
|
{
|
|
556
610
|
name: "passwordRequirementsMessage",
|
|
557
611
|
value: passwordRequirementsMessage,
|
|
@@ -561,36 +615,9 @@ function SettingsPage() {
|
|
|
561
615
|
}
|
|
562
616
|
)
|
|
563
617
|
] }),
|
|
564
|
-
/* @__PURE__ */ jsxs(
|
|
565
|
-
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "bold", style: { display: "block", marginBottom: "8px" }, children: "Password Reset URL *" }),
|
|
618
|
+
/* @__PURE__ */ jsxs(R, { marginBottom: 4, padding: 3, background: "neutral100", borderRadius: "4px", children: [
|
|
566
619
|
/* @__PURE__ */ jsx(
|
|
567
|
-
|
|
568
|
-
{
|
|
569
|
-
name: "passwordResetUrl",
|
|
570
|
-
value: passwordResetUrl,
|
|
571
|
-
onChange: (e) => setPasswordResetUrl(e.target.value),
|
|
572
|
-
placeholder: "https://yourapp.com/reset-password",
|
|
573
|
-
hint: "URL where users will reset their password (your frontend application)",
|
|
574
|
-
required: true
|
|
575
|
-
}
|
|
576
|
-
)
|
|
577
|
-
] }),
|
|
578
|
-
/* @__PURE__ */ jsxs(Box, { marginBottom: 3, children: [
|
|
579
|
-
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "bold", style: { display: "block", marginBottom: "8px" }, children: "Reset Email Subject" }),
|
|
580
|
-
/* @__PURE__ */ jsx(
|
|
581
|
-
TextInput,
|
|
582
|
-
{
|
|
583
|
-
name: "passwordResetEmailSubject",
|
|
584
|
-
value: passwordResetEmailSubject,
|
|
585
|
-
onChange: (e) => setPasswordResetEmailSubject(e.target.value),
|
|
586
|
-
placeholder: "Reset Your Password",
|
|
587
|
-
hint: "Subject line for password reset emails"
|
|
588
|
-
}
|
|
589
|
-
)
|
|
590
|
-
] }),
|
|
591
|
-
/* @__PURE__ */ jsxs(Box, { marginTop: 4, padding: 3, background: "neutral100", borderRadius: "4px", children: [
|
|
592
|
-
/* @__PURE__ */ jsx(
|
|
593
|
-
Typography,
|
|
620
|
+
E,
|
|
594
621
|
{
|
|
595
622
|
variant: "omega",
|
|
596
623
|
fontWeight: "bold",
|
|
@@ -598,45 +625,131 @@ function SettingsPage() {
|
|
|
598
625
|
children: "Common Password Patterns:"
|
|
599
626
|
}
|
|
600
627
|
),
|
|
601
|
-
/* @__PURE__ */ jsxs(
|
|
602
|
-
/* @__PURE__ */ jsxs(
|
|
628
|
+
/* @__PURE__ */ jsxs(R, { marginLeft: 2, children: [
|
|
629
|
+
/* @__PURE__ */ jsxs(E, { variant: "omega", style: { display: "block", marginBottom: "8px" }, children: [
|
|
603
630
|
"• ",
|
|
604
631
|
/* @__PURE__ */ jsx("code", { children: "^.{6,}$" }),
|
|
605
632
|
" - Minimum 6 characters (simple)"
|
|
606
633
|
] }),
|
|
607
|
-
/* @__PURE__ */ jsxs(
|
|
634
|
+
/* @__PURE__ */ jsxs(E, { variant: "omega", style: { display: "block", marginBottom: "8px" }, children: [
|
|
608
635
|
"• ",
|
|
609
636
|
/* @__PURE__ */ jsx("code", { children: "^.{8,}$" }),
|
|
610
637
|
" - Minimum 8 characters"
|
|
611
638
|
] }),
|
|
612
|
-
/* @__PURE__ */ jsxs(
|
|
639
|
+
/* @__PURE__ */ jsxs(E, { variant: "omega", style: { display: "block", marginBottom: "8px" }, children: [
|
|
613
640
|
"• ",
|
|
614
641
|
/* @__PURE__ */ jsx("code", { children: "^(?=.*[A-Za-z])(?=.*\\d)[A-Za-z\\d]{8,}$" }),
|
|
615
642
|
" - At least 8 chars with letters and numbers"
|
|
616
643
|
] }),
|
|
617
|
-
/* @__PURE__ */ jsxs(
|
|
644
|
+
/* @__PURE__ */ jsxs(E, { variant: "omega", style: { display: "block" }, children: [
|
|
618
645
|
"• ",
|
|
619
646
|
/* @__PURE__ */ jsx("code", { children: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,}$" }),
|
|
620
647
|
" - Complex (upper, lower, number, special)"
|
|
621
648
|
] })
|
|
622
649
|
] })
|
|
623
650
|
] }),
|
|
651
|
+
/* @__PURE__ */ jsxs(R, { marginBottom: 3, children: [
|
|
652
|
+
/* @__PURE__ */ jsx(E, { variant: "omega", fontWeight: "bold", style: { display: "block", marginBottom: "8px" }, children: "Password Reset URL *" }),
|
|
653
|
+
/* @__PURE__ */ jsx(
|
|
654
|
+
G0,
|
|
655
|
+
{
|
|
656
|
+
name: "passwordResetUrl",
|
|
657
|
+
value: passwordResetUrl,
|
|
658
|
+
onChange: (e) => setPasswordResetUrl(e.target.value),
|
|
659
|
+
placeholder: "https://yourapp.com/reset-password",
|
|
660
|
+
hint: "URL where users will reset their password (your frontend application)",
|
|
661
|
+
required: true
|
|
662
|
+
}
|
|
663
|
+
)
|
|
664
|
+
] }),
|
|
665
|
+
/* @__PURE__ */ jsxs(R, { marginBottom: 3, children: [
|
|
666
|
+
/* @__PURE__ */ jsx(E, { variant: "omega", fontWeight: "bold", style: { display: "block", marginBottom: "8px" }, children: "Reset Email Subject" }),
|
|
667
|
+
/* @__PURE__ */ jsx(
|
|
668
|
+
G0,
|
|
669
|
+
{
|
|
670
|
+
name: "passwordResetEmailSubject",
|
|
671
|
+
value: passwordResetEmailSubject,
|
|
672
|
+
onChange: (e) => setPasswordResetEmailSubject(e.target.value),
|
|
673
|
+
placeholder: "Reset Your Password",
|
|
674
|
+
hint: "Subject line for password reset emails"
|
|
675
|
+
}
|
|
676
|
+
)
|
|
677
|
+
] }),
|
|
624
678
|
/* @__PURE__ */ jsx(
|
|
625
|
-
|
|
679
|
+
T,
|
|
626
680
|
{
|
|
627
681
|
style: {
|
|
628
682
|
marginTop: 24,
|
|
629
683
|
width: "100%"
|
|
630
684
|
},
|
|
631
685
|
justifyContent: "flex-end",
|
|
632
|
-
children: /* @__PURE__ */ jsx(
|
|
686
|
+
children: /* @__PURE__ */ jsx(Nn, { size: "L", variant: "secondary", onClick: handleSavePasswordSettings, children: "Save Password Settings" })
|
|
687
|
+
}
|
|
688
|
+
)
|
|
689
|
+
] }),
|
|
690
|
+
/* @__PURE__ */ jsxs(R, { padding: 4, background: "neutral0", borderRadius: "4px", shadow: "filterShadow", marginBottom: 6, children: [
|
|
691
|
+
/* @__PURE__ */ jsx(E, { variant: "alpha", as: "h2", style: { display: "block", marginBottom: "8px" }, children: "Email Verification" }),
|
|
692
|
+
/* @__PURE__ */ jsx(
|
|
693
|
+
E,
|
|
694
|
+
{
|
|
695
|
+
variant: "omega",
|
|
696
|
+
textColor: "neutral600",
|
|
697
|
+
style: { display: "block", marginBottom: "24px" },
|
|
698
|
+
children: "Configure email verification settings for new user registration"
|
|
699
|
+
}
|
|
700
|
+
),
|
|
701
|
+
/* @__PURE__ */ jsxs(R, { marginBottom: 3, children: [
|
|
702
|
+
/* @__PURE__ */ jsx(E, { variant: "omega", fontWeight: "bold", style: { display: "block", marginBottom: "8px" }, children: "Email Verification URL *" }),
|
|
703
|
+
/* @__PURE__ */ jsx(
|
|
704
|
+
G0,
|
|
705
|
+
{
|
|
706
|
+
name: "emailVerificationUrl",
|
|
707
|
+
value: emailVerificationUrl,
|
|
708
|
+
onChange: (e) => setEmailVerificationUrl(e.target.value),
|
|
709
|
+
placeholder: "https://yourapp.com/verify-email",
|
|
710
|
+
hint: "URL where users will verify their email address (your frontend application)",
|
|
711
|
+
required: true
|
|
712
|
+
}
|
|
713
|
+
)
|
|
714
|
+
] }),
|
|
715
|
+
/* @__PURE__ */ jsxs(R, { marginBottom: 3, children: [
|
|
716
|
+
/* @__PURE__ */ jsx(E, { variant: "omega", fontWeight: "bold", style: { display: "block", marginBottom: "8px" }, children: "Verification Email Subject" }),
|
|
717
|
+
/* @__PURE__ */ jsx(
|
|
718
|
+
G0,
|
|
719
|
+
{
|
|
720
|
+
name: "emailVerificationEmailSubject",
|
|
721
|
+
value: emailVerificationEmailSubject,
|
|
722
|
+
onChange: (e) => setEmailVerificationEmailSubject(e.target.value),
|
|
723
|
+
placeholder: "Verify Your Email",
|
|
724
|
+
hint: "Subject line for email verification emails"
|
|
725
|
+
}
|
|
726
|
+
)
|
|
727
|
+
] }),
|
|
728
|
+
/* @__PURE__ */ jsx(
|
|
729
|
+
T,
|
|
730
|
+
{
|
|
731
|
+
style: {
|
|
732
|
+
marginTop: 24,
|
|
733
|
+
width: "100%"
|
|
734
|
+
},
|
|
735
|
+
justifyContent: "flex-end",
|
|
736
|
+
children: /* @__PURE__ */ jsx(
|
|
737
|
+
Nn,
|
|
738
|
+
{
|
|
739
|
+
size: "L",
|
|
740
|
+
variant: "secondary",
|
|
741
|
+
onClick: handleSaveEmailVerificationSettings,
|
|
742
|
+
disabled: loading,
|
|
743
|
+
children: "Save Email Verification Settings"
|
|
744
|
+
}
|
|
745
|
+
)
|
|
633
746
|
}
|
|
634
747
|
)
|
|
635
748
|
] }),
|
|
636
|
-
/* @__PURE__ */ jsxs(
|
|
637
|
-
/* @__PURE__ */ jsx(
|
|
749
|
+
/* @__PURE__ */ jsxs(R, { padding: 4, background: "neutral0", borderRadius: "4px", shadow: "filterShadow", marginBottom: 6, children: [
|
|
750
|
+
/* @__PURE__ */ jsx(E, { variant: "alpha", as: "h2", style: { display: "block", marginBottom: "8px" }, children: "Magic Link Authentication" }),
|
|
638
751
|
/* @__PURE__ */ jsx(
|
|
639
|
-
|
|
752
|
+
E,
|
|
640
753
|
{
|
|
641
754
|
variant: "omega",
|
|
642
755
|
textColor: "neutral600",
|
|
@@ -644,9 +757,9 @@ function SettingsPage() {
|
|
|
644
757
|
children: "Configure passwordless authentication via email magic links"
|
|
645
758
|
}
|
|
646
759
|
),
|
|
647
|
-
/* @__PURE__ */ jsx(
|
|
760
|
+
/* @__PURE__ */ jsx(R, { marginBottom: 3, children: /* @__PURE__ */ jsxs(T, { alignItems: "center", gap: 2, children: [
|
|
648
761
|
/* @__PURE__ */ jsx(
|
|
649
|
-
|
|
762
|
+
D1,
|
|
650
763
|
{
|
|
651
764
|
name: "enableMagicLink",
|
|
652
765
|
label: "Enable Magic Link Authentication",
|
|
@@ -656,7 +769,7 @@ function SettingsPage() {
|
|
|
656
769
|
}
|
|
657
770
|
),
|
|
658
771
|
/* @__PURE__ */ jsx(
|
|
659
|
-
|
|
772
|
+
E,
|
|
660
773
|
{
|
|
661
774
|
variant: "pi",
|
|
662
775
|
fontWeight: "bold",
|
|
@@ -666,9 +779,9 @@ function SettingsPage() {
|
|
|
666
779
|
)
|
|
667
780
|
] }) }),
|
|
668
781
|
enableMagicLink && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
669
|
-
/* @__PURE__ */ jsxs(
|
|
782
|
+
/* @__PURE__ */ jsxs(R, { marginBottom: 3, children: [
|
|
670
783
|
/* @__PURE__ */ jsx(
|
|
671
|
-
|
|
784
|
+
E,
|
|
672
785
|
{
|
|
673
786
|
variant: "omega",
|
|
674
787
|
fontWeight: "bold",
|
|
@@ -677,7 +790,7 @@ function SettingsPage() {
|
|
|
677
790
|
}
|
|
678
791
|
),
|
|
679
792
|
/* @__PURE__ */ jsx(
|
|
680
|
-
|
|
793
|
+
G0,
|
|
681
794
|
{
|
|
682
795
|
name: "magicLinkUrl",
|
|
683
796
|
value: magicLinkUrl,
|
|
@@ -688,9 +801,9 @@ function SettingsPage() {
|
|
|
688
801
|
}
|
|
689
802
|
)
|
|
690
803
|
] }),
|
|
691
|
-
/* @__PURE__ */ jsxs(
|
|
804
|
+
/* @__PURE__ */ jsxs(R, { marginBottom: 3, children: [
|
|
692
805
|
/* @__PURE__ */ jsx(
|
|
693
|
-
|
|
806
|
+
E,
|
|
694
807
|
{
|
|
695
808
|
variant: "omega",
|
|
696
809
|
fontWeight: "bold",
|
|
@@ -699,7 +812,7 @@ function SettingsPage() {
|
|
|
699
812
|
}
|
|
700
813
|
),
|
|
701
814
|
/* @__PURE__ */ jsx(
|
|
702
|
-
|
|
815
|
+
G0,
|
|
703
816
|
{
|
|
704
817
|
name: "magicLinkEmailSubject",
|
|
705
818
|
value: magicLinkEmailSubject,
|
|
@@ -709,9 +822,9 @@ function SettingsPage() {
|
|
|
709
822
|
}
|
|
710
823
|
)
|
|
711
824
|
] }),
|
|
712
|
-
/* @__PURE__ */ jsxs(
|
|
825
|
+
/* @__PURE__ */ jsxs(R, { marginBottom: 3, children: [
|
|
713
826
|
/* @__PURE__ */ jsx(
|
|
714
|
-
|
|
827
|
+
E,
|
|
715
828
|
{
|
|
716
829
|
variant: "omega",
|
|
717
830
|
fontWeight: "bold",
|
|
@@ -720,7 +833,7 @@ function SettingsPage() {
|
|
|
720
833
|
}
|
|
721
834
|
),
|
|
722
835
|
/* @__PURE__ */ jsx(
|
|
723
|
-
|
|
836
|
+
i1,
|
|
724
837
|
{
|
|
725
838
|
name: "magicLinkExpiryHours",
|
|
726
839
|
value: magicLinkExpiryHours,
|
|
@@ -731,9 +844,9 @@ function SettingsPage() {
|
|
|
731
844
|
}
|
|
732
845
|
)
|
|
733
846
|
] }),
|
|
734
|
-
/* @__PURE__ */ jsxs(
|
|
847
|
+
/* @__PURE__ */ jsxs(R, { marginTop: 4, padding: 3, background: "primary100", borderRadius: "4px", children: [
|
|
735
848
|
/* @__PURE__ */ jsx(
|
|
736
|
-
|
|
849
|
+
E,
|
|
737
850
|
{
|
|
738
851
|
variant: "omega",
|
|
739
852
|
fontWeight: "bold",
|
|
@@ -741,32 +854,32 @@ function SettingsPage() {
|
|
|
741
854
|
children: "Setup Requirements:"
|
|
742
855
|
}
|
|
743
856
|
),
|
|
744
|
-
/* @__PURE__ */ jsxs(
|
|
745
|
-
/* @__PURE__ */ jsxs(
|
|
857
|
+
/* @__PURE__ */ jsxs(R, { marginLeft: 2, children: [
|
|
858
|
+
/* @__PURE__ */ jsxs(E, { variant: "omega", style: { display: "block", marginBottom: "8px" }, children: [
|
|
746
859
|
"1. ",
|
|
747
860
|
/* @__PURE__ */ jsx("strong", { children: "Firebase Console:" }),
|
|
748
861
|
' Enable "Email link (passwordless sign-in)" in Authentication → Sign-in method'
|
|
749
862
|
] }),
|
|
750
|
-
/* @__PURE__ */ jsxs(
|
|
863
|
+
/* @__PURE__ */ jsxs(E, { variant: "omega", style: { display: "block", marginBottom: "8px" }, children: [
|
|
751
864
|
"2. ",
|
|
752
865
|
/* @__PURE__ */ jsx("strong", { children: "Authorized Domains:" }),
|
|
753
866
|
" Add your domain to Firebase authorized domains list"
|
|
754
867
|
] }),
|
|
755
|
-
/* @__PURE__ */ jsxs(
|
|
868
|
+
/* @__PURE__ */ jsxs(E, { variant: "omega", style: { display: "block", marginBottom: "8px" }, children: [
|
|
756
869
|
"3. ",
|
|
757
870
|
/* @__PURE__ */ jsx("strong", { children: "Verification Page:" }),
|
|
758
871
|
" Deploy the client-side verification handler at the URL above"
|
|
759
872
|
] }),
|
|
760
|
-
/* @__PURE__ */ jsxs(
|
|
873
|
+
/* @__PURE__ */ jsxs(E, { variant: "omega", style: { display: "block", marginBottom: "8px" }, children: [
|
|
761
874
|
"4. ",
|
|
762
875
|
/* @__PURE__ */ jsx("strong", { children: "Email Service:" }),
|
|
763
876
|
" Configure Strapi Email plugin or custom email hook"
|
|
764
877
|
] })
|
|
765
878
|
] })
|
|
766
879
|
] }),
|
|
767
|
-
/* @__PURE__ */ jsxs(
|
|
880
|
+
/* @__PURE__ */ jsxs(R, { marginTop: 3, padding: 3, background: "neutral100", borderRadius: "4px", children: [
|
|
768
881
|
/* @__PURE__ */ jsx(
|
|
769
|
-
|
|
882
|
+
E,
|
|
770
883
|
{
|
|
771
884
|
variant: "omega",
|
|
772
885
|
fontWeight: "bold",
|
|
@@ -774,34 +887,34 @@ function SettingsPage() {
|
|
|
774
887
|
children: "🧪 Testing:"
|
|
775
888
|
}
|
|
776
889
|
),
|
|
777
|
-
/* @__PURE__ */ jsxs(
|
|
890
|
+
/* @__PURE__ */ jsxs(E, { variant: "omega", style: { display: "block" }, children: [
|
|
778
891
|
"Test page available at:",
|
|
779
892
|
" ",
|
|
780
893
|
/* @__PURE__ */ jsx("a", { href: "/test-magic-link.html", target: "_blank", rel: "noreferrer", children: "/test-magic-link.html" })
|
|
781
894
|
] }),
|
|
782
|
-
/* @__PURE__ */ jsx(
|
|
895
|
+
/* @__PURE__ */ jsx(E, { variant: "omega", style: { display: "block", marginTop: "4px" }, children: "In development mode, magic links are logged to the server console." })
|
|
783
896
|
] })
|
|
784
897
|
] }),
|
|
785
898
|
/* @__PURE__ */ jsx(
|
|
786
|
-
|
|
899
|
+
T,
|
|
787
900
|
{
|
|
788
901
|
style: {
|
|
789
902
|
marginTop: 24,
|
|
790
903
|
width: "100%"
|
|
791
904
|
},
|
|
792
905
|
justifyContent: "flex-end",
|
|
793
|
-
children: /* @__PURE__ */ jsx(
|
|
906
|
+
children: /* @__PURE__ */ jsx(Nn, { size: "L", variant: "secondary", onClick: handleSaveMagicLinkSettings, disabled: loading, children: "Save Magic Link Settings" })
|
|
794
907
|
}
|
|
795
908
|
)
|
|
796
909
|
] })
|
|
797
910
|
] }) }),
|
|
798
|
-
/* @__PURE__ */ jsx(
|
|
799
|
-
/* @__PURE__ */ jsx(
|
|
800
|
-
/* @__PURE__ */ jsx(
|
|
801
|
-
/* @__PURE__ */ jsx(
|
|
802
|
-
/* @__PURE__ */ jsxs(
|
|
911
|
+
/* @__PURE__ */ jsx(t1.Root, { open: showEditModal, onOpenChange: (open) => !open && setShowEditModal(false), children: /* @__PURE__ */ jsxs(t1.Content, { children: [
|
|
912
|
+
/* @__PURE__ */ jsx(t1.Header, { children: /* @__PURE__ */ jsx(t1.Title, { children: "Add Firebase Web API Key" }) }),
|
|
913
|
+
/* @__PURE__ */ jsx(t1.Body, { children: /* @__PURE__ */ jsxs(R, { padding: 4, children: [
|
|
914
|
+
/* @__PURE__ */ jsx(E, { variant: "omega", marginBottom: 2, children: "Add your Firebase Web API Key to enable the emailLogin endpoint. This is optional and only needed if you want to authenticate users with email/password directly through your backend." }),
|
|
915
|
+
/* @__PURE__ */ jsxs(R, { marginTop: 3, children: [
|
|
803
916
|
/* @__PURE__ */ jsx(
|
|
804
|
-
|
|
917
|
+
E,
|
|
805
918
|
{
|
|
806
919
|
variant: "omega",
|
|
807
920
|
fontWeight: "bold",
|
|
@@ -810,7 +923,7 @@ function SettingsPage() {
|
|
|
810
923
|
}
|
|
811
924
|
),
|
|
812
925
|
/* @__PURE__ */ jsx(
|
|
813
|
-
|
|
926
|
+
G0,
|
|
814
927
|
{
|
|
815
928
|
name: "editWebApiKey",
|
|
816
929
|
value: editWebApiKey,
|
|
@@ -820,26 +933,26 @@ function SettingsPage() {
|
|
|
820
933
|
}
|
|
821
934
|
)
|
|
822
935
|
] }),
|
|
823
|
-
/* @__PURE__ */ jsxs(
|
|
824
|
-
/* @__PURE__ */ jsx(
|
|
936
|
+
/* @__PURE__ */ jsxs(R, { marginTop: 3, padding: 2, background: "primary100", borderRadius: "4px", children: [
|
|
937
|
+
/* @__PURE__ */ jsx(E, { variant: "omega", fontWeight: "bold", children: "📍 Where to find your Web API Key:" }),
|
|
825
938
|
/* @__PURE__ */ jsxs("ol", { style: { marginLeft: 20, marginTop: 8 }, children: [
|
|
826
|
-
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
939
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(E, { variant: "omega", children: [
|
|
827
940
|
"Go to",
|
|
828
941
|
" ",
|
|
829
942
|
/* @__PURE__ */ jsx("a", { href: "https://console.firebase.google.com", target: "_blank", rel: "noreferrer", children: "Firebase Console" })
|
|
830
943
|
] }) }),
|
|
831
|
-
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
832
|
-
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
944
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(E, { variant: "omega", children: "Select your project" }) }),
|
|
945
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(E, { variant: "omega", children: [
|
|
833
946
|
"Click the gear icon ⚙️ → ",
|
|
834
947
|
/* @__PURE__ */ jsx("strong", { children: "Project Settings" })
|
|
835
948
|
] }) }),
|
|
836
|
-
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
949
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(E, { variant: "omega", children: [
|
|
837
950
|
"In the ",
|
|
838
951
|
/* @__PURE__ */ jsx("strong", { children: "General" }),
|
|
839
952
|
" tab, scroll down to ",
|
|
840
953
|
/* @__PURE__ */ jsx("strong", { children: "Your apps" })
|
|
841
954
|
] }) }),
|
|
842
|
-
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
955
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(E, { variant: "omega", children: [
|
|
843
956
|
"Find ",
|
|
844
957
|
/* @__PURE__ */ jsx("strong", { children: "Web API Key" }),
|
|
845
958
|
" (looks like: AIzaSyB3Xd...)"
|
|
@@ -847,9 +960,9 @@ function SettingsPage() {
|
|
|
847
960
|
] })
|
|
848
961
|
] })
|
|
849
962
|
] }) }),
|
|
850
|
-
/* @__PURE__ */ jsx(
|
|
851
|
-
/* @__PURE__ */ jsx(
|
|
852
|
-
/* @__PURE__ */ jsx(
|
|
963
|
+
/* @__PURE__ */ jsx(t1.Footer, { children: /* @__PURE__ */ jsxs(T, { justifyContent: "flex-end", gap: 2, children: [
|
|
964
|
+
/* @__PURE__ */ jsx(Nn, { variant: "tertiary", onClick: () => setShowEditModal(false), children: "Cancel" }),
|
|
965
|
+
/* @__PURE__ */ jsx(Nn, { variant: "default", onClick: handleSaveEditConfiguration, children: "Add API Key" })
|
|
853
966
|
] }) })
|
|
854
967
|
] }) })
|
|
855
968
|
] });
|