Next.js Discord

Discord Forum

nextauth, using fetch with relative path

Answered
Luan posted this in #help-forum
Open in Discord
Hi guys, im running into an issue where when i use nextauth i cant fetch without using the full path, is there a way to configure this correctly, or is my code just wrong

using custom credentialsprovider

the response of credentials looks like this
{
    "url": "http://localhost:3000/api/auth/error?error=Failed%20to%20parse%20URL%20from%20%2Fapi%2Fuser%3Fnickname%3Dtest"
}


everything works perfectly fine with the absolute path, ofc i could just use that but i would like to have it kinda stanardized

2 Replies