diff options
author | Matthew Miller <matthew@millerti.me> | 2020-05-22 12:11:37 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2020-05-22 12:11:37 -0700 |
commit | 579eddd0b06a3d2f97e1dcf33f15c0b45bfc19eb (patch) | |
tree | 86a9e6c294803e41ce16a63e1d2cced3edea2bfc | |
parent | 9948cb5a798406348c9025d69903196e94bc4d7a (diff) |
Add POST back to server with attestation response
-rw-r--r-- | example/public/register/index.html | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/example/public/register/index.html b/example/public/register/index.html index 5d0362d..4ea6d81 100644 --- a/example/public/register/index.html +++ b/example/public/register/index.html @@ -28,7 +28,20 @@ const options = await resp.json(); console.log(options); - startAttestation(options); + let attResp; + try { + attResp = await startAttestation(options); + } catch (error) { + elemError.innerText = error; + } + + await fetch('/verify-attestation', { + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(attResp), + }); })); </script> </body> |