summaryrefslogtreecommitdiffhomepage
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/public/register/index.html15
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>