Following the tutorial here: (https://nextjs.org/learn/dashboard-app/adding-authentication) and everythign works well deploying to vercel until introduction of next-auth. Locally, setting AUTH_URL and AUTH_SECRET variables in .env works. I created appropriate ENV variables in Vercel (using https://<Deployment_URL/api/auth> to replace http://localhost:3000/api/auth). Error in logs: TypeError: Invalid URL string.
at (node_modules/next-auth/lib/env.js:39:17)
at (node_modules/next-auth/lib/index.js:68:20)
at (node_modules/next-auth/lib/index.js:43:19)
at (node_modules/next/dist/esm/server/web/adapter.js:152:22)
at (node_modules/next/dist/esm/server/async-storage/request-async-storage-wrapper.js:72:23)
at (node_modules/next/dist/esm/server/web/adapter.js:139:52)
Any ideas?
"next": "^14.0.2",
"next-auth": "^5.0.0-beta.4",