Hardcode variable AUTH_ORIGIN. Not all projects are suitable for this name.
For example, if the project uses NuxtSEO, then SITE_URL should be specified there too, which in turn is equal to AUTH_ORIGIN. If AUTH_ORIGIN could be changed, then one variable would be used.
It conflicts with Nuxt. Since Nuxt uses the NUXT_ prefix (which can be changed).
How would you implement this?
1) Switch completely to useRuntimeConfig(). This will get rid of naming inconsistencies
2) Add to nuxt.config the ability to set the variable dynamically
An example of how it will look like:
nuxt.config.ts
Describe the feature
What problems there are now:
AUTH_ORIGIN
. Not all projects are suitable for this name. For example, if the project uses NuxtSEO, thenSITE_URL
should be specified there too, which in turn is equal toAUTH_ORIGIN
. IfAUTH_ORIGIN
could be changed, then one variable would be used.NUXT_
prefix (which can be changed).How would you implement this?
1) Switch completely to
useRuntimeConfig()
. This will get rid of naming inconsistencies 2) Add tonuxt.config
the ability to set the variable dynamicallyAn example of how it will look like:
nuxt.config.ts
.env
Additional information
Provider