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
Is your feature request related to a problem? Please describe.
Currently when adding additional environment variable beyond the boilerplate that comes with CT3A, it's easy for a first time user to miss that the vars also need to be added to schema.mjs for typesaftey validation through zod. This is most common when adding additional providers for Auth(Google, FB, etc..., with the default currently being Discord). It's easy to miss that there is some default TS validation that is already included in the boilerplate, causing an error
Describe the solution you'd like to see
Add a comment in the .env file that reminds the developer to specify their additional env variables in the validation found in schema.mjs.
This could be for any environment variable, for example we could include the following at the top of .env:
# Note that if adding additional env variables, the serverSchema in /env/schema.mjs will need to be updated accordingly
Or, since this issue will most commonly occur when adding NextAuth providers, we could just remind people about that specifically, perhaps right below where the discord NextAuth currently is:
# Note that if adding additional NextAuth providers, the serverSchema in /env/schema.mjs will need to be updated accordingly
Desribe alternate solutions
Leaving .env as is.
Additional information
No response
The text was updated successfully, but these errors were encountered:
I like the idea of putting a note about updating schema in .env (might reduce the number of people who don't use the typesafe env stuff!), but I don't think it should be specific to serverSchema as the same is true for clientSchema.
Is your feature request related to a problem? Please describe.
Currently when adding additional environment variable beyond the boilerplate that comes with CT3A, it's easy for a first time user to miss that the vars also need to be added to schema.mjs for typesaftey validation through zod. This is most common when adding additional providers for Auth(Google, FB, etc..., with the default currently being Discord). It's easy to miss that there is some default TS validation that is already included in the boilerplate, causing an error
Describe the solution you'd like to see
Add a comment in the .env file that reminds the developer to specify their additional env variables in the validation found in schema.mjs.
This could be for any environment variable, for example we could include the following at the top of .env:
# Note that if adding additional env variables, the serverSchema in /env/schema.mjs will need to be updated accordingly
Or, since this issue will most commonly occur when adding NextAuth providers, we could just remind people about that specifically, perhaps right below where the discord NextAuth currently is:
# Note that if adding additional NextAuth providers, the serverSchema in /env/schema.mjs will need to be updated accordingly
Desribe alternate solutions
Leaving .env as is.
Additional information
No response
The text was updated successfully, but these errors were encountered: