install next-auth beta latest version and in .env copy that AUTH_URL=http://localhost:3000/ this if you deploy in vercel or other platform place that url here the error will go away
AUTH_URL=http://localhost:3000/