remove createpasskeycreation code for u2f

This commit is contained in:
peintnermax
2024-05-03 15:07:43 +02:00
parent 39d54e20bf
commit a74f728e54

View File

@@ -26,13 +26,9 @@ export async function POST(request: NextRequest) {
const userId = session?.session?.factors?.user?.id;
if (userId) {
// TODO: add org context
return createPasskeyRegistrationLink(userId, sessionCookie.token)
return registerU2F(userId, domain)
.then((resp) => {
const code = resp.code;
return registerU2F(userId, domain).then((resp) => {
return NextResponse.json(resp);
});
})
.catch((error) => {
console.error("error on creating passkey registration link");