Security key support
This commit is contained in:
parent
ede90f8c7f
commit
c991fe7b6d
6 changed files with 384 additions and 47 deletions
17
app/api/auth/register/finish/route.ts
Normal file
17
app/api/auth/register/finish/route.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
export async function POST(req: NextRequest) {
|
||||
const body = await req.json();
|
||||
|
||||
const res = await fetch("http://localhost:3001/auth/register/finish", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
return NextResponse.json({ error: "Registration failed" }, { status: 400 });
|
||||
}
|
||||
|
||||
return NextResponse.json(await res.json());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue