summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2023-12-28 19:46:32 -0800
committerGitHub <noreply@github.com>2023-12-28 19:46:32 -0800
commit92d2e70d39585ae5ffe3ac72955cf90250c6be74 (patch)
tree41f7770fea02ec3dd2eaa99a4f29be4950b8d972
parent5229cebbcc2d087b7eaaaeb9886f53c9e1d93522 (diff)
parent1f1bae6838c2f5713665c47a252b150aa6c84318 (diff)
Merge pull request #500 from MasterKale/fix/477-make-uv-optional-in-example
fix/477-make-uv-optional-in-example
-rw-r--r--example/index.ts17
1 files changed, 14 insertions, 3 deletions
diff --git a/example/index.ts b/example/index.ts
index 4b4179a..204f8a0 100644
--- a/example/index.ts
+++ b/example/index.ts
@@ -143,6 +143,12 @@ app.get('/generate-registration-options', async (req, res) => {
})),
authenticatorSelection: {
residentKey: 'discouraged',
+ /**
+ * Wondering why user verification isn't required? See here:
+ *
+ * https://passkeys.dev/docs/use-cases/bootstrapping/#a-note-about-user-verification
+ */
+ userVerification: 'preferred',
},
/**
* Support the two most common algorithms: ES256, and RS256
@@ -175,7 +181,7 @@ app.post('/verify-registration', async (req, res) => {
expectedChallenge: `${expectedChallenge}`,
expectedOrigin,
expectedRPID: rpID,
- requireUserVerification: true,
+ requireUserVerification: false,
};
verification = await verifyRegistrationResponse(opts);
} catch (error) {
@@ -226,7 +232,12 @@ app.get('/generate-authentication-options', async (req, res) => {
type: 'public-key',
transports: dev.transports,
})),
- userVerification: 'required',
+ /**
+ * Wondering why user verification isn't required? See here:
+ *
+ * https://passkeys.dev/docs/use-cases/bootstrapping/#a-note-about-user-verification
+ */
+ userVerification: 'preferred',
rpID,
};
@@ -272,7 +283,7 @@ app.post('/verify-authentication', async (req, res) => {
expectedOrigin,
expectedRPID: rpID,
authenticator: dbAuthenticator,
- requireUserVerification: true,
+ requireUserVerification: false,
};
verification = await verifyAuthenticationResponse(opts);
} catch (error) {