Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
- COPILOT_API_KEY=${COPILOT_API_KEY}
- SIM_AGENT_API_URL=${SIM_AGENT_API_URL}
- OLLAMA_URL=${OLLAMA_URL:-http://localhost:11434}
- NEXT_PUBLIC_SOCKET_URL=${NEXT_PUBLIC_SOCKET_URL:-http://localhost:3002}
- NEXT_PUBLIC_SOCKET_URL=${NEXT_PUBLIC_SOCKET_URL:-}
- BUN_INSTALL_CACHE_DIR=/home/bun/.bun/cache
depends_on:
db:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,4 @@ i18n.cache
## Claude Code
.claude/launch.json
.claude/worktrees/
.claude/scheduled_tasks.lock
1 change: 0 additions & 1 deletion apps/docs/content/docs/de/self-hosting/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ ENCRYPTION_KEY=$(openssl rand -hex 32)
INTERNAL_API_SECRET=$(openssl rand -hex 32)
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
BETTER_AUTH_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
EOF
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Callout } from 'fumadocs-ui/components/callout'
| `ENCRYPTION_KEY` | Verschlüsselungsschlüssel (32 Hex-Zeichen): `openssl rand -hex 32` |
| `INTERNAL_API_SECRET` | Internes API-Secret (32 Hex-Zeichen): `openssl rand -hex 32` |
| `NEXT_PUBLIC_APP_URL` | Öffentliche App-URL |
| `NEXT_PUBLIC_SOCKET_URL` | WebSocket-URL (Standard: `http://localhost:3002`) |
| `NEXT_PUBLIC_SOCKET_URL` | Optional. WebSocket-URL — verwendet standardmäßig den Seitenursprung; nur setzen, wenn Realtime auf einem separaten Host läuft. |

## KI-Anbieter

Expand Down Expand Up @@ -80,7 +80,6 @@ BETTER_AUTH_URL=https://sim.yourdomain.com
ENCRYPTION_KEY=<openssl rand -hex 32>
INTERNAL_API_SECRET=<openssl rand -hex 32>
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
OPENAI_API_KEY=sk-...
```

Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/docs/de/self-hosting/platforms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ ENCRYPTION_KEY=$(openssl rand -hex 32)
INTERNAL_API_SECRET=$(openssl rand -hex 32)
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
BETTER_AUTH_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
EOF

# Start
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/de/self-hosting/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ OLLAMA_URL=http://192.168.1.x:11434 # Linux (use actual IP)

## WebSocket/Echtzeit funktioniert nicht

1. Prüfen Sie, ob `NEXT_PUBLIC_SOCKET_URL` mit Ihrer Domain übereinstimmt
1. Stellen Sie sicher, dass der Reverse Proxy `/socket.io` an den Realtime-Service (Standardport 3002) weiterleitet. `NEXT_PUBLIC_SOCKET_URL` ist nur erforderlich, wenn Realtime auf einem separaten Host läuft.
2. Überprüfen Sie, ob der Echtzeit-Dienst läuft: `docker compose ps realtime`
3. Stellen Sie sicher, dass der Reverse-Proxy WebSocket-Upgrades weiterleitet (siehe [Docker-Anleitung](/self-hosting/docker))

Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/docs/en/self-hosting/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ ENCRYPTION_KEY=$(openssl rand -hex 32)
INTERNAL_API_SECRET=$(openssl rand -hex 32)
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
BETTER_AUTH_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
EOF
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Callout } from 'fumadocs-ui/components/callout'
| `ENCRYPTION_KEY` | Encryption key (32 hex chars): `openssl rand -hex 32` |
| `INTERNAL_API_SECRET` | Internal API secret (32 hex chars): `openssl rand -hex 32` |
| `NEXT_PUBLIC_APP_URL` | Public app URL |
| `NEXT_PUBLIC_SOCKET_URL` | WebSocket URL (default: `http://localhost:3002`) |
| `NEXT_PUBLIC_SOCKET_URL` | Optional. WebSocket URL — defaults to the page origin; set only if realtime is on a separate host. |

## AI Providers

Expand Down Expand Up @@ -80,7 +80,6 @@ BETTER_AUTH_URL=https://sim.yourdomain.com
ENCRYPTION_KEY=<openssl rand -hex 32>
INTERNAL_API_SECRET=<openssl rand -hex 32>
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
OPENAI_API_KEY=sk-...
```

Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/docs/en/self-hosting/platforms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ ENCRYPTION_KEY=$(openssl rand -hex 32)
INTERNAL_API_SECRET=$(openssl rand -hex 32)
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
BETTER_AUTH_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
EOF

# Start
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/en/self-hosting/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ OLLAMA_URL=http://192.168.1.x:11434 # Linux (use actual IP)

## WebSocket/Realtime Not Working

1. Check `NEXT_PUBLIC_SOCKET_URL` matches your domain
1. Verify reverse proxy routes `/socket.io` to the realtime service (default port 3002). `NEXT_PUBLIC_SOCKET_URL` is only needed if realtime is on a separate host.
2. Verify realtime service is running: `docker compose ps realtime`
3. Ensure reverse proxy passes WebSocket upgrades (see [Docker guide](/self-hosting/docker))

Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/docs/es/self-hosting/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ ENCRYPTION_KEY=$(openssl rand -hex 32)
INTERNAL_API_SECRET=$(openssl rand -hex 32)
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
BETTER_AUTH_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
EOF
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Callout } from 'fumadocs-ui/components/callout'
| `ENCRYPTION_KEY` | Clave de cifrado (32 caracteres hex): `openssl rand -hex 32` |
| `INTERNAL_API_SECRET` | Secreto de API interna (32 caracteres hex): `openssl rand -hex 32` |
| `NEXT_PUBLIC_APP_URL` | URL pública de la aplicación |
| `NEXT_PUBLIC_SOCKET_URL` | URL de WebSocket (predeterminado: `http://localhost:3002`) |
| `NEXT_PUBLIC_SOCKET_URL` | Opcional. URL de WebSocket — predetermina al origen de la página; configúrala solo si realtime está en un host separado. |

## Proveedores de IA

Expand Down Expand Up @@ -80,7 +80,6 @@ BETTER_AUTH_URL=https://sim.yourdomain.com
ENCRYPTION_KEY=<openssl rand -hex 32>
INTERNAL_API_SECRET=<openssl rand -hex 32>
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
OPENAI_API_KEY=sk-...
```

Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/docs/es/self-hosting/platforms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ ENCRYPTION_KEY=$(openssl rand -hex 32)
INTERNAL_API_SECRET=$(openssl rand -hex 32)
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
BETTER_AUTH_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
EOF

# Start
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/es/self-hosting/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ OLLAMA_URL=http://192.168.1.x:11434 # Linux (use actual IP)

## WebSocket/Tiempo real no funciona

1. Comprueba que `NEXT_PUBLIC_SOCKET_URL` coincida con tu dominio
1. Verifica que el proxy inverso enrute `/socket.io` al servicio realtime (puerto 3002 por defecto). `NEXT_PUBLIC_SOCKET_URL` solo es necesaria si realtime está en un host separado.
2. Verifica que el servicio en tiempo real esté funcionando: `docker compose ps realtime`
3. Asegúrate de que el proxy inverso pase las actualizaciones de WebSocket (consulta la [guía de Docker](/self-hosting/docker))

Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/docs/fr/self-hosting/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ ENCRYPTION_KEY=$(openssl rand -hex 32)
INTERNAL_API_SECRET=$(openssl rand -hex 32)
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
BETTER_AUTH_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
EOF
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Callout } from 'fumadocs-ui/components/callout'
| `ENCRYPTION_KEY` | Clé de chiffrement (32 caractères hexadécimaux) : `openssl rand -hex 32` |
| `INTERNAL_API_SECRET` | Secret API interne (32 caractères hexadécimaux) : `openssl rand -hex 32` |
| `NEXT_PUBLIC_APP_URL` | URL publique de l'application |
| `NEXT_PUBLIC_SOCKET_URL` | URL WebSocket (par défaut : `http://localhost:3002`) |
| `NEXT_PUBLIC_SOCKET_URL` | Optionnel. URL WebSocket — utilise par défaut l'origine de la page ; à définir uniquement si realtime est sur un hôte séparé. |

## Fournisseurs d'IA

Expand Down Expand Up @@ -80,7 +80,6 @@ BETTER_AUTH_URL=https://sim.yourdomain.com
ENCRYPTION_KEY=<openssl rand -hex 32>
INTERNAL_API_SECRET=<openssl rand -hex 32>
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
OPENAI_API_KEY=sk-...
```

Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/docs/fr/self-hosting/platforms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ ENCRYPTION_KEY=$(openssl rand -hex 32)
INTERNAL_API_SECRET=$(openssl rand -hex 32)
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
BETTER_AUTH_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
EOF

# Start
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/fr/self-hosting/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ OLLAMA_URL=http://192.168.1.x:11434 # Linux (use actual IP)

## WebSocket/Temps réel ne fonctionne pas

1. Vérifiez que `NEXT_PUBLIC_SOCKET_URL` correspond à votre domaine
1. Vérifiez que le reverse proxy route `/socket.io` vers le service realtime (port 3002 par défaut). `NEXT_PUBLIC_SOCKET_URL` n'est nécessaire que si realtime est sur un hôte séparé.
2. Vérifiez que le service temps réel est en cours d'exécution : `docker compose ps realtime`
3. Assurez-vous que le proxy inverse transmet les mises à niveau WebSocket (voir [Guide Docker](/self-hosting/docker))

Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/docs/ja/self-hosting/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ ENCRYPTION_KEY=$(openssl rand -hex 32)
INTERNAL_API_SECRET=$(openssl rand -hex 32)
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
BETTER_AUTH_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
EOF
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Callout } from 'fumadocs-ui/components/callout'
| `ENCRYPTION_KEY` | 暗号化キー(32桁の16進数): `openssl rand -hex 32` |
| `INTERNAL_API_SECRET` | 内部APIシークレット(32桁の16進数): `openssl rand -hex 32` |
| `NEXT_PUBLIC_APP_URL` | 公開アプリURL |
| `NEXT_PUBLIC_SOCKET_URL` | WebSocket URL(デフォルト: `http://localhost:3002`) |
| `NEXT_PUBLIC_SOCKET_URL` | 任意。WebSocket URL — デフォルトはページのオリジン。realtime が別ホストの場合のみ設定。 |

## AIプロバイダー

Expand Down Expand Up @@ -80,7 +80,6 @@ BETTER_AUTH_URL=https://sim.yourdomain.com
ENCRYPTION_KEY=<openssl rand -hex 32>
INTERNAL_API_SECRET=<openssl rand -hex 32>
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
OPENAI_API_KEY=sk-...
```

Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/docs/ja/self-hosting/platforms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ ENCRYPTION_KEY=$(openssl rand -hex 32)
INTERNAL_API_SECRET=$(openssl rand -hex 32)
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
BETTER_AUTH_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
EOF

# Start
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/ja/self-hosting/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ OLLAMA_URL=http://192.168.1.x:11434 # Linux (use actual IP)

## WebSocket/リアルタイム機能が動作しない

1. `NEXT_PUBLIC_SOCKET_URL` がドメインと一致しているか確認する
1. リバースプロキシが `/socket.io` を realtime サービス(デフォルトポート 3002)にルーティングしているか確認してください。`NEXT_PUBLIC_SOCKET_URL` は realtime が別ホストにある場合のみ必要です。
2. リアルタイムサービスが実行されているか確認する: `docker compose ps realtime`
3. リバースプロキシがWebSocketアップグレードを通過させていることを確認する([Dockerガイド](/self-hosting/docker)を参照)

Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/docs/zh/self-hosting/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ ENCRYPTION_KEY=$(openssl rand -hex 32)
INTERNAL_API_SECRET=$(openssl rand -hex 32)
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
BETTER_AUTH_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
EOF
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Callout } from 'fumadocs-ui/components/callout'
| `ENCRYPTION_KEY` | 加密密钥(32 个十六进制字符):`openssl rand -hex 32` |
| `INTERNAL_API_SECRET` | 内部 API 密钥(32 个十六进制字符):`openssl rand -hex 32` |
| `NEXT_PUBLIC_APP_URL` | 公共应用程序 URL |
| `NEXT_PUBLIC_SOCKET_URL` | WebSocket URL(默认值:`http://localhost:3002`) |
| `NEXT_PUBLIC_SOCKET_URL` | 可选。WebSocket URL — 默认使用页面来源;仅当 realtime 部署在独立主机时才需要设置。 |

## AI 提供商

Expand Down Expand Up @@ -80,7 +80,6 @@ BETTER_AUTH_URL=https://sim.yourdomain.com
ENCRYPTION_KEY=<openssl rand -hex 32>
INTERNAL_API_SECRET=<openssl rand -hex 32>
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
OPENAI_API_KEY=sk-...
```

Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/docs/zh/self-hosting/platforms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ ENCRYPTION_KEY=$(openssl rand -hex 32)
INTERNAL_API_SECRET=$(openssl rand -hex 32)
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
BETTER_AUTH_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
EOF

# Start
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/zh/self-hosting/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ OLLAMA_URL=http://192.168.1.x:11434 # Linux (use actual IP)

## WebSocket/实时功能无法正常工作

1. 检查 `NEXT_PUBLIC_SOCKET_URL` 是否与您的域名匹配
1. 确认反向代理将 `/socket.io` 路由到 realtime 服务(默认端口 3002)。仅当 realtime 部署在独立主机时才需要设置 `NEXT_PUBLIC_SOCKET_URL`
2. 验证实时服务是否正在运行:`docker compose ps realtime`
3. 确保反向代理支持 WebSocket 升级(参见 [Docker 指南](/self-hosting/docker)

Expand Down
1 change: 1 addition & 0 deletions apps/sim/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ BETTER_AUTH_URL=http://localhost:3000
# NextJS (Required)
NEXT_PUBLIC_APP_URL=http://localhost:3000
# INTERNAL_API_BASE_URL=http://sim-app.default.svc.cluster.local:3000 # Optional: internal URL for server-side /api self-calls; defaults to NEXT_PUBLIC_APP_URL
# TRUSTED_ORIGINS=https://www.example.com,https://app.example.com # Optional: comma-separated additional public origins to trust for auth (apex+www, alias domains). Merged into Better Auth trustedOrigins.

# Security (Required)
ENCRYPTION_KEY=your_encryption_key # Use `openssl rand -hex 32` to generate, used to encrypt environment variables
Expand Down
9 changes: 2 additions & 7 deletions apps/sim/lib/auth/auth-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,11 @@ import { createAuthClient } from 'better-auth/react'
import type { auth } from '@/lib/auth'
import { env } from '@/lib/core/config/env'
import { isBillingEnabled, isOrganizationsEnabled } from '@/lib/core/config/feature-flags'
import { getBaseUrl } from '@/lib/core/utils/urls'
import { getBaseUrl, getBrowserOrigin } from '@/lib/core/utils/urls'
import { SessionContext, type SessionHookResult } from '@/app/_shell/providers/session-provider'

function getAuthBaseUrl(): string {
try {
return getBaseUrl()
} catch (e) {
if (typeof window !== 'undefined') return window.location.origin
throw e
}
return getBrowserOrigin() ?? getBaseUrl()
}

export const client = createAuthClient({
Expand Down
17 changes: 16 additions & 1 deletion apps/sim/lib/auth/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ import {
isSignupEmailValidationEnabled,
} from '@/lib/core/config/feature-flags'
import { PlatformEvents } from '@/lib/core/telemetry'
import { getBaseUrl } from '@/lib/core/utils/urls'
import { getBaseUrl, isLocalhostUrl, parseOriginList } from '@/lib/core/utils/urls'
import { processCredentialDraft } from '@/lib/credentials/draft-processor'
import { sendEmail } from '@/lib/messaging/email/mailer'
import { getFromEmailAddress, getPersonalEmailFrom } from '@/lib/messaging/email/utils'
Expand Down Expand Up @@ -145,6 +145,20 @@ const blockedSignupDomains = env.BLOCKED_SIGNUP_DOMAINS
? new Set(env.BLOCKED_SIGNUP_DOMAINS.split(',').map((d) => d.trim().toLowerCase()))
: null

const additionalTrustedOrigins = parseOriginList(env.TRUSTED_ORIGINS, (value) =>
logger.warn('Ignoring invalid entry in TRUSTED_ORIGINS', { value })
)

if (env.NODE_ENV === 'production') {
const baseUrl = getBaseUrl()
if (isLocalhostUrl(baseUrl)) {
logger.warn(
'NEXT_PUBLIC_APP_URL points to localhost in production. Self-hosted deployments must set NEXT_PUBLIC_APP_URL to the public URL users access (e.g. https://sim.example.com), otherwise auth POST requests from any non-localhost origin will be rejected by trustedOrigins. Set TRUSTED_ORIGINS to allow additional public origins.',
{ baseUrl }
)
}
}

const validStripeKey = env.STRIPE_SECRET_KEY

let stripeClient = null
Expand All @@ -159,6 +173,7 @@ export const auth = betterAuth({
trustedOrigins: [
getBaseUrl(),
...(env.NEXT_PUBLIC_SOCKET_URL ? [env.NEXT_PUBLIC_SOCKET_URL] : []),
...additionalTrustedOrigins,
'https://claude.ai',
'https://claude.com',
].filter(Boolean),
Expand Down
1 change: 1 addition & 0 deletions apps/sim/lib/core/config/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const env = createEnv({
ALLOWED_LOGIN_EMAILS: z.string().optional(), // Comma-separated list of allowed email addresses for login
ALLOWED_LOGIN_DOMAINS: z.string().optional(), // Comma-separated list of allowed email domains for login
BLOCKED_SIGNUP_DOMAINS: z.string().optional(), // Comma-separated list of email domains blocked from signing up (e.g., "gmail.com,yahoo.com")
TRUSTED_ORIGINS: z.string().optional(), // Comma-separated additional origins to trust for auth (e.g., "https://app.example.com,https://www.example.com"). Merged into Better Auth trustedOrigins.
TURNSTILE_SECRET_KEY: z.string().min(1).optional(), // Cloudflare Turnstile secret key for captcha verification
SIGNUP_EMAIL_VALIDATION_ENABLED: z.boolean().optional(), // Enable disposable email blocking via better-auth-harmony (55K+ domains)
ENCRYPTION_KEY: z.string().min(32), // Key for encrypting sensitive data
Expand Down
Loading
Loading