Restore AUTH_TRUSTED_ORIGINS for Better Auth

This commit is contained in:
Chris Scott committed 2026-01-24 17:53:09 -05:00
1 parent 905010fba4
commit 8f22739436
2 files changed
+2

No files matched your search

+1
View File
@@ -32,6 +32,7 @@ export function createAuth(db: Database) {
const auth = betterAuth({
database: db,
secret: ENV.AUTH.SECRET,
trustedOrigins: ENV.AUTH.TRUSTED_ORIGINS.split(',').map((o: string) => o.trim()),
emailAndPassword: {
enabled: true,
minPasswordLength: 8,
+1
View File
@@ -89,6 +89,7 @@ export const ENV = {
AUTH: {
SECRET: getEnvString('AUTH_SECRET', process.env.NODE_ENV === 'production' ? '' : generateDefaultSecret()),
TRUSTED_ORIGINS: getEnvString('AUTH_TRUSTED_ORIGINS', 'http://localhost:5173,http://localhost:5003'),
ADMIN_EMAIL: process.env.ADMIN_EMAIL,
ADMIN_PASSWORD: process.env.ADMIN_PASSWORD,
ADMIN_PASSWORD_RESET: getEnvBoolean('ADMIN_PASSWORD_RESET', false),