Skip to content

fix(oauth): treat unauthorized_client as a terminal refresh error - #8167

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/atlassian-terminal-refresh-error
Sep 22, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/atlassian-terminal-refresh-error

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Atlassian rejects a revoked or rotated-out refresh token with unauthorized_client, which was missing from the shared terminal refresh-error set
  • Without it, a dead Atlassian credential is never dead-flagged: every caller keeps hitting the token endpoint, and the connector reconnect prompt never fires, so Confluence/Jira connectors grind down the failure ladder to auto-disable instead
  • Adds unauthorized_client to the set. Under RFC 6749 §5.2 it means the client may not use the refresh grant, which is as persistent as invalid_client (already terminal). The managed Atlassian adapter already classifies it this way
  • Google service-account token minting keeps its own code set and is unaffected

Type of Change

  • Bug fix

Testing

  • Unit test covers the new code; reverting the fix turns it red
  • OAuth suites (terminal errors, managed OAuth adapters, credential service) pass; check:audits passes

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 22, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 22, 2026 10:08pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the new classification is consistent with terminal OAuth refresh failures and is directly unit-tested.

Summary

This PR adds unauthorized_client to the shared set of terminal OAuth refresh errors so affected credentials stop retrying and can enter the existing reconnection flow.

  • Documents why the error is considered terminal.
  • Adds direct unit coverage for unauthorized_client.
  • Adds missing unit coverage for the already-terminal token_revoked code.

Reviews (1) · Last reviewed commit: "fix(oauth): treat unauthorized_client as..."

@waleedlatif1
waleedlatif1 merged commit 100d26b into staging Sep 22, 2026
34 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/atlassian-terminal-refresh-error branch September 22, 2026 22:30

This branch was previously deployed

1 inactive deployment
Preview 72bb7a5a Deployed Sep 22, 2026 by vercel[bot]
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