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