NFC
This commit is contained in:
parent
c991fe7b6d
commit
e6b5fed399
8 changed files with 6647 additions and 6623 deletions
|
|
@ -13,7 +13,8 @@ export async function POST(req: NextRequest) {
|
|||
});
|
||||
|
||||
if (!res.ok) {
|
||||
return NextResponse.json({ error: "Invalid credentials" }, { status: 401 });
|
||||
const text = await res.text();
|
||||
return NextResponse.json({ error: text }, { status: 401 });
|
||||
}
|
||||
|
||||
// Returns { session_id, challenge } — browser completes the WebAuthn step
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
const ENROLLMENT_OPEN = process.env.ENROLLMENT_OPEN === "true";
|
||||
|
||||
export async function POST(req: NextRequest) {
|
||||
if (!ENROLLMENT_OPEN) {
|
||||
return new NextResponse(null, { status: 404 });
|
||||
}
|
||||
const body = await req.json();
|
||||
|
||||
const res = await fetch("http://localhost:3001/auth/register/finish", {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
const ENROLLMENT_OPEN = process.env.ENROLLMENT_OPEN === "true";
|
||||
|
||||
export async function POST(req: NextRequest) {
|
||||
if (!ENROLLMENT_OPEN) {
|
||||
return new NextResponse(null, { status: 404 });
|
||||
}
|
||||
const { username, password } = await req.json();
|
||||
|
||||
const res = await fetch("http://localhost:3001/auth/register/start", {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue