Next.js Discord

Discord Forum

NextAuth Warn on when after npm run dev

Unanswered
Artois Hound posted this in #help-forum
Open in Discord
Artois HoundOP
I get this message when I run npm run dev, I have not noticed any actual issues, I am just curious why it gets logged in the console.

6 Replies

set the env variable
@joulev > Environment variable NEXTAUTH_URL missing. Please set it in your .env file. – <https://next-auth.js.org/warnings#nextauth_url>
Artois HoundOP
What is the URL used for in there? the authentication seems to work fine without it
i don't know more than that to answer you in details though; either way it's good practice to add the env var even when it works fine without it