added email

This commit is contained in:
oliver
2026-06-08 10:31:31 -03:00
parent 88d4a2d87f
commit 2a8c4c4515
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -341,7 +341,7 @@ Body: { email }
Step 2 — save new password Step 2 — save new password
POST https://n8n.derez.ai/webhook/c2ce0eba-eb26-405d-8a90-8d982ec30698/update POST https://n8n.derez.ai/webhook/c2ce0eba-eb26-405d-8a90-8d982ec30698/update
Body: { token, password } Body: { token, password, email }
``` ```
**Step 1** is triggered from `index.html` when the user clicks **Send reset email** inside `#reset-pw-wrap` (visible only after a failed sign-in). The response is intentionally ignored and the sent-confirmation is always shown — this avoids revealing whether the email address exists. **Step 1** is triggered from `index.html` when the user clicks **Send reset email** inside `#reset-pw-wrap` (visible only after a failed sign-in). The response is intentionally ignored and the sent-confirmation is always shown — this avoids revealing whether the email address exists.
+4 -3
View File
@@ -813,11 +813,12 @@
"https://n8n.derez.ai/webhook/c2ce0eba-eb26-405d-8a90-8d982ec30698/update"; "https://n8n.derez.ai/webhook/c2ce0eba-eb26-405d-8a90-8d982ec30698/update";
const APP_URL = "https://app.derez.ai"; const APP_URL = "https://app.derez.ai";
/* ─── Extract token from URL ─────────────────────── */ /* ─── Extract token + email from URL ──────────────── */
const params = new URLSearchParams(window.location.search); const params = new URLSearchParams(window.location.search);
const token = params.get("token"); const token = params.get("token");
const email = params.get("email") || "";
/* ─── Init ───────────────────────────────────────── */ /* ─── Init ───────────────────────────────────── */
if (!token || token.length < 8) { if (!token || token.length < 8) {
document.getElementById("invalid-state").style.display = "flex"; document.getElementById("invalid-state").style.display = "flex";
} else { } else {
@@ -910,7 +911,7 @@
const res = await fetch(RESET_URL, { const res = await fetch(RESET_URL, {
method: "POST", method: "POST",
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
body: JSON.stringify({ token, password }), body: JSON.stringify({ token, password, email }),
}); });
if (!res.ok) if (!res.ok)