Matthew Domi
Matthew Domi

Reputation: 1

Next Auth TypeError: Invalid URL

I keep receiving when I run my project - Nextjs. I think it about Next Auth, but don't actually know what to do. I am using version 4.3.1

Need help with next-auth

1

I have tried changing my next-auth version but no. Yet when I deployed in vercel, it went through

Upvotes: 0

Views: 4391

Answers (1)

enak-nalla
enak-nalla

Reputation: 321

If you don't have NEXTAUTH_URL set in your .env file you will get this error. However vercel will work as next-auth automatically sets it when deployed to vercel.

https://next-auth.js.org/configuration/options#nextauth_url

If you do have NEXTAUTH_URL set then my best guess is the url is wrong in some way. Maybe missing http://?

Upvotes: 5

Related Questions