Skip to content

fix: fall back to valid PAT when OAuth token refresh fails#141

Merged
jodeleeuw merged 1 commit into
mainfrom
test
Mar 28, 2026
Merged

fix: fall back to valid PAT when OAuth token refresh fails#141
jodeleeuw merged 1 commit into
mainfrom
test

Conversation

@jodeleeuw

Copy link
Copy Markdown
Member

Summary

  • When a user is set to OAuth but the refresh token is invalid or missing (e.g., they switched to OAuth without completing the flow), token resolution now falls back to their personal access token if one exists and is valid
  • Applied in both resolve-token.ts (used by api-data and api-base64) and metadata-block.ts

Test plan

  • Set a valid PAT, switch to OAuth without completing the flow, verify data uploads still work using the PAT
  • Verify that users with working OAuth tokens are unaffected
  • Verify that users with neither a valid PAT nor valid OAuth tokens still get an appropriate error

🤖 Generated with Claude Code

When a user is set to OAuth but the refresh token is invalid or
missing (e.g., they switched to OAuth without completing the flow),
the token resolution now falls back to their personal access token
if one exists and is valid. Applied in both resolve-token.ts and
metadata-block.ts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jodeleeuw jodeleeuw merged commit 9b032f9 into main Mar 28, 2026
3 checks passed
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