From 49a5878460d82e650a9985eada0ee1a0c2852c11 Mon Sep 17 00:00:00 2001 From: Eoghan Conlon Date: Sun, 27 Aug 2023 16:47:47 +0100 Subject: [PATCH] Object generated from form and url Signed-off-by: Eoghan Conlon --- src/recovery/reset.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/recovery/reset.html b/src/recovery/reset.html index ddd718f..cf2c7bf 100644 --- a/src/recovery/reset.html +++ b/src/recovery/reset.html @@ -30,7 +30,11 @@ const formData = new FormData(formEl); const pass = formData.get("password"); if(pass === formData.get("confirm")){ - alert("Passwords match"); + const url = new URL(window.location.href); + const urlParam = new URLSearchParams(url.search); + const auth = urlParam.get("auth"); + const object = {auth: auth, pass: pass }; + alert(JSON.stringify(object)); } else { document.getElementById('formStatus').innerHTML = "Failure: Passwords don't match"; }