diff options
Diffstat (limited to 'example/index.js')
-rw-r--r-- | example/index.js | 13 |
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 }); |