diff options
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', }), ); }); |