Skip to content

test(oauth): cover authorize, callback, refresh routes and connector store - #18

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/test-coverage-automation-0cff
Draft

test(oauth): cover authorize, callback, refresh routes and connector store#18
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/test-coverage-automation-0cff

Conversation

@cursor

@cursor cursor Bot commented Jun 26, 2026

Copy link
Copy Markdown

Risky behavior now covered

  • OAuth authorize route session gating (401 without session)
  • PKCE cookie issuance on authorize success
  • Callback error/missing-parameter redirects and PKCE cookie clearing
  • Successful token exchange persisting credentials via connectorStore
  • Refresh route 404/400 paths and refresh-token preservation on token rotation

Test files added/updated

  • tests/api/oauth/authorize.test.ts
  • tests/api/oauth/callback.test.ts
  • tests/api/oauth/refresh.test.ts
  • tests/lib/connector-store.test.ts

Why these tests materially reduce regression risk

OAuth connector flows are security-sensitive and were only partially covered at the PKCE crypto layer. Route-level tests now guard session enforcement, state/PKCE validation, credential persistence, and refresh-token retention — the most common failure modes when wiring new connectors or changing auth middleware.

Open in Web View Automation 

…store

Add route-level tests for session gating, PKCE cookie handling, token
exchange, and refresh-token preservation to guard OAuth connector flows.

Co-authored-by: esadrianno <esadrianno@gmail.com>
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v0-agent-kit Ready Ready Preview, Comment, Open in v0 Jun 26, 2026 12:11pm

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant