summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2021-02-02 14:14:29 -0800
committerMatthew Miller <matthew@millerti.me>2021-02-02 14:14:29 -0800
commitfdc6315d2cb39017efbc5eb6c705b276e4ace587 (patch)
tree639c46b565d394fb781fc7fcd884e3eb80a46d3a
parent11da0b8118ae1124e868afd6ac25af164f4e698e (diff)
Type req body in example’s assertion verification
-rw-r--r--example/index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/example/index.ts b/example/index.ts
index 1492395..6914af0 100644
--- a/example/index.ts
+++ b/example/index.ts
@@ -24,6 +24,7 @@ import {
import type {
AttestationCredentialJSON,
AuthenticatorDevice,
+ AssertionCredentialJSON,
} from '@simplewebauthn/typescript-types';
import { LoggedInUser } from './example-server';
@@ -205,7 +206,7 @@ app.get('/generate-assertion-options', (req, res) => {
});
app.post('/verify-assertion', (req, res) => {
- const { body } = req;
+ const body: AssertionCredentialJSON = req.body;
const user = inMemoryUserDeviceDB[loggedInUserId];