diff --git a/.changeset/pretty-shrimps-behave.md b/.changeset/pretty-shrimps-behave.md new file mode 100644 index 0000000000..2a5d0ba13d --- /dev/null +++ b/.changeset/pretty-shrimps-behave.md @@ -0,0 +1,5 @@ +--- +"create-t3-app": minor +--- + +Add documentation on how to generate NEXTAUTH_SECRET in .env file for clarity diff --git a/cli/src/installers/envVars.ts b/cli/src/installers/envVars.ts index 0e61209cd5..bfddfe567e 100644 --- a/cli/src/installers/envVars.ts +++ b/cli/src/installers/envVars.ts @@ -36,6 +36,8 @@ DATABASE_URL=file:./db.sqlite if (usingAuth) { envContent += ` # Next Auth +# You can generate the secret via 'openssl rand -base64 32' on Linux +# More info: https://next-auth.js.org/configuration/options#secret NEXTAUTH_SECRET= NEXTAUTH_URL=http://localhost:3000