Skip to content

Commit

Permalink
fix user verification
Browse files Browse the repository at this point in the history
  • Loading branch information
niftyvictor committed Feb 7, 2025
1 parent 538b5ca commit 5308253
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
12 changes: 11 additions & 1 deletion lib/build/recipe/webauthn/recipeImplementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ function getRecipeInterface(querier, getWebauthnConfig) {
displayName = email;
}
}
console.log("userVerification", userVerification);
return await querier.sendPostRequest(
new normalisedURLPath_1.default(
`/${
Expand All @@ -119,7 +120,15 @@ function getRecipeInterface(querier, getWebauthnConfig) {
userContext
);
},
signInOptions: async function ({ relyingPartyId, relyingPartyName, origin, timeout, tenantId, userContext }) {
signInOptions: async function ({
relyingPartyId,
relyingPartyName,
origin,
timeout,
userVerification,
tenantId,
userContext,
}) {
// the input user ID can be a recipe or a primary user ID.
return await querier.sendPostRequest(
new normalisedURLPath_1.default(
Expand All @@ -128,6 +137,7 @@ function getRecipeInterface(querier, getWebauthnConfig) {
}/recipe/webauthn/options/signin`
),
{
userVerification,
relyingPartyId,
relyingPartyName,
origin,
Expand Down
12 changes: 11 additions & 1 deletion lib/ts/recipe/webauthn/recipeImplementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export default function getRecipeInterface(
}
}

console.log("userVerification", userVerification);
return await querier.sendPostRequest(
new NormalisedURLPath(
`/${tenantId === undefined ? DEFAULT_TENANT_ID : tenantId}/recipe/webauthn/options/register`
Expand All @@ -96,13 +97,22 @@ export default function getRecipeInterface(
);
},

signInOptions: async function ({ relyingPartyId, relyingPartyName, origin, timeout, tenantId, userContext }) {
signInOptions: async function ({
relyingPartyId,
relyingPartyName,
origin,
timeout,
userVerification,
tenantId,
userContext,
}) {
// the input user ID can be a recipe or a primary user ID.
return await querier.sendPostRequest(
new NormalisedURLPath(
`/${tenantId === undefined ? DEFAULT_TENANT_ID : tenantId}/recipe/webauthn/options/signin`
),
{
userVerification,
relyingPartyId,
relyingPartyName,
origin,
Expand Down

0 comments on commit 5308253

Please sign in to comment.