Skip to content

Commit

Permalink
auth-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pratyush3124 committed Mar 18, 2024
1 parent 9c4e674 commit 3f7a694
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/api/auth/[...nextauth]/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 3f7a694

Please sign in to comment.