From b9e4df3b52738087322861648b707b57c8d89dd3 Mon Sep 17 00:00:00 2001 From: sijinhui Date: Mon, 22 Apr 2024 16:14:36 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B4=A7=E5=8F=8A=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/auth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/auth.ts b/lib/auth.ts index e58227197..2c884c102 100644 --- a/lib/auth.ts +++ b/lib/auth.ts @@ -94,9 +94,9 @@ export const authOptions: NextAuthOptions = { let existingUser = await existUser(user); // await insertUser(user) if (!existingUser) { // 如果不存在,则报错 - throw new Error("用户名或密码不正确") + // throw new Error("用户名或密码不正确") // 如果不存在,则创建 - // existingUser = await insertUser(user); + existingUser = await insertUser(user); } // 有密码就校验密码,没有就直接返回用户 (password || existingUser.password) && validatePassword(password, existingUser.password);