Skip to content

feat: polish the Vercel connection page and revoke on disconnect - #18

Merged
enderdev01 merged 1 commit into
mainfrom
feat/vercel-connection-page
Nov 4, 2026
Merged

enderdev01 merged 1 commit into
mainfrom
feat/vercel-connection-page

Conversation

@enderdev01

Copy link
Copy Markdown
Owner

Linked issue

Closes #17

What and why

Two loose ends from 0.3.4, both in the Worker (no app build changes, so no new app release is needed):

  • A connection page instead of plain text. The callback now answers with a small dark page in the app's style: what happened, whether it worked, and "you can close this tab". Failures say what to do next (expired session, redirect mismatch, unexpected Vercel response). It still ships no scripts: the CSP is default-src 'none'; style-src 'unsafe-inline'.
  • Disconnect revokes the token (finding F1). POST /disconnect deletes the local session, then calls the documented POST https://api.vercel.com/login/oauth/token/revoke with Basic client credentials and the token. It is deliberately best effort: the log records revoke <status>, and a failure never keeps the local session alive.

Changes

File Change
integrations/vercel-worker/index.mjs Rendered callback pages; revocation on disconnect
integrations/vercel-worker/index.test.mjs Page content and headers, revocation request, revocation failure
docs/vercel-security-review.md F1 moves from open to fixed, with its caveat
integrations/vercel-worker/README.md Verification step now checks revoke 200
docs/vercel-deployment-monitoring.md Status updated

How I tested it

  • node --test integrations/vercel-worker/index.test.mjs passes (13 tests)
  • python3 scripts/check-strings.py passes (89 strings, 3 languages)
  • No secrets, personal paths or network calls added beyond the documented revocation request

Notes

  • Needs a Worker redeploy to take effect; the 0.3.4 app keeps working against it unchanged.
  • The revoke endpoint is documented for Sign in with Vercel tokens; this is its first use with an integration token. The next real disconnect should show revoke 200 in wrangler tail. If Vercel answers 400/401, the token is not revoked and the integration still has to be removed manually in Vercel — the docs and the dialog say so.
  • The page interpolates only static strings, so there is nothing to escape and no user input reaches the HTML.

The callback now renders a small dark page instead of plain text, with a
short reason when something fails, and still no scripts (only
style-src 'unsafe-inline'). Disconnect deletes the local session and
then asks Vercel to revoke the token through the documented revoke
endpoint with Basic client credentials; a failure is logged and ignored
so the local session always ends.

Tests cover the rendered page, the revocation request, and disconnecting
when revocation throws.
@enderdev01 enderdev01 added the enhancement New feature or request label Nov 4, 2026
@enderdev01
enderdev01 merged commit 2deb583 into main Nov 4, 2026
1 check passed
@enderdev01
enderdev01 deleted the feat/vercel-connection-page branch November 4, 2026 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Polish the Vercel connection page and revoke on disconnect

1 participant