From 7cc88287b827e0409be32bdfe9abb0368e832d2a Mon Sep 17 00:00:00 2001 From: openhands Date: Sun, 26 Jul 2026 21:15:29 +0200 Subject: [PATCH] Fix: set trustHost to true for production auth --- src/lib/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/auth.ts b/src/lib/auth.ts index 4b7151b6..ab7f05f4 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.ts @@ -54,7 +54,7 @@ async function verify2faCode(userId: number, code: string): Promise { } export const { handlers, signOut, auth } = NextAuth({ - trustHost: env.NODE_ENV !== "production", + trustHost: true, secret: env.AUTH_SECRET, session: { strategy: "jwt", maxAge: 24 * 60 * 60 }, pages: { signIn: "/login", error: "/login" },