From 37dd8d4b38dd1caa046f36dbf7b85296ff7d4a64 Mon Sep 17 00:00:00 2001 From: peintnermax Date: Thu, 5 Sep 2024 15:21:29 +0200 Subject: [PATCH] u2f registration --- apps/login/src/lib/server/u2f.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/login/src/lib/server/u2f.ts b/apps/login/src/lib/server/u2f.ts index 4638336443b..3e2fe50d674 100644 --- a/apps/login/src/lib/server/u2f.ts +++ b/apps/login/src/lib/server/u2f.ts @@ -62,11 +62,12 @@ export async function verifyU2F(command: VerifyU2FCommand) { throw new Error("Could not get session"); } - const req = create( - VerifyU2FRegistrationRequestSchema, - // TODO: why did we passed the request instead of body here? - command, - ); + const req = create(VerifyU2FRegistrationRequestSchema, { + u2fId: command.u2fId, + publicKeyCredential: command.publicKeyCredential, + tokenName: passkeyName, + userId, + }); return verifyU2FRegistration(req); }