You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It doesn't say anything about is this variable required at build time or run time?
What will happen if I leave it undefined at build time?
If I set it at build time I don't have to set it at runtime because its embedded in the bundle? Why would I need to define it twice?
What if I set one value at build time and another value at runtime?
Very unclear.
Also I noticed that this variable doesn't expand, for example if I set it to NEXTAUTH_URL=$PROTOCOL://$HOSTNAME and log it inside Next.js app with process.env.NEXTAUTH_URL it stays like that although both $PROTOCOL and $HOSTNAME vars are defined. Why?
I use Docker for deployment and not Vercel. I need to be clear about these details because I need to dedicate build argument in Dockerfile if it's required at build time.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Documentation about
NEXTAUTH_URL
variable is very short and unclear.https://next-auth.js.org/configuration/options
It doesn't say anything about is this variable required at build time or run time?
What will happen if I leave it undefined at build time?
If I set it at build time I don't have to set it at runtime because its embedded in the bundle? Why would I need to define it twice?
What if I set one value at build time and another value at runtime?
Very unclear.
Also I noticed that this variable doesn't expand, for example if I set it to
NEXTAUTH_URL=$PROTOCOL://$HOSTNAME
and log it inside Next.js app withprocess.env.NEXTAUTH_URL
it stays like that although both$PROTOCOL
and$HOSTNAME
vars are defined. Why?I use Docker for deployment and not Vercel. I need to be clear about these details because I need to dedicate build argument in Dockerfile if it's required at build time.
Beta Was this translation helpful? Give feedback.
All reactions