恢复无数据库支持

This commit is contained in:
mtvpls
2026-01-18 11:57:05 +08:00
parent 23430c5f65
commit 64f65d11c4
5 changed files with 69 additions and 21 deletions

View File

@@ -129,10 +129,11 @@ export async function POST(req: NextRequest) {
// 验证成功设置认证cookie
const response = NextResponse.json({ ok: true });
const username = process.env.USERNAME || 'default';
const cookieValue = await generateAuthCookie(
undefined,
username,
password,
'user',
'owner',
true
); // localstorage 模式包含 password
const expires = new Date();