From b7085f3d41b0838112a676ad6403290529100a56 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Mon, 21 Oct 2024 11:39:10 +0800 Subject: [PATCH] feat: add auth env --- auth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auth.ts b/auth.ts index dc90f57..71604fb 100644 --- a/auth.ts +++ b/auth.ts @@ -4,8 +4,8 @@ import Credentials from "next-auth/providers/credentials"; import getEnv from "./lib/env-entry"; export const { handlers, signIn, signOut, auth } = NextAuth({ - secret: "this_is_nezha_dash_web_secret", - trustHost: true, + secret: process.env.AUTH_SECRET ?? "this_is_nezha_dash_web_secret", + trustHost: process.env.AUTH_TRUST_HOST as boolean | undefined ?? true, pages: { signIn: "/", },