I need to deploy the same next-auth enabled repository on two domains. How can I set NEXTAUTH_URL for both domains? #3731
Unanswered
ContraHacker
asked this question in
Help
Replies: 1 comment 1 reply
-
I have this same requirement, were you able to discover a solution? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Question 💬
Greetings.
I need to deploy my NextJS website to two different domains. I'm using Vercel and I have pointed two domains to my project.
Next-auth requires the
NEXTAUTH_URL
env variable to be set equal to the domain name. With one domain, everything is GTG but how do I add another domain? I have saved the env variable to Vercel, it gets picked up and works fine.How to reproduce ☕️
The first domain will work correctly, but any other domains won't allow you to authenticate via next-auth.
Contributing 🙌🏽
No, I am afraid I cannot help regarding this
Beta Was this translation helpful? Give feedback.
All reactions