diff options
author | Matthew Miller <matthew@millerti.me> | 2020-05-27 23:03:57 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2020-05-27 23:03:57 -0700 |
commit | d8d4f48f49da9f5b0310f462f994f42698e6b6b1 (patch) | |
tree | e5a0b98e49fddbde6ee4467de26d5b0a483c2be6 /example/index.js | |
parent | f1f6842369bb57ea7544242346eaf4bb56d33f69 (diff) |
Add new properties to example options generators
Diffstat (limited to 'example/index.js')
-rw-r--r-- | example/index.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/example/index.js b/example/index.js index 4c3fdab..6b74d52 100644 --- a/example/index.js +++ b/example/index.js @@ -131,6 +131,15 @@ app.get('/generate-attestation-options', (req, res) => { * on it. */ excludedBase64CredentialIDs: devices.map(dev => dev.base64CredentialID), + /** + * The optional authenticatorSelection property allows for specifying more constraints around + * the types of authenticators that users to can use for attestation + */ + authenticatorSelection: { + authenticatorAttachment: 'cross-platform', + userVerification: 'preferred', + requireResidentKey: false, + }, }), ); }); @@ -194,6 +203,11 @@ app.get('/generate-assertion-options', (req, res) => { challenge, timeout: 60000, allowedBase64CredentialIDs: user.devices.map(data => data.base64CredentialID), + /** + * This optional value controls whether or not the authenticator needs be able to uniquely + * identify the user interacting with it (via built-in PIN pad, fingerprint scanner, etc...) + */ + userVerification: 'preferred', }), ); }); |