feat: add auth env

This commit is contained in:
hamster1963 2024-10-21 11:39:10 +08:00
parent ca0f12774b
commit b7085f3d41

View File

@ -4,8 +4,8 @@ import Credentials from "next-auth/providers/credentials";
import getEnv from "./lib/env-entry"; import getEnv from "./lib/env-entry";
export const { handlers, signIn, signOut, auth } = NextAuth({ export const { handlers, signIn, signOut, auth } = NextAuth({
secret: "this_is_nezha_dash_web_secret", secret: process.env.AUTH_SECRET ?? "this_is_nezha_dash_web_secret",
trustHost: true, trustHost: process.env.AUTH_TRUST_HOST as boolean | undefined ?? true,
pages: { pages: {
signIn: "/", signIn: "/",
}, },