From 44638af5372bb89e9a3949f31f07a407937eef5a Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 21 Sep 2025 17:08:13 +0000 Subject: [PATCH] Fix: Cast session to any for activeOrganizationId access Co-authored-by: vaughn.dimarco --- apps/sim/app/api/auth/socket-token/route.ts | 2 +- apps/sim/server.log | 30 +++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 apps/sim/server.log diff --git a/apps/sim/app/api/auth/socket-token/route.ts b/apps/sim/app/api/auth/socket-token/route.ts index 39bd32d8924..a0a22b9bfde 100644 --- a/apps/sim/app/api/auth/socket-token/route.ts +++ b/apps/sim/app/api/auth/socket-token/route.ts @@ -35,7 +35,7 @@ export async function POST() { sub: session.user.id, name: session.user.name || session.user.email || 'User', email: session.user.email, - org: session.session?.activeOrganizationId || null, + org: (session.session as any)?.activeOrganizationId || null, iat: nowSec, exp: expSec, // Token purpose scoping diff --git a/apps/sim/server.log b/apps/sim/server.log new file mode 100644 index 00000000000..75ab3ce730d --- /dev/null +++ b/apps/sim/server.log @@ -0,0 +1,30 @@ +$ next dev --turbo --port 3000 + ▲ Next.js 15.4.1 (Turbopack) + - Local: http://localhost:3000 + - Network: http://172.30.0.2:3000 + - Environments: .env + - Experiments (use with caution): + ✓ optimizeCss + ⨯ turbopackSourceMaps + + ✓ Starting... + ○ Compiling instrumentation Node.js ... + ✓ Compiled instrumentation Node.js in 3.7s + ✓ Compiled instrumentation Edge in 253ms + ✓ Compiled middleware in 296ms +[Main Instrumentation] register() called, environment: { NEXT_RUNTIME: 'nodejs', NODE_ENV: 'development' } +[Main Instrumentation] Loading Node.js instrumentation... +[Main Instrumentation] Calling Node.js register()... +[2025-09-21T17:07:50.331Z] [INFO] [OtelInstrumentation] OpenTelemetry instrumentation initialized for server-side telemetry + ✓ Ready in 6.3s +[Main Instrumentation] register() called, environment: { NEXT_RUNTIME: 'edge', NODE_ENV: 'development' } +[Main Instrumentation] Loading Edge Runtime instrumentation... +[Main Instrumentation] Calling Edge Runtime register()... +[2025-09-21T17:07:50.457Z] [INFO] [EdgeInstrumentation] Edge Runtime instrumentation initialized + ○ Compiling /api/workspaces ... + ✓ Compiled /api/workspaces in 3.9s +2025-09-21T17:07:54.744Z WARN [Better Auth]: Social provider github is missing clientId or clientSecret +2025-09-21T17:07:54.745Z WARN [Better Auth]: Social provider google is missing clientId or clientSecret + GET /api/workspaces 401 in 4308ms +[2025-09-21T17:08:06.006Z] [INFO] [OtelInstrumentation] OpenTelemetry SDK shut down successfully +[?25h