Skip to content

Local dev frontend cannot connect: all interactive /api routes 401 even with valid login token #227

Description

@alexeygrigorev

Raw intake from local dev session (2026-09-10).

Symptom: the Vite frontend on :3002 loads, but every data call fails. Backend log shows repeated 4xx on the operating_model route family; curl confirms GET /api/operating-model and /api/tasks return 401, with and without a valid Bearer token from POST /api/auth/login.

Suspected area: backend/src/router.ts session middleware is skipped whenever the docs-domain portal layer authorizes the request, but with browser auth unconfigured (local dev) the portal authorizes with no identity, so no x-user-id is ever set and bearer sessions are never validated downstream. resolveInteractiveActor then fails closed with 401.

Repro:

  1. make dev (frontend :3002, backend :3001)
  2. curl -X POST :3002/api/auth/login -d '{"email":"alexey@datatalks.club","password":"111"}' -> 200 + token
  3. curl :3002/api/operating-model -H "Authorization: Bearer " -> 401 (expected 200)
  4. curl ':3002/api/tasks?date=2026-09-10' -H "Authorization: Bearer " -> 401 (expected 200)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend/APIbugSomething is brokenneeds groomingRaw intake that needs PM grooming

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions