fix(auth): Sitzungs-Cookie auch ueber http nutzbar, Anmeldung als Formular (#013)

Das Cookie erhielt im Produktionsbau immer Secure und wurde ueber http vom
Browser verworfen – nach der Anmeldung landete jeder Klick wieder auf der
Anmeldeseite. Massgeblich ist jetzt das Schema in APP_URL.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-17 23:41:01 +02:00
co-authored by Claude Opus 5
parent f838a44991
commit 2c2f842d20
31 changed files with 277 additions and 69 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import { cookies } from "next/headers";
import { ueberHttps } from "@/lib/sitzung";
import { anmeldungStarten, oidcEinstellungen } from "@/server/auth/oidc";
export const dynamic = "force-dynamic";
@@ -18,7 +19,7 @@ export async function GET(request: Request) {
const optionen = {
httpOnly: true,
sameSite: "lax" as const,
secure: process.env.NODE_ENV === "production",
secure: ueberHttps(),
path: "/",
maxAge: 600,
};