Repository navigation
feat: polish the Vercel connection page and revoke on disconnect - #18
Merged
Merged
Conversation
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.
3 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
default-src 'none'; style-src 'unsafe-inline'.POST /disconnectdeletes the local session, then calls the documentedPOST https://api.vercel.com/login/oauth/token/revokewith Basic client credentials and the token. It is deliberately best effort: the log recordsrevoke <status>, and a failure never keeps the local session alive.Changes
integrations/vercel-worker/index.mjsintegrations/vercel-worker/index.test.mjsdocs/vercel-security-review.mdintegrations/vercel-worker/README.mdrevoke 200docs/vercel-deployment-monitoring.mdHow I tested it
node --test integrations/vercel-worker/index.test.mjspasses (13 tests)python3 scripts/check-strings.pypasses (89 strings, 3 languages)Notes
revoke 200inwrangler 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.