From 3f7a694183bf912fa170631fdf16ea3ebfef5cb7 Mon Sep 17 00:00:00 2001 From: Pratyush Date: Mon, 18 Mar 2024 11:12:12 +0530 Subject: [PATCH] auth-fix --- app/api/auth/[...nextauth]/route.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/api/auth/[...nextauth]/route.js b/app/api/auth/[...nextauth]/route.js index 2df3ec9..baf7118 100644 --- a/app/api/auth/[...nextauth]/route.js +++ b/app/api/auth/[...nextauth]/route.js @@ -50,10 +50,9 @@ const authOptions = { try { await connectMongoDB(); const userExists = await Users.findOne({ email }); - console.log(userExists); + console.log("userExists", userExists); if (!userExists) { - const res = await fetch( - `$/api/register`, + const res = await fetch(`${process.env.NEXTAUTH_URL}/api/register`, { method: 'POST', headers: {