Correct way to determine the baseURL?
Hey there 
What is the recommended way in Next.js to determine the baseURL on the client?
The docs tell us to create an environment variable
However, I am inclined to follow a method usually used in tRPC. On the client, we typically do something like this to determine the URL:
So, should we really just be using a function like
What is the recommended way in Next.js to determine the baseURL on the client?
The docs tell us to create an environment variable
BETTER_AUTH_URL. However, I don't see where the docs recommends that we use this env variable. On the client, the example used only shows an explicitly defined string. In Next.js, I have used the following:However, I am inclined to follow a method usually used in tRPC. On the client, we typically do something like this to determine the URL:
So, should we really just be using a function like
getBaseUrl() on the client to determine the auth location? Also, is BETTER_AUTH_URL used somewhere internally that I'm not seeing?