Skip to content

Commit 88add69

Browse files
author
Mohammod Al Amin Ashik
committed
fix(oauth): remove credential caching to enable automatic token refresh
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
1 parent c620e56 commit 88add69

2 files changed

Lines changed: 273 additions & 38 deletions

File tree

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)