summaryrefslogtreecommitdiffhomepage
path: root/example/index.js
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2020-05-24 17:57:51 -0700
committerMatthew Miller <matthew@millerti.me>2020-05-24 17:57:51 -0700
commitff552c71000d144c5c2645b07a4d1cbf30fbb271 (patch)
tree149b4dee361d9d11c992133ed1c4b2407b1c10df /example/index.js
parent2669dd7a3ef8f458fdabc62f4892ed8271d37157 (diff)
Update example to latest versions
Diffstat (limited to 'example/index.js')
-rw-r--r--example/index.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/example/index.js b/example/index.js
index 3b143b3..25f343f 100644
--- a/example/index.js
+++ b/example/index.js
@@ -74,7 +74,11 @@ app.post('/verify-attestation', (req, res) => {
let verification;
try {
- verification = verifyAttestationResponse(body, `https://${origin}`);
+ verification = verifyAttestationResponse(
+ body,
+ randomChallenge,
+ `https://${origin}`,
+ );
} catch (error) {
console.error(error);
return res.status(400).send({ error: error.message });
@@ -128,7 +132,12 @@ app.post('/verify-assertion', (req, res) => {
let verification;
try {
- verification = verifyAssertionResponse(body, `https://${origin}`, dbAuthenticator);
+ verification = verifyAssertionResponse(
+ body,
+ randomChallenge,
+ `https://${origin}`,
+ dbAuthenticator,
+ );
} catch (error) {
console.error(error);
return res.status(400).send({ error: error.message });