fix(oauth): remove credential caching to enable automatic token refresh - #33
Merged
Conversation
The DatabaseCredentialStore was caching StoredCredentials with stale expires_in values, preventing RMCP's automatic token refresh from working correctly. After idle periods, tool calls would fail with 401 errors even though tokens should have been refreshed. Changes: - Removed cache field and all caching logic from DatabaseCredentialStore - expires_in is now recalculated on every load() from the stored expires_at timestamp - RMCP's AuthClient can now properly detect expired tokens and refresh them automatically - Added comprehensive tests to verify token expiration detection and refresh behavior Fixes: OAuth-protected servers (like Atlassian MCP) failing after idle periods
- Enable format on save for Rust files - Configure rust-analyzer to use rustfmt - Add pre-commit hook to auto-format Rust code before commits - Ensure consistent line endings (LF) and trim trailing whitespace
This was referenced Feb 15, 2026
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.
The DatabaseCredentialStore was caching StoredCredentials with stale expires_in values, preventing RMCP's automatic token refresh from working correctly. After idle periods, tool calls would fail with 401 errors even though tokens should have been refreshed.
Changes:
Fixes: OAuth-protected servers (like Atlassian MCP) failing after idle periods