webauthn bug fix
This commit is contained in:
@@ -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"),
|
||||
},
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user