NEXTAUTH_URL Warning #4220
Replies: 11 comments 10 replies
-
Having same issue |
Beta Was this translation helpful? Give feedback.
-
Same here. I recently migrated from Next-Auth V3 to V4. Everything seems to be functioning normally, except for this error. I've also verified that the environment variables |
Beta Was this translation helpful? Give feedback.
-
I found that Next-Auth is checking for the See the source code here: https://github.com/nextauthjs/next-auth/blob/main/packages/next-auth/src/core/lib/assert.ts#L47 The |
Beta Was this translation helpful? Give feedback.
-
Seems like removing all Seems to be specifically having |
Beta Was this translation helpful? Give feedback.
-
NEXTAUTH_URL is the canonical URL of your site. for development, NEXTAUTH_URL looks like
for production, NEXTAUTH_URL looks like
Read more about NEXTAUTH_URL details of docs |
Beta Was this translation helpful? Give feedback.
-
Please set it in your .env file. - https://next-auth.js.org/warnings Maybe simply add ".env" file in project folder with: "NEXTAUTH_URL=http://localhost:3000" and this will solve [next-auth][warn][NEXTAUTH_URL] warning. Try it and give a reply. |
Beta Was this translation helpful? Give feedback.
-
What worked for me :After becoming sure about setting async authorize(credentials) {
const res = await fetch(process.env.NEXTAUTH_URL + '/api/login', {
// ...
}),
}); |
Beta Was this translation helpful? Give feedback.
-
write this in your .env file if you are in development change the link if you are in production |
Beta Was this translation helpful? Give feedback.
-
Aqui resolveu! |
Beta Was this translation helpful? Give feedback.
-
use node v21.6.2 solve my problem |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I recently moved my environment variables to be controlled by Vercel and then used
vercel pull
to get the latest version of them.This is now resulting in this warning:
I have
NEXTAUTH_URL
andVERCEL_URL
filled in withhttp://localhost:3000
.I am not sure what the problem is. Any help would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions