webauthn bug fix
This commit is contained in:
@@ -29,6 +29,10 @@ export async function fileRoutes(fastify: FastifyInstance) {
|
|||||||
{
|
{
|
||||||
schema: {
|
schema: {
|
||||||
params: { type: "object", properties: { fileId: { type: "string" } } },
|
params: { type: "object", properties: { fileId: { type: "string" } } },
|
||||||
|
querystring: {
|
||||||
|
type: "object",
|
||||||
|
properties: { direct: { type: "boolean" } },
|
||||||
|
},
|
||||||
response: {
|
response: {
|
||||||
200: $file("downloadFileResponse"),
|
200: $file("downloadFileResponse"),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -235,8 +235,16 @@ export async function webAuthnRoutes(fastify: FastifyInstance) {
|
|||||||
expectedChallenge: userInDB.challenge.value as string,
|
expectedChallenge: userInDB.challenge.value as string,
|
||||||
expectedRPID: rpID,
|
expectedRPID: rpID,
|
||||||
expectedOrigin: origin,
|
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)
|
if (!verification.verified)
|
||||||
|
|||||||
Reference in New Issue
Block a user