webauthn bug fix

This commit is contained in:
2025-02-25 14:18:33 +05:30
parent 5559b2d296
commit dc2ef0dec0
2 changed files with 14 additions and 2 deletions

View File

@@ -29,6 +29,10 @@ export async function fileRoutes(fastify: FastifyInstance) {
{
schema: {
params: { type: "object", properties: { fileId: { type: "string" } } },
querystring: {
type: "object",
properties: { direct: { type: "boolean" } },
},
response: {
200: $file("downloadFileResponse"),
},

View File

@@ -235,8 +235,16 @@ export async function webAuthnRoutes(fastify: FastifyInstance) {
expectedChallenge: userInDB.challenge.value as string,
expectedRPID: rpID,
expectedOrigin: origin,
// @ts-ignore
credential: credential,
credential: {
// @ts-ignore
id: credential.credentialID,
// @ts-ignore
publicKey: credential.credentialPublicKey.buffer,
// @ts-ignore
counter: credential.counter,
// @ts-ignore
transports: credential.transports,
},
});
if (!verification.verified)