fix(integrations): connect vercel when the code exchange omits user_id
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
Read src/lib/adapters/vercel/schemas.ts and src/lib/adapters/vercel/index.ts, then check a real code exchange for team and Hobby installs using the integration registered under #88. Update the schema, credential handling, tests and fixtures, and docs/providers/vercel.md based on the observed responses. Done when the acceptance criteria pass and the listed typecheck, lint and adapter tests succeed.
Written by the indexing model from the issue text.
Description
Context
Found while re-reading Vercel's token documentation for #757 on 2026-12-02.
StackDash requires user_id in the code exchange response (TokenResponseSchema, src/lib/adapters/vercel/schemas.ts) and in the stored credential metadata (readScope, src/lib/adapters/vercel/index.ts), and a Hobby account is identified by it (listAccounts, sync, and webhook routing by payload.user.id).
Both Vercel documentation pages still show user_id in the code exchange response and in the client credentials response (Building Integrations with Vercel REST API, "Exchange code for Access Token"; Migrating to Short-Lived Access Tokens, "Request a short-lived token"). Vercel's own reference integration does not rely on it: vercel/example-marketplace-integration commit a06457a4 ("Renew installation access tokens (#147)", 2026-11-07) made user_id optional in its code exchange schema (lib/vercel/external-api.ts, test "accepts authorization-code responses with an optional legacy user ID"), and its README says the "Authorization-code exchange accepts the new expires_in response and optional user_id field".
Impact if Vercel omits it for an integration that issues short-lived tokens: every Vercel connect fails at the code exchange with invalid_response, so no Vercel account can connect on the integration #88 registers. Unverified until that integration exists.
Plan
- Check a real code exchange on the integration registered under #88 (development integration first): does the response carry
user_id, for a team install and for a Hobby install? - If it can be missing: make
user_idoptional in the code exchange schema. A team install does not need it (the account isteam_id). For a Hobby install, take it from the client credentials responseexchangeCoderequests right after the exchange (#757), which the documentation shows withuser_id, and refuse the connection with a clear error only when neither carries one. - Keep
readScopeworking for credentials stored before the change.
Acceptance criteria
- A team install whose code exchange response has no
user_idconnects and syncs. - A Hobby install with no
user_idin either response is refused withinvalid_response, never stored half-identified. -
docs/providers/vercel.mdstates what was observed and removes the Unverified entry. - Playwright e2e: not needed, the simulated Vercel flow does not call the token endpoint.
Files and areas
src/lib/adapters/vercel/index.ts, src/lib/adapters/vercel/schemas.ts, their tests and fixtures, docs/providers/vercel.md.
Non-goals: token renewal itself (#757), the integration registration (#88).
Verification
npm run typecheck, npm run lint, npx vitest run src/lib/adapters/vercel.
Branch: <issue-number>-vercel-optional-user-id
Model: anthropic/claude-opus-5-5 | Reasoning effort: max
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 2
- Avg merge
- 5h 20m
- Merged PRs (30d)
- 287
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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.
More from eddiejaoude/StackDash
-
area: integrations documentation priority: P2 size: XS
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eddiejaoude/StackDash#798 ·
Maintainers usually reply within 1 day
-
area: ops documentation priority: P3 size: XS
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
eddiejaoude/StackDash#796 ·
Maintainers usually reply within 1 day
-
area: docs documentation impact: low priority: P3 size: XS
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
eddiejaoude/StackDash#790 ·
Maintainers usually reply within 1 day
-
area: ops bug impact: low priority: P3 size: XS
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
eddiejaoude/StackDash#785 ·
Maintainers usually reply within 1 day
-
area: connections enhancement impact: low priority: P3 size: XS
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
eddiejaoude/StackDash#768 ·
Maintainers usually reply within 1 day
All issues in eddiejaoude/StackDash
Similar issues
-
bot:ai-assisted component:midnight-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
midnightntwrk/midnight-js#1790 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
area:vscode bug has repro platform:macos platform:vscode regression
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDOpencheck:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
effort/l priority/p1 risk/high triage/core
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
iflytek/skillhub#1188 · 1 comment ·
Maintainers usually reply within 1 day