diff options
author | Matthew Miller <matthew@millerti.me> | 2021-07-08 22:01:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-08 22:01:45 -0700 |
commit | 3e1f9cf3d41f509a387d7cba3f44a7a93f90e07c (patch) | |
tree | d21b1c98b4e0d8a621a6d5ec385203e9253656d0 /example/index.ts | |
parent | b883160cdaf6de9cc734cbbdcf65a8f14f662706 (diff) | |
parent | 5dd46a5324f43883914b0c7d168ba1f02bb56b51 (diff) |
Merge pull request #135 from MasterKale/feat/example-debug-console
feat/example-debug-console
Diffstat (limited to 'example/index.ts')
-rw-r--r-- | example/index.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/example/index.ts b/example/index.ts index 5c24880..6609fdb 100644 --- a/example/index.ts +++ b/example/index.ts @@ -133,6 +133,10 @@ app.get('/generate-attestation-options', (req, res) => { userVerification: 'preferred', requireResidentKey: false, }, + /** + * Support the two most common algorithms: ES256, and RS256 + */ + supportedAlgorithmIDs: [-7, -257], }; const options = generateAttestationOptions(opts); @@ -182,6 +186,7 @@ app.post('/verify-attestation', async (req, res) => { credentialPublicKey, credentialID, counter, + transports: body.transports, }; user.devices.push(newDevice); } @@ -202,7 +207,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 |