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; const userId = session?.session?.factors?.user?.id;
if (userId) { if (userId) {
// TODO: add org context return registerU2F(userId, domain)
return createPasskeyRegistrationLink(userId, sessionCookie.token)
.then((resp) => { .then((resp) => {
const code = resp.code;
return registerU2F(userId, domain).then((resp) => {
return NextResponse.json(resp); return NextResponse.json(resp);
});
}) })
.catch((error) => { .catch((error) => {
console.error("error on creating passkey registration link"); console.error("error on creating passkey registration link");