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
For production, consider using Cloudflare rate limiting or a Redis-backed solution.
81
81
82
-
### Separate Build And Runtime Environments
83
-
84
-
Some platforms, including Cloudflare deployments, expose build-time and runtime environment variables separately. `NUXT_BETTER_AUTH_SECRET` must be available to the deployed runtime, but it does not need to be present in the build container.
85
-
86
82
### Trusted Origins for Preview Environments
87
83
88
84
If your workflow uses preview URLs (for example, `*.workers.dev`), include those origins in your Better Auth server config.
### "NUXT_BETTER_AUTH_SECRET must be at least 32 characters"
123
119
124
-
Your secret is too short. Generate a new one using the command above. This error is raised when auth initializes at runtime. `BETTER_AUTH_SECRET` is still accepted as a fallback, but `NUXT_BETTER_AUTH_SECRET` is the recommended variable.
125
-
126
-
### "NUXT_BETTER_AUTH_SECRET is required in production"
127
-
128
-
The deployed server runtime could not resolve an auth secret. Set `NUXT_BETTER_AUTH_SECRET` or `BETTER_AUTH_SECRET` in the runtime environment for your app.
120
+
Your secret is too short. Generate a new one using the command above. `BETTER_AUTH_SECRET` is still accepted as a fallback, but `NUXT_BETTER_AUTH_SECRET` is the recommended variable.
thrownewError('[nuxt-better-auth] NUXT_BETTER_AUTH_SECRET is required in production. Set NUXT_BETTER_AUTH_SECRET or BETTER_AUTH_SECRET environment variable.')
74
+
}
75
+
if(betterAuthSecret&&betterAuthSecret.length<32){
76
+
thrownewError('[nuxt-better-auth] NUXT_BETTER_AUTH_SECRET must be at least 32 characters for security')
0 commit comments