diff options
author | Matthew Miller <matthew@millerti.me> | 2020-07-05 00:02:09 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2020-07-05 00:02:09 -0700 |
commit | 1702b8cce97efdfc5b9510b2a75e38aa5b8f655f (patch) | |
tree | 68eeb6669126956cff9be529bd2611deca644a1f | |
parent | c53ae60b66e2f176ad76694300f0e8cf112c02c2 (diff) |
Use async in demo /verify-attestation
-rw-r--r-- | example/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/example/index.js b/example/index.js index f8d7cc7..a8b8afa 100644 --- a/example/index.js +++ b/example/index.js @@ -146,7 +146,7 @@ app.get('/generate-attestation-options', (req, res) => { ); }); -app.post('/verify-attestation', (req, res) => { +app.post('/verify-attestation', async (req, res) => { const { body } = req; const user = inMemoryUserDeviceDB[loggedInUserId]; @@ -155,7 +155,7 @@ app.post('/verify-attestation', (req, res) => { let verification; try { - verification = verifyAttestationResponse({ + verification = await verifyAttestationResponse({ credential: body, expectedChallenge, expectedOrigin: origin, |