summaryrefslogtreecommitdiffhomepage
path: root/example/index.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2021-07-08 21:39:56 -0700
committerMatthew Miller <matthew@millerti.me>2021-07-08 21:39:56 -0700
commit23d8180cf5e40693a4a6a27d2f7fe38d2b0b8df7 (patch)
treea048d9485f8692c4c407175277ce221de8029651 /example/index.ts
parent71804e7c7cfcebd6c3f3882e2cf9e9b90c5ab23e (diff)
Persist and return actual transports
Diffstat (limited to 'example/index.ts')
-rw-r--r--example/index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/example/index.ts b/example/index.ts
index 5c24880..f1edb4a 100644
--- a/example/index.ts
+++ b/example/index.ts
@@ -182,6 +182,7 @@ app.post('/verify-attestation', async (req, res) => {
credentialPublicKey,
credentialID,
counter,
+ transports: body.transports,
};
user.devices.push(newDevice);
}
@@ -202,7 +203,7 @@ app.get('/generate-assertion-options', (req, res) => {
allowCredentials: user.devices.map(dev => ({
id: dev.credentialID,
type: 'public-key',
- transports: ['usb', 'ble', 'nfc', 'internal'],
+ transports: dev.transports ?? ['usb', 'ble', 'nfc', 'internal'],
})),
/**
* This optional value controls whether or not the authenticator needs be able to uniquely