diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-07-14 16:16:10 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-07-14 16:16:10 +0200 |
| commit | 73ba7d6577f4e5139a412a6acc820c688b3e369c (patch) | |
| tree | ec0791c3fe08b62b07aef8c6be3a26a1ffb73575 | |
| parent | 238f8e85bb66f3a48255f0fa26bae10dcd544b04 (diff) | |
| download | opencut-73ba7d6577f4e5139a412a6acc820c688b3e369c.tar.gz | |
fix: better auth env variable
| -rw-r--r-- | .github/CONTRIBUTING.md | 2 | ||||
| -rw-r--r-- | apps/web/.env.example | 2 | ||||
| -rw-r--r-- | packages/auth/src/server.ts | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 989278c3..2f28b36b 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -61,7 +61,7 @@ Thank you for your interest in contributing to OpenCut! This document provides g # Generate a secure secret for Better Auth BETTER_AUTH_SECRET="your-generated-secret-here" - BETTER_AUTH_URL="http://localhost:3000" + NEXT_PUBLIC_BETTER_AUTH_URL="http://localhost:3000" # Redis (matches docker-compose.yaml) UPSTASH_REDIS_REST_URL="http://localhost:8079" diff --git a/apps/web/.env.example b/apps/web/.env.example index 0b4c649b..834171a0 100644 --- a/apps/web/.env.example +++ b/apps/web/.env.example @@ -4,7 +4,7 @@ DATABASE_URL="postgresql://opencut:opencutthegoat@localhost:5432/opencut" # Better Auth -BETTER_AUTH_URL=http://localhost:3000 +NEXT_PUBLIC_BETTER_AUTH_URL=http://localhost:3000 BETTER_AUTH_SECRET=your-secret-key-here #Google Clients diff --git a/packages/auth/src/server.ts b/packages/auth/src/server.ts index 940f24c2..668d27de 100644 --- a/packages/auth/src/server.ts +++ b/packages/auth/src/server.ts @@ -22,6 +22,7 @@ export const auth = betterAuth({ clientSecret: process.env.GOOGLE_CLIENT_SECRET as string, }, }, + baseURL: process.env.NEXT_PUBLIC_BETTER_AUTH_URL, appName: "OpenCut", trustedOrigins: ["http://localhost:3000"], }); |
