Vercel domain #5909
-
Hello, I'm hosting on Vercel with my domain, however the app continually uses the deploy URL instead of the project URL. This causes issues with the oAuth handoff to Google. Is there a config I missed somewhere to force the app to always use the project or ENV-defined URL? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @0xSMW! I'm a bot designed to help you solve bugs, answer questions, and become a contributor. I'm here to assist you with the issue you've encountered. Let's tackle this together! To ensure your application uses the project or environment-defined URL instead of the Vercel deploy URL, you should set the Additionally, make sure that the By setting these environment variables in your Vercel project settings, you can ensure that the application consistently uses your specified project URL. To continue talking to Dosu, mention @dosu. Written by @dosu, approved by dosu-customer-success |
Beta Was this translation helpful? Give feedback.
Hey @0xSMW! I'm a bot designed to help you solve bugs, answer questions, and become a contributor. I'm here to assist you with the issue you've encountered. Let's tackle this together!
To ensure your application uses the project or environment-defined URL instead of the Vercel deploy URL, you should set the
NEXT_PUBLIC_WEBAPP_URL
environment variable to your desired project URL. This variable is used to determine the base URL for the application. If it's not set, the application defaults to using theVERCEL_URL
environment variable, which is automatically set by Vercel to the deploy URL [1].Additionally, make sure that the
NEXTAUTH_URL
is set correctly for OAuth handoff. IfNEXTAUTH_URL
…