From 8d38379199c3ce9edb0dd1b5e264eb9ffc12a548 Mon Sep 17 00:00:00 2001 From: hayasaka Date: Fri, 18 Aug 2023 09:54:50 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8B=89=E5=BC=B7=E4=BC=9A=E3=81=A7?= =?UTF-8?q?=E6=8C=87=E6=91=98=E3=81=8C=E3=81=82=E3=81=A3=E3=81=9F=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- did-login/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/did-login/README.md b/did-login/README.md index f49c640..b8944a5 100644 --- a/did-login/README.md +++ b/did-login/README.md @@ -76,6 +76,7 @@ DID とは分散型 ID のことで、公開鍵暗号技術の公開鍵のこと const name = document.getElementById("name").value; if (name === "") { document.getElementById("error").innerText = "名前は必須パラメータです"; + return; } }; @@ -126,6 +127,8 @@ document.getElementById("submit").onclick = async () => { // DIDとパスワードの保存処理 document.getElementById("saveBtn").onclick = async () => { + event.preventDefault(); + const did = document.getElementById("did").value; const password = document.getElementById("password").value; DIDAuth.savePem(did, password); @@ -319,7 +322,7 @@ document // 公開鍵・電子署名をサーバーに渡す try { const resp = await fetch(path, { - method, + method: method, headers: { "Content-Type": "application/json" }, body: JSON.stringify({ did, sign, message }), }); From a85a2db3851d9850deca692e7af3c71ea513af2f Mon Sep 17 00:00:00 2001 From: hayasaka Date: Tue, 22 Aug 2023 09:55:30 +0900 Subject: [PATCH 2/2] =?UTF-8?q?event=E3=82=92=E5=8F=97=E3=81=91=E5=8F=96?= =?UTF-8?q?=E3=81=A3=E3=81=A6=E3=81=84=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F?= =?UTF-8?q?=E3=81=AE=E3=81=A7=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- did-login/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/did-login/README.md b/did-login/README.md index b8944a5..db3e61d 100644 --- a/did-login/README.md +++ b/did-login/README.md @@ -126,7 +126,7 @@ document.getElementById("submit").onclick = async () => { }; // DIDとパスワードの保存処理 -document.getElementById("saveBtn").onclick = async () => { +document.getElementById("saveBtn").onclick = async (event) => { event.preventDefault(); const did = document.getElementById("did").value;