Skip to content

fix: harden auth token refresh - #51

Merged
jlitola merged 1 commit into
mainfrom
neat-coreopsis
Apr 29, 2026
Merged

fix: harden auth token refresh#51
jlitola merged 1 commit into
mainfrom
neat-coreopsis

Conversation

@jlitola

@jlitola jlitola commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve refresh tokens when OAuth refresh responses omit rotation and recover long-running MCP servers from externally updated credentials.
  • Add locked, conditional auth storage/session updates so parallel MCP servers avoid split token/client state.
  • Clean up auth-required CLI/MCP error handling with stable AUTH_REQUIRED guidance and no stack traces.

Verification

  • bun test
  • bun run typecheck
  • bun run build
  • Local smoke: bun run dev --help succeeds.
  • Local smoke: GITHITS_API_TOKEN=dummy GITHITS_DISABLE_UPDATE_CHECK=1 bun run dev auth status succeeds.
  • Local smoke: GITHITS_API_TOKEN=dummy GITHITS_DISABLE_UPDATE_CHECK=1 bun run dev search "router" --in npm:express --limit 1 reaches backend and fails cleanly with Authentication required and no stack trace.

Notes

  • Local OAuth keychain smoke (bun run dev auth status without GITHITS_API_TOKEN) hung on this machine while accessing local OAuth storage, so I did not claim a successful real refresh smoke. The refresh behavior is covered by focused token-manager/auth-service tests.

@jlitola
jlitola force-pushed the neat-coreopsis branch 2 times, most recently from 00c4ee6 to 6fd9c73 Compare April 29, 2026 14:16
Preserve refresh tokens when providers omit rotation, recover long-running MCP servers from externally refreshed credentials, and serialize auth storage updates across parallel agents.
@jlitola
jlitola merged commit 20f6b4e into main Apr 29, 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