Login route

This commit is contained in:
Jack Mechem 2026-03-28 23:30:35 -07:00
parent 1f9dd51200
commit 52bb27a6d4
2 changed files with 26 additions and 9 deletions

View file

@ -1,13 +1,14 @@
import { NextRequest, NextResponse } from "next/server";
export async function POST(req: NextRequest) {
const { username, password } = await req.json();
const { username, password, totp } = await req.json();
const res = await fetch("http://localhost:3001/auth/login", {
method: "POST",
headers: {
Authorization:
"Basic " + Buffer.from(`${username}:${password}`).toString("base64"),
"Basic " +
Buffer.from(`${username}:${password}${totp}`).toString("base64"),
},
});