DataTalksClub / DataTalksClub/dataops
Local dev frontend cannot connect: all interactive /api routes 401 even with valid login token
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
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:
- make dev (frontend :3002, backend :3001)
- curl -X POST :3002/api/auth/login -d '{"email":"alexey@datatalks.club","password":"111"}' -> 200 + token
- curl :3002/api/operating-model -H "Authorization: Bearer " -> 401 (expected 200)
- curl ':3002/api/tasks?date=2026-09-10' -H "Authorization: Bearer " -> 401 (expected 200)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in backend/src/router.ts, focusing on the session middleware, docs-domain authorization, and resolveInteractiveActor flow described in the issue. Run make dev and reproduce the login and authenticated requests against /api/operating-model and /api/tasks; done means valid Bearer-token requests return their expected successful responses instead of 401.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, authentication, backend, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100