feat: add support for OAuth-only login mode and update configuration handling

This commit is contained in:
Linus Rath
2026-03-12 22:05:29 +01:00
parent ae29e64197
commit b090bf6d52
5 changed files with 49 additions and 1 deletions
+4
View File
@@ -14,6 +14,10 @@ const COOKIE_OPTIONS = {
export async function POST(request: NextRequest) {
try {
if (process.env.OAUTH_ENABLED === 'true' && process.env.OAUTH_ONLY === 'true') {
return NextResponse.json({ error: 'Basic authentication is disabled' }, { status: 403 });
}
const { serverUrl, username, password } = await request.json();
if (!serverUrl || !username || !password) {
return NextResponse.json({ error: 'Missing required fields' }, { status: 400 });