From 5dd6f713c575aa7a5ae50518c996fa650ef73e1f Mon Sep 17 00:00:00 2001 From: sijinhui Date: Fri, 22 Mar 2024 16:53:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=A2=9E=E5=8A=A0=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E8=AE=A4=E8=AF=81-=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 5 +++++ lib/auth.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index aef331559..670f75cbd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -39,6 +39,11 @@ services: - NEXTAUTH_SECRET=$NEXTAUTH_SECRET - AUTH_GITHUB_ID=$AUTH_GITHUB_ID - AUTH_GITHUB_SECRET=$AUTH_GITHUB_SECRET + - EMAIL_SERVER_HOST=$EMAIL_SERVER_HOST + - EMAIL_SERVER_PORT=$EMAIL_SERVER_PORT + - EMAIL_SERVER_USER=$EMAIL_SERVER_USER + - EMAIL_SERVER_PASSWORD=$EMAIL_SERVER_PASSWORD + - EMAIL_FROM=$EMAIL_FROM - SECURE_COOKIES=$SECURE_COOKIES volumes: - /etc/localtime:/etc/localtime diff --git a/lib/auth.ts b/lib/auth.ts index 469fe42cd..d82856797 100644 --- a/lib/auth.ts +++ b/lib/auth.ts @@ -10,8 +10,8 @@ const SECURE_COOKIES:boolean = !!process.env.SECURE_COOKIES; export const authOptions: NextAuthOptions = { - debug: true, - // debug: !SECURE_COOKIES, + // debug: true, + debug: !SECURE_COOKIES, useSecureCookies: SECURE_COOKIES, secret: process.env.NEXTAUTH_SECRET, providers: [