diff options
author | Matthew Miller <matthew@millerti.me> | 2022-02-10 16:27:45 -0800 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2022-02-10 16:27:45 -0800 |
commit | 557201d14427199d2ee2ffbfbbd2b9dd23e8e51d (patch) | |
tree | 05c623d0d73d6e239c27f84bb45b11e3b33c6d53 | |
parent | b2e9bc109e53cd0f9b471f555ede88c4087f5b84 (diff) |
Require user verification in example server
-rw-r--r-- | example/index.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/example/index.ts b/example/index.ts index 2d22c48..de7d1ab 100644 --- a/example/index.ts +++ b/example/index.ts @@ -130,7 +130,7 @@ app.get('/generate-registration-options', (req, res) => { * the types of authenticators that users to can use for registration */ authenticatorSelection: { - userVerification: 'preferred', + userVerification: 'required', requireResidentKey: false, }, /** @@ -164,6 +164,7 @@ app.post('/verify-registration', async (req, res) => { expectedChallenge: `${expectedChallenge}`, expectedOrigin, expectedRPID: rpID, + requireUserVerification: true, }; verification = await verifyRegistrationResponse(opts); } catch (error) { @@ -210,11 +211,7 @@ app.get('/generate-authentication-options', (req, res) => { type: 'public-key', transports: dev.transports ?? ['usb', 'ble', 'nfc', 'internal'], })), - /** - * 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', + userVerification: 'required', rpID, }; @@ -258,6 +255,7 @@ app.post('/verify-authentication', (req, res) => { expectedOrigin, expectedRPID: rpID, authenticator: dbAuthenticator, + fidoUserVerification: 'required', }; verification = verifyAuthenticationResponse(opts); } catch (error) { |