Skip to content

OAuth consent flow follow-ups - #9018

Merged
knolleary merged 3 commits into
oauth-approve-putfrom
oauth-approve-put-followups
Oct 22, 2026
Merged

knolleary merged 3 commits into
oauth-approve-putfrom
oauth-approve-put-followups

Conversation

@andypalmi

Copy link
Copy Markdown
Contributor

Follow-ups to #9015, based on its branch so they can be merged into it.

  1. PUT /account/reject/:code uses verifyBrowserSession, the same as PUT /account/complete/:code.
  2. The MCP token exchange expects the toolPermissions saved on the consent page and no longer falls back to defaults. The fallback was only for OAuth sessions saved before tool permissions were added (Store tool permissions on MCP tokens #8686), and those expire after 5 minutes, so the test for it is removed.
  3. The plugin consent page (AccessRequest.vue) shows an error when Allow or Deny fails, for example on an expired request, matching AccessRequestMCP.vue.

Tests

  1. The PUT reject test now sends a session, and a new test checks it returns 401 without one.
  2. New test: an MCP client calling authorize with scope=editor while logged in gets a 400 from GET /account/complete.
  3. New test: an MCP code without toolPermissions is refused at the token endpoint.
  4. New AccessRequest.spec.js: Allow and Deny follow the returned redirect, and a failed request shows the error.

andypalmi added 3 commits October 22, 2026 10:28
Also cover an MCP client using the editor scope to skip the consent page.
Every MCP code now goes through the consent page, so the read-only and
all-teams fallbacks for sessions saved before tool permissions existed
are no longer needed.
@knolleary
knolleary self-requested a review October 22, 2026 08:48
@knolleary
knolleary merged commit c0ddf12 into oauth-approve-put Oct 22, 2026
24 checks passed
@knolleary
knolleary deleted the oauth-approve-put-followups branch October 22, 2026 08:53
@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.50%. Comparing base (4cf759d) to head (13a0a0b).
⚠️ Report is 3 commits behind head on oauth-approve-put.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           oauth-approve-put    #9018      +/-   ##
=====================================================
- Coverage              79.50%   79.50%   -0.01%     
=====================================================
  Files                    475      475              
  Lines                  26054    26052       -2     
  Branches                6944     6942       -2     
=====================================================
- Hits                   20714    20712       -2     
  Misses                  5340     5340              
Flag Coverage Δ
backend 79.50% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch was successfully deployed

1 active deployment
staging — 13a0a0bd Deployed Oct 22, 2026 by knolleary via Remove application #12683
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.

2 participants